Closed
Bug 589686
Opened 15 years ago
Closed 15 years ago
Fix uses of ContentStatesChanged and MOZ_AUTO_DOC_UPDATE in content/html/content/*.cpp
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla2.0b7
| Tracking | Status | |
|---|---|---|
| blocking2.0 | --- | betaN+ |
People
(Reporter: mounir, Assigned: mounir)
References
Details
Attachments
(1 file)
|
10.48 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
Updated•15 years ago
|
blocking2.0: ? → betaN+
| Assignee | ||
Comment 2•15 years ago
|
||
Looks like nsGenericHTMLElement.cpp also has some bad uses so let have this bug fixing all of them.
Summary: Fix misuses of ContentStatesChanged and MOZ_AUTO_DOC_UPDATE introduced with :valid/:invalid patch → Fix uses of ContentStatesChanged and MOZ_AUTO_DOC_UPDATE in content/html/content/*.cpp
| Assignee | ||
Comment 3•15 years ago
|
||
Attachment #471646 -
Flags: review?(bzbarsky)
Comment 4•15 years ago
|
||
Comment on attachment 471646 [details] [diff] [review]
Patch v1
>+++ b/content/html/content/src/nsGenericHTMLElement.cpp
> MakeContentDescendantsEditable(nsIContent *aContent, nsIDocument *aDocument)
>+ MOZ_AUTO_DOC_UPDATE(aDocument, UPDATE_CONTENT_STATE, PR_TRUE);
Since this function is recursive, we could end up with tons of update begin/ends here in the common case. Why not just do a single update around the call in nsGenericHTMLElement::ChangeEditableState?
And maybe file a followup bug to make this iterative instead of recursive?
r=bzbarsky with that.
Attachment #471646 -
Flags: review?(bzbarsky) → review+
| Assignee | ||
Comment 5•15 years ago
|
||
I guess I can add MOZ_AUTO_DOC_UPDATE(document, UPDATE_CONTENT_STATE, PR_TRUE); before the initial MakeContentDescendantEditable call. This might be useless if |aDocument && stateBefore != aContent->IntrinsicState()| is always false but I guess it's better than having it called at each recursion step.
I will open a derecursification bug too.
Comment 6•15 years ago
|
||
> but I guess it's better than having it called at each recursion step.
Right. And I would be surprised if it's always false.
| Assignee | ||
Comment 7•15 years ago
|
||
| Assignee | ||
Comment 8•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b6
You need to log in
before you can comment on or make changes to this bug.
Description
•