Closed Bug 1439395 Opened 8 years ago Closed 7 years ago

Consider clearing the Servo style data only when the DOM is on a consistent state.

Categories

(Core :: CSS Parsing and Computation, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(2 files)

No description provided.
Comment on attachment 8952181 [details] Bug 1439395: Clear Servo data only when the DOM is in a consistent state. https://reviewboard.mozilla.org/r/221424/#review227274 So I guess the major downside here is that we have to re-traverse the subtree, right? Hopefully that's not such a big deal - the perf was enough of an issue to motivate bug 1378005, but I think this shouldn't regress that bug. ::: commit-message-a7917:11 (Diff revision 1) > +without a super-clear fix, and others that aren't listed in there, and all the > +complexity we had to deal with while receiving restyle requests mid-unbind, etc, > +I think this is the right call. > + > +This clears data on RestyleManager::ContentRemoved for non-anonymous nodes, and > +on UnbindFromTree for non-anonymous nodes. I think you mean "anonymous nodes" here? I think the comment is a bit inaccurate though, since ClearServoDataFromSubtree uses a StyleChildrenIterator, which traverses anonymous nodes. Seems like we really mean "subtrees rooted at an anonymous node"?
Attachment #8952181 - Flags: review?(bobbyholley) → review+
Pushed by ecoal95@gmail.com: https://hg.mozilla.org/integration/autoland/rev/3ab4e934cd7f Clear Servo data only when the DOM is in a consistent state. r=bholley
[ Triage 2017/02/20: P3 ]
Priority: -- → P3
Flags: needinfo?(emilio)
Comment on attachment 8954094 [details] Bug 1439395: Avoid leaving an stale restyle root if there's no servo data on it. https://reviewboard.mozilla.org/r/223248/#review229252 Per IRC discussion, we should add a branch on the existence of mServoData in ClearServoData, and remove any redundant branches in the callers. ::: dom/base/Element.cpp:1930 (Diff revision 1) > "RemovedFullscreenElement"); > // Fully exit full-screen. > nsIDocument::ExitFullscreenInDocTree(OwnerDoc()); > } > > +#ifdef DEBUG This ifdef isn't necessary, since the compiler will optimize it all out. Please remove it to declutter.
Attachment #8954094 - Flags: review?(bobbyholley) → review+
Comment on attachment 8954094 [details] Bug 1439395: Avoid leaving an stale restyle root if there's no servo data on it. Bobby, mind taking a last look to the second patch? Just double-checking you're fine with landing it in that state. The rest of the callers to Clear** look harmless / have the actual intention of checking for the data (specially XBL / nsPresContext::Init / etc.)
Flags: needinfo?(bobbyholley)
Yeah, sure. Thanks!
Flags: needinfo?(bobbyholley)
Pushed by ecoal95@gmail.com: https://hg.mozilla.org/integration/autoland/rev/15ba5a05f9ab Clear Servo data only when the DOM is in a consistent state. r=bholley https://hg.mozilla.org/integration/autoland/rev/b45ca837446a Avoid leaving an stale restyle root if there's no servo data on it. r=bholley
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Depends on: 1482694
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: