Closed
Bug 1388623
Opened 7 years ago
Closed 7 years ago
stylo: Continue cleaning up the traversal entry point machinery
Categories
(Core :: CSS Parsing and Computation, enhancement)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: bholley, Assigned: bholley)
References
Details
Attachments
(6 files)
2.48 KB,
patch
|
hiro
:
review+
|
Details | Diff | Splinter Review |
2.05 KB,
patch
|
emilio
:
review+
|
Details | Diff | Splinter Review |
2.58 KB,
patch
|
emilio
:
review+
|
Details | Diff | Splinter Review |
2.61 KB,
patch
|
emilio
:
review+
|
Details | Diff | Splinter Review |
2.72 KB,
patch
|
emilio
:
review+
|
Details | Diff | Splinter Review |
3.52 KB,
patch
|
Details | Diff | Splinter Review |
Getting back to this. I've got a few patches in the queue that I want to get into the tree. More to come. https://treeherder.mozilla.org/#/jobs?repo=try&revision=451f84d900f648804b3df4f8fd1425d7aff4bf4f
Assignee | ||
Comment 1•7 years ago
|
||
the PreTraverse stuff is all about ticking animations, which isn't something we want to do when we're trying to get styles synchronously in the frame constructor. MozReview-Commit-ID: L6lw4ef4Jdk
Attachment #8895220 -
Flags: review?(hikezoe)
Assignee | ||
Comment 2•7 years ago
|
||
I added this before PreTraverseSync existed, but that's really where it belongs. MozReview-Commit-ID: DZlcH70QbEt
Attachment #8895221 -
Flags: review?(emilio+bugs)
Assignee | ||
Comment 3•7 years ago
|
||
MozReview-Commit-ID: 3PzkUtEsa6p
Attachment #8895222 -
Flags: review?(emilio+bugs)
Assignee | ||
Comment 4•7 years ago
|
||
MozReview-Commit-ID: ETDL8KsInAn
Attachment #8895223 -
Flags: review?(emilio+bugs)
Assignee | ||
Comment 5•7 years ago
|
||
MozReview-Commit-ID: E4fqtsQtO9E
Attachment #8895224 -
Flags: review?(emilio+bugs)
Comment 6•7 years ago
|
||
Comment on attachment 8895220 [details] [diff] [review] Part 1 - Switch to PreTraverseSync for new-element styling. v1 Review of attachment 8895220 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for cleaning up! ::: layout/style/ServoStyleSet.cpp @@ +901,1 @@ > PreTraverse(); If I understand correctly about StyleNewlyBoundElement(), we can also skip the first animation only restyle here, that means we can drop this PreTraverse() call. No?
Attachment #8895220 -
Flags: review?(hikezoe) → review+
Updated•7 years ago
|
Attachment #8895221 -
Flags: review?(emilio+bugs) → review+
Updated•7 years ago
|
Attachment #8895222 -
Flags: review?(emilio+bugs) → review+
Comment 7•7 years ago
|
||
Comment on attachment 8895223 [details] [diff] [review] Part 4 - Be more careful about the flags we clear for forgetful traversals. v1 Review of attachment 8895223 [details] [diff] [review]: ----------------------------------------------------------------- r=me, but I'd really really prefer the functions to be renamed. Please do if it's not too much hassle. ::: servo/components/style/data.rs @@ +70,5 @@ > > /// Clear all the restyle state associated with this element. > + /// > + /// FIXME(bholley): The only caller of this should probably just assert that > + /// the hint is empty and call clear_flags_and_damage(). How? We use this to clear the data on the post-traversal, how should that assert that the hint is empty if you're clearing an explicit hint on a display: none subtree where we haven't processed it? @@ +86,1 @@ > fn clear_flags_and_damage(&mut self) { Maybe rename the functions to |clear_restyle_state| and |clear_restyle_flags_and_damage|? Otherwise it's confusing.
Attachment #8895223 -
Flags: review?(emilio+bugs) → review+
Comment 8•7 years ago
|
||
Comment on attachment 8895224 [details] [diff] [review] Part 5 - Use our new traversal flags to avoid doing post-traversal clearing of restyle state. v1 Review of attachment 8895224 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/style/ServoStyleSet.cpp @@ +383,1 @@ > if (Servo_TraverseSubtree(aRoot, mRawSet.get(), &snapshots, aFlags)) { I'd just write this as: postTraversalRequired |= Servo_TraverseSubtree(..); MOZ_ASSERT_IF(isInitial || forReconstruct, !postTraversalRequired); Or something like that. But your call.
Attachment #8895224 -
Flags: review?(emilio+bugs) → review+
Assignee | ||
Comment 9•7 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #6) > If I understand correctly about StyleNewlyBoundElement(), we can also skip > the first animation only restyle here, that means we can drop this > PreTraverse() call. No? Good catch!
Comment 10•7 years ago
|
||
(In reply to Emilio Cobos Álvarez [:emilio] from comment #7) > We use this to clear the data on the post-traversal, how should that assert > that the hint is empty if you're clearing an explicit hint on a display: > none subtree where we haven't processed it? Hm... I guess we shouldn't store the hint in the first place here. Did you just add the FIXME because you didn't try it? Or did you try it and it failed the assert?
Flags: needinfo?(bobbyholley)
Assignee | ||
Comment 11•7 years ago
|
||
(In reply to Emilio Cobos Álvarez [:emilio] from comment #7) > > @@ +86,1 @@ > > fn clear_flags_and_damage(&mut self) { > > Maybe rename the functions to |clear_restyle_state| and > |clear_restyle_flags_and_damage|? Otherwise it's confusing. Yeah good call. I'll do that. (In reply to Emilio Cobos Álvarez [:emilio] from comment #10) > (In reply to Emilio Cobos Álvarez [:emilio] from comment #7) > > We use this to clear the data on the post-traversal, how should that assert > > that the hint is empty if you're clearing an explicit hint on a display: > > none subtree where we haven't processed it? > > Hm... I guess we shouldn't store the hint in the first place here. Did you > just add the FIXME because you didn't try it? Or did you try it and it > failed the assert? Yeah I didn't have time to try it. Given that I need to do another try push anyway, I'll try it now.
Flags: needinfo?(bobbyholley)
Assignee | ||
Comment 12•7 years ago
|
||
(In reply to Emilio Cobos Álvarez [:emilio] from comment #8) > I'd just write this as: > > postTraversalRequired |= Servo_TraverseSubtree(..); > MOZ_ASSERT_IF(isInitial || forReconstruct, !postTraversalRequired); Yeah that's nicer, I'll do that. Try push without the change discussed in comment 11: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d19e1e623ff2eb21ce8dbc6260f72f0bcbfeccab I'll try the change in comment 11 next.
Assignee | ||
Comment 13•7 years ago
|
||
MozReview-Commit-ID: blYJzSxaRG
Attachment #8895441 -
Flags: review?(emilio+bugs)
Assignee | ||
Comment 14•7 years ago
|
||
Try push with part 6: https://treeherder.mozilla.org/#/jobs?repo=try&revision=0c61b5a134c88bfb7ca11e59de1756a1f1e5b9b9
Assignee | ||
Comment 15•7 years ago
|
||
Comment on attachment 8895441 [details] [diff] [review] Part 6 - Remove clear_restyle_state and assert against restyle hints left in the tree. v1 Hm, this is orange. I may poke at it, but doesn't need to block this bug.
Attachment #8895441 -
Flags: review?(emilio+bugs)
Comment 16•7 years ago
|
||
(In reply to Bobby Holley (:bholley) (busy with Stylo) from comment #15) > Comment on attachment 8895441 [details] [diff] [review] > Part 6 - Remove clear_restyle_state and assert against restyle hints left in > the tree. v1 > > Hm, this is orange. I may poke at it, but doesn't need to block this bug. Oh, sure, we don't consume non-animation hints during animation traversals, and vice-versa.
Comment 17•7 years ago
|
||
Pushed by bholley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/83319f6a69b2 Switch to PreTraverseSync for new-element styling. r=hiro https://hg.mozilla.org/integration/autoland/rev/2cad3133b6a6 Move the document-root-cache-priming into PreTraverseSync. r=emilio https://hg.mozilla.org/integration/autoland/rev/b452402234b6 Use our new traversal flags to avoid doing post-traversal clearing of restyle state. r=emilio
Assignee | ||
Comment 18•7 years ago
|
||
https://github.com/servo/servo/pull/18026
Comment 19•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/83319f6a69b2 https://hg.mozilla.org/mozilla-central/rev/2cad3133b6a6 https://hg.mozilla.org/mozilla-central/rev/b452402234b6
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•