Closed
Bug 1364871
Opened 8 years ago
Closed 8 years ago
stylo: Restyle ::-moz-list-bullet and ::-moz-list-number pseudo-elements (for nsBulletFrame)
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: xidorn, Assigned: emilio)
References
Details
Attachments
(4 files)
::-moz-list-bullet and ::-moz-list-number are for styling nsBulletFrame.
This is particular important because nsBulletFrame uses counter style, and counter style objects have manual lifetime management, and the objects are supposed to be released after style flush.
For not blocking @counter-style, we are going to leak the counter style objects for now. But we definitely want to fix it before we ship stylo.
Reporter | ||
Updated•8 years ago
|
Flags: needinfo?(emilio+bugs)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → emilio+bugs
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Reporter | ||
Comment 4•8 years ago
|
||
I'm not familiar with stuff in ServoRestyleManager.cpp, so it is probably better to ask bz or heycam to review this.
Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(emilio+bugs)
Attachment #8869607 -
Flags: review?(xidorn+moz) → review?(cam)
Assignee | ||
Updated•8 years ago
|
Attachment #8869608 -
Flags: review?(xidorn+moz) → review?(cam)
Assignee | ||
Comment 5•8 years ago
|
||
Comment on attachment 8869609 [details]
Bug 1364871: Restyle ::backdrop too.
Fair enough, thanks for letting me know Xidorn! :)
Attachment #8869609 -
Flags: review?(xidorn+moz) → review?(cam)
Reporter | ||
Comment 6•8 years ago
|
||
Could you also revert the workaround added in bug 1328319 part 9, and see if it stops crashing?
Assignee | ||
Comment 7•8 years ago
|
||
This try run is with the patches from bug 1366144 too, without the revert: https://treeherder.mozilla.org/#/jobs?repo=try&revision=490592187662557e393a677c2b159907592d4aa0
This is with the revert: https://treeherder.mozilla.org/#/jobs?repo=try&revision=48e8787259825ffb2e2be8e8b9dfcb123e5eebcc
Also, I was surprised about why there are no ::backdrop tests passing and all that, but I noticed that what we do for ::backdrop is completely wrong, so even though I think it's probably worth landing the commits, I opened bug 1366427 to fix that.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Reporter | ||
Comment 16•8 years ago
|
||
Also note that majority of tests of ::backdrop are in fullscreen tests in dom/html/test/test_fullscreen-api.html
Comment 17•8 years ago
|
||
mozreview-review |
Comment on attachment 8869607 [details]
Bug 1364871: Factor out some code from UpdateStyleOfChildAnonBox into UpdateStyleOfOwnedChildFrame.
https://reviewboard.mozilla.org/r/141196/#review144824
::: layout/generic/nsIFrame.h:3270
(Diff revision 3)
> + // A helper both for UpdateStyleOfChildAnonBox, and to update frame-backed
> + // pseudo-elements in ServoRestyleManager.
> + //
> + // This gets a style context that will be the new style context for
> + // `aChildFrame`, and takes care of updating it, calling CalcStyleDifference,
> + // and add to the change list as appropriate.
s/add/adding/
Attachment #8869607 -
Flags: review?(cam) → review+
Comment 18•8 years ago
|
||
mozreview-review |
Comment on attachment 8869608 [details]
Bug 1364871: Add a function to update frame pseudo-element styles during the post-traversal, and restyle bullet frames.
https://reviewboard.mozilla.org/r/141198/#review144826
Attachment #8869608 -
Flags: review?(cam) → review+
Comment 19•8 years ago
|
||
mozreview-review |
Comment on attachment 8869609 [details]
Bug 1364871: Restyle ::backdrop too.
https://reviewboard.mozilla.org/r/141200/#review144828
::: layout/base/ServoRestyleManager.cpp:244
(Diff revision 3)
> + MOZ_ASSERT(backdropPlaceholder->IsPlaceholderFrame());
> + nsIFrame* backdropFrame =
> + nsPlaceholderFrame::GetRealFrameForPlaceholder(backdropPlaceholder);
> + MOZ_ASSERT(backdropFrame->IsBackdropFrame());
> + MOZ_ASSERT(backdropFrame->StyleContext()->GetPseudoType() ==
> + CSSPseudoElementType::backdrop);
The UA style sheet rule that makes the ::backdrop frame position:fixed isn't !important, so content can override it back to position:static, in which case you won't have a placeholder frame, I think.
Comment 20•8 years ago
|
||
mozreview-review |
Comment on attachment 8869655 [details]
Bug 1364871: Revert workaround added in bug 1328319.
https://reviewboard.mozilla.org/r/141242/#review144830
Attachment #8869655 -
Flags: review?(cam) → review+
Reporter | ||
Comment 21•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8869609 [details]
Bug 1364871: Restyle ::backdrop too.
https://reviewboard.mozilla.org/r/141200/#review144828
> The UA style sheet rule that makes the ::backdrop frame position:fixed isn't !important, so content can override it back to position:static, in which case you won't have a placeholder frame, I think.
You'll always have a placeholder frame. `position` of an element in top layer (including `::backdrop` pseudo-element) must either be `fixed` or `absolute`, and any other value needs to be computed to `absolute`.
This logic can be found here: https://dxr.mozilla.org/mozilla-central/rev/8d60d0f825110cfb646ac31dc16dc011708bcf34/layout/style/nsRuleNode.cpp#6107-6116
I guess we probably haven't implemented it for Stylo? That would be a problem... And I suspect we don't have test coverage for this, which is definitely my fault :/
Assignee | ||
Comment 22•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8869609 [details]
Bug 1364871: Restyle ::backdrop too.
https://reviewboard.mozilla.org/r/141200/#review144828
> You'll always have a placeholder frame. `position` of an element in top layer (including `::backdrop` pseudo-element) must either be `fixed` or `absolute`, and any other value needs to be computed to `absolute`.
>
> This logic can be found here: https://dxr.mozilla.org/mozilla-central/rev/8d60d0f825110cfb646ac31dc16dc011708bcf34/layout/style/nsRuleNode.cpp#6107-6116
>
> I guess we probably haven't implemented it for Stylo? That would be a problem... And I suspect we don't have test coverage for this, which is definitely my fault :/
Yes, we do implement that: http://searchfox.org/mozilla-central/rev/02cae69058d41e2c6b635edccbec91a6ca2cb57f/servo/components/style/style_adjuster.rs#36
Comment 23•8 years ago
|
||
mozreview-review |
Comment on attachment 8869609 [details]
Bug 1364871: Restyle ::backdrop too.
https://reviewboard.mozilla.org/r/141200/#review144836
OK, great. :-)
Attachment #8869609 -
Flags: review?(cam) → review+
Reporter | ||
Comment 24•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8869609 [details]
Bug 1364871: Restyle ::backdrop too.
https://reviewboard.mozilla.org/r/141200/#review144828
> Yes, we do implement that: http://searchfox.org/mozilla-central/rev/02cae69058d41e2c6b635edccbec91a6ca2cb57f/servo/components/style/style_adjuster.rs#36
Oh, that's great.
I don't really like the name `out_of_flow_positioned`, though... Floated elements are out-of-flow as well, but it seems they are not included here... In Gecko, `absolute` and `fixed` are called "absoluted-positioned".
Reporter | ||
Comment 25•8 years ago
|
||
I mean, absolutely-positioned :)
Assignee | ||
Comment 26•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8869609 [details]
Bug 1364871: Restyle ::backdrop too.
https://reviewboard.mozilla.org/r/141200/#review144828
> Oh, that's great.
>
> I don't really like the name `out_of_flow_positioned`, though... Floated elements are out-of-flow as well, but it seems they are not included here... In Gecko, `absolute` and `fixed` are called "absoluted-positioned".
I don't think that's particularly clearer personally :).
I like the distinction of `out_of_flow_positioned` and `floated`. If we needed it (for style adjustment I think we don't), we could have a `floated_or_out_of_flow_positioned` or just `out_of_flow`, I guess.
Anyway, happy to bikeshed about the name if you want :P
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 31•8 years ago
|
||
I moved the backdrop bits to another function, and added comments there re. the placeholder style.
Comment 32•8 years ago
|
||
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/8036f4516e0c
Factor out some code from UpdateStyleOfChildAnonBox into UpdateStyleOfOwnedChildFrame. r=heycam
https://hg.mozilla.org/integration/autoland/rev/09851f5d647e
Add a function to update frame pseudo-element styles during the post-traversal, and restyle bullet frames. r=heycam
https://hg.mozilla.org/integration/autoland/rev/ca5ce34ad1cf
Restyle ::backdrop too. r=heycam
https://hg.mozilla.org/integration/autoland/rev/9885206e1a48
Revert workaround added in bug 1328319. r=heycam
Comment 33•8 years ago
|
||
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/52caa4cf1618
Update expectations. r=me
Comment 34•8 years ago
|
||
backout bugherder |
Comment 35•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8036f4516e0c
https://hg.mozilla.org/mozilla-central/rev/09851f5d647e
https://hg.mozilla.org/mozilla-central/rev/ca5ce34ad1cf
https://hg.mozilla.org/mozilla-central/rev/52caa4cf1618
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•