[css-properties-values-api] getPropertyValue returns old value when iframe is resized
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
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
Comment 1•1 year ago
•
|
||
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...
Assignee | ||
Comment 2•1 year ago
|
||
This will be useful later to check whether the registered property
initial values contained viewport units.
Updated•1 year ago
|
Assignee | ||
Comment 3•1 year ago
|
||
If the initial values of custom property registrations contain viewport
units, changing the viewport will result in recomputing the initial
values.
Depends on D194667
Comment 5•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/931685329b50
https://hg.mozilla.org/mozilla-central/rev/0cd5e7d76f8a
Description
•