Closed
Bug 1344914
Opened 7 years ago
Closed 7 years ago
stylo: Why does ServoStyleSet::ResolveAnonymousBoxStyle not call GetContext?
Categories
(Core :: CSS Parsing and Computation, enhancement, P5)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: heycam)
References
Details
Attachments
(1 file)
It's directly calling NS_NewStyleContext, which skips some work GetContext does... Presumably this has to do with the broken fixup handling in GetContext; if so we might want to just fix that.
Flags: needinfo?(cam)
Assignee | ||
Comment 1•7 years ago
|
||
I don't know if it was trying to avoid calling into broken fixup handling deliberately. The fixup skipping stuff in nsStyleContext's constructor doesn't actually have any effect in stylo -- anything like that should be handled on the Servo side, to influence the ServoComputedValues object we get before sticking it in an nsStyleContext. So probably we could just call GetContext here.
Flags: needinfo?(cam)
Reporter | ||
Comment 2•7 years ago
|
||
> anything like that should be handled on the Servo side, to influence the
> ServoComputedValues object we get before sticking it in an nsStyleContext
Do we actually do that in this case? I don't see a mechanism for it....
Assignee | ||
Comment 3•7 years ago
|
||
No, I don't think we do. So I guess it's likely some form controls etc. are incorrectly blockifying their anonymous box children when display:grid/flex are specified on them.
Assignee | ||
Comment 4•7 years ago
|
||
Sorry, that's completely wrong. We do skip fixups for NAC roots, using the TElement::skip_root_and_item_based_display_fixup function to check whether to do it, rather than relying on the flags that are passed in.
Reporter | ||
Comment 5•7 years ago
|
||
> We do skip fixups for NAC roots
We actually skip it for all NAC, looks like. That doesn't seem right to me. We should be skipping it for NAC roots, and pseudo-elements, but probably not other NAC...
Flags: needinfo?(bobbyholley)
Comment 6•7 years ago
|
||
I'll defer to heycam on questions surrounding style fixup, which I don't know much about. However, I generally agree that this work should happen during the servo cacade and shouldn't live on nsStyleContext.
Flags: needinfo?(bobbyholley) → needinfo?(cam)
Updated•7 years ago
|
Priority: -- → P5
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Flags: needinfo?(cam)
Assignee | ||
Comment 8•7 years ago
|
||
(In reply to Boris Zbarsky [:bz] (still a bit busy) (if a patch has no decent message, automatic r-) from comment #5) > We actually skip it for all NAC, looks like. That doesn't seem right to me. > We should be skipping it for NAC roots, and pseudo-elements, but probably > not other NAC... I split that issue out into bug 1359303.
Reporter | ||
Comment 9•7 years ago
|
||
mozreview-review |
Comment on attachment 8861286 [details] Bug 1344914 - stylo: Stop pretending to handle style fixups on the C++ side. https://reviewboard.mozilla.org/r/133246/#review136338 r=me with the nits below fixed. ::: layout/style/nsStyleContext.cpp:130 (Diff revision 1) > PresContext()->PresShell()->StyleSet()->RootStyleContextAdded(); > } > > mSource.AsGeckoRuleNode()->SetUsedDirectly(); // before ApplyStyleFixups()! > - FinishConstruction(aSkipParentDisplayBasedStyleFixup); > + FinishConstruction(); > + ApplyStyleFixups(aSkipParentDisplayBasedStyleFixup); Header definition of ApplyStyleFixups should document that it's only called for Gecko style contexts. And the impl should assert that.
Attachment #8861286 -
Flags: review?(bzbarsky) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 12•7 years ago
|
||
Pushed by cmccormack@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0ec24df56cce stylo: Stop pretending to handle style fixups on the C++ side. r=bz
Comment 13•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/0ec24df56cce
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•7 years ago
|
status-firefox54:
affected → ---
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → cam
You need to log in
before you can comment on or make changes to this bug.
Description
•