Closed Bug 1865810 Opened 10 months ago Closed 10 months ago

[css-properties-values-api] getPropertyValue returns old value when iframe is resized

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

RESOLVED FIXED
122 Branch
Tracking Status
firefox122 --- fixed

People

(Reporter: zrhoffman, Assigned: zrhoffman)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Steps to reproduce:

• Make an iframe with width 200px, containing registered <length> custom property --my-property with initial value 50vw
• Observe that --my-property's computed value is 100px
• Use CSSOM to change the iframe's width to 300px
• Check --my-property's computed value again

Expected result: --my-property's computed value is 150px

Actual result: --my-property's computed value is 100px

See attached testcase.

WPT: https://wpt.fyi/results/css/css-properties-values-api/at-property-viewport-units-dynamic.html

Yeah, we need to track whether any custom property uses viewport units in its initial value, and either mark all elements with USES_VIEWPORT_UNITS or, most likely simpler, trigger a subtree recascade around here...

This will be useful later to check whether the registered property
initial values contained viewport units.

Assignee: nobody → zach
Status: NEW → ASSIGNED

If the initial values of custom property registrations contain viewport
units, changing the viewport will result in recomputing the initial
values.

Depends on D194667

Pushed by zach@zrhoffman.net: https://hg.mozilla.org/integration/autoland/rev/931685329b50 [css-properties-values-api] Keep track of flags that were set when computing initial values r=firefox-style-system-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/0cd5e7d76f8a [css-properties-values-api] Recompute initial values when viewport changes r=firefox-style-system-reviewers,emilio
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: