Closed Bug 1806273 Opened 1 year ago Closed 1 year ago

apply_declarations shouldn't just pass None as the originating_element_style

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: Oriol, Assigned: Oriol)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

In bug 1805898 I forgot to pass the style of the originating element when apply_declarations is used for a pseudo-element.

This prevents container units from working properly.

WebKit seems to have a similar problem.

They fail in Gecko and WebKit.

When apply_declarations is used for a pseudo-element, make it pass the
parent_style as the originating_element_style for container queries.

This requires changing some parameters from Option<&Arc<ComputedValues>>
to Option<&ComputedValues>.

It's not a complete solution, since e.g. parent_style is not the style
of the originating element of a ::backdrop. But here it's not as simple
as in D164908, so leaving these details for later.

Depends on D164976

This makes me a bit happier about the previous patch :)

Pushed by oriol-bugzilla@hotmail.com:
https://hg.mozilla.org/integration/autoland/rev/1cda45f38086
Add tests for container units in pseudo-elements. r=emilio
https://hg.mozilla.org/integration/autoland/rev/bcf35b173bde
Partial fix for container units in pseudo-elements. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/37615 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
Upstream PR merged by moz-wptsync-bot
Blocks: 1807645
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b99441011750
Avoid generic soup and extra reference count bumps. r=dshin
Depends on: 1807761
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/84cc269a53c1
Avoid generic soup and extra reference count bumps. r=dshin
Flags: needinfo?(emilio)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: