Closed Bug 1538589 Opened 2 years ago Closed 2 years ago

[css-pseudo] ::marker layout isn't updated after dynamic 'class' change

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: mats, Assigned: emilio)

References

Details

(Keywords: testcase)

Attachments

(1 file)

Follow-up from bug 205202 comment 43:

> ::: layout/base/RestyleManager.cpp
> @@ +2718,5 @@
> > +        !nsLayoutUtils::GetMarkerPseudo(aElement)) {
> > +      RefPtr<ComputedStyle> pseudoStyle =
> > +          aRestyleState.StyleSet().ProbePseudoElementStyle(
> > +              *aElement, PseudoStyleType::marker, styleFrame->Style());
> > +      if (pseudoStyle) {
> 
> The reason this doesn't work as you mentioned is because we're returning the
> cached style instead of computing it again.
> 
> So either make the marker pseudo uncacheable or, even better, pass the
> up-to-date parent style here. I think we shouldn't probe this all the time
> if the element wasn't restyled, so that needs a bit more work. Fine to leave
> as-is, I can fix as a followup.

Testcase:
https://bug205202.bmoattachments.org/attachment.cgi?id=9051388

Assignee: nobody → emilio
Flags: needinfo?(emilio)
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/52bda46586ef
Fix ::marker invalidation when we need to potentially insert a marker as a result of a style change. r=mats
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/16259 for changes under testing/web-platform/tests
You need to log in before you can comment on or make changes to this bug.