Closed Bug 1287542 Opened 8 years ago Closed 8 years ago

stylo: Keep track of whether we have pending restyles.

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(2 files)

With Bug 1286445 landed, this is now easy.
Assignee: nobody → ealvarez
Blocks: stylo
Comment on attachment 8772120 [details] Bug 1287542: stylo: Implement ServoRestyleManager::HasPendingRestyles() https://reviewboard.mozilla.org/r/65016/#review62012 We should just check the bit on the document here rather than introducing a new piece of state that could get out of sync.
Attachment #8772120 - Flags: review?(bobbyholley) → review-
Comment on attachment 8772121 [details] Bug 1287542: stylo: Actually post a restyle event to the restyle manager on content state change. https://reviewboard.mozilla.org/r/65018/#review62014
Attachment #8772121 - Flags: review?(bobbyholley) → review+
Comment on attachment 8772120 [details] Bug 1287542: stylo: Implement ServoRestyleManager::HasPendingRestyles() Review request updated; see interdiff: https://reviewboard.mozilla.org/r/65016/diff/1-2/
Attachment #8772120 - Flags: review- → review?(bobbyholley)
Comment on attachment 8772121 [details] Bug 1287542: stylo: Actually post a restyle event to the restyle manager on content state change. Review request updated; see interdiff: https://reviewboard.mozilla.org/r/65018/diff/1-2/
Comment on attachment 8772120 [details] Bug 1287542: stylo: Implement ServoRestyleManager::HasPendingRestyles() https://reviewboard.mozilla.org/r/65016/#review62064 r=me with those two fixes. ::: layout/base/ServoRestyleManager.h:82 (Diff revision 2) > + bool mHasPendingRestyles; > + This should go away. ::: layout/base/ServoRestyleManager.cpp:155 (Diff revision 2) > + // NB: we restyle from the root element, but the document also gets the > + // HAS_DIRTY_DESCENDANTS flag as part of the loop on PostRestyleEvent, and we > + // use that to check we have pending restyles. > + // > + // Thus, they need to get cleared here. > + doc->UnsetFlags(NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO); Let's move this down so that we set it when the document no longer has dirty descendants. Also, let's just assert that the document is never dirty.
Attachment #8772120 - Flags: review?(bobbyholley) → review+
Comment on attachment 8772120 [details] Bug 1287542: stylo: Implement ServoRestyleManager::HasPendingRestyles() Review request updated; see interdiff: https://reviewboard.mozilla.org/r/65016/diff/2-3/
Comment on attachment 8772121 [details] Bug 1287542: stylo: Actually post a restyle event to the restyle manager on content state change. Review request updated; see interdiff: https://reviewboard.mozilla.org/r/65018/diff/2-3/
Pushed by ecoal95@gmail.com: https://hg.mozilla.org/integration/autoland/rev/2566472bdbe7 stylo: Implement ServoRestyleManager::HasPendingRestyles() r=bholley https://hg.mozilla.org/integration/autoland/rev/ab4766520512 stylo: Actually post a restyle event to the restyle manager on content state change. r=bholley
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Blocks: stylo-incremental
No longer blocks: stylo
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: