Closed
Bug 1472612
Opened 6 years ago
Closed 6 years ago
[wpt-sync] Sync PR 11748 - Disallow font-relative units when resolving var() for font-size.
Categories
(Core :: CSS Parsing and Computation, enhancement, P4)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: mozilla.org, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 11748 into mozilla-central (this bug is closed when the sync is complete). PR: https://github.com/web-platform-tests/wpt/pull/11748 Details from upstream follow. Anders Hartvoll Ruud <andruud@chromium.org> wrote: > Disallow font-relative units when resolving var() for font-size. > > For a registered custom property --foo, the following is no longer > allowed: > > --foo: 10em; > font-size: var(--foo); > > The same applies to ex and ch, as well as rem on the root element. > > This is because --foo depends on font-size via the 'em' unit, and > font-size depends on --foo via the var() reference. This creates a > circular dependency that must be resolved somehow. The agreed-upon way > to resolve that, has been by treating the whole var() reference as > invalid. > > This patch implements that cycle detection by adding flags to disallow > resolution of any var() references that contain font-relative units. > These flags are set in ResolveVariableReferences based on the > CSSPropertyID/StyleResolverState. > > When a custom property itself contains var() references, it needs to > "inherit" the font-unit-ness from the resolved variables (similar to > is_animation_tainted). This is why flags have also been added to Result. > > Bug: 848698 > Change-Id: Ife0570949d996c5fc26dc10b1d7ca15bd27343b1 > Reviewed-on: https://chromium-review.googlesource.com/1120334 > WPT-Export-Revision: 0d4b7851fec20178ca3527f2a6968b9d149ef4d8
Assignee | ||
Updated•6 years ago
|
Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Assignee | ||
Comment 1•6 years ago
|
||
Pushed to try https://treeherder.mozilla.org/#/jobs?repo=try&revision=75b5a117a253d0a9a6f1bf8d953f2d0336001154
Assignee | ||
Comment 2•6 years ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=b657696c0b584a85a8171b9a31a1bcfcab392e29
Assignee | ||
Comment 3•6 years ago
|
||
PR 11748 applied with additional changes from upstream: ac8b4953a09fa7e7d7490cea8af26ab88d061dcb, 4497a88542cd6e6e0dfd14742ebc0225bbae6fb3
Assignee | ||
Comment 4•6 years ago
|
||
Pushed to try https://treeherder.mozilla.org/#/jobs?repo=try&revision=4531373c89973db145218104f8206c1c89dcf20e
Assignee | ||
Comment 5•6 years ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=b678452c4b926da196b95f5e5921d293c67d1968
Assignee | ||
Comment 6•6 years ago
|
||
Ran 2 tests and 14 subtests OK : 2 FAIL : 14 New tests that have failures or other problems: /css/css-properties-values-api/registered-property-computation.html <length-percentage># values are computed correctly for divWithFontSizeInherited: FAIL <length-percentage># values are computed correctly for divWithFontSizeSet: FAIL <length># values are computed correctly for divWithFontSizeInherited: FAIL <length># values are computed correctly for divWithFontSizeSet: FAIL /css/css-properties-values-api/unit-cycles.html Untitled: FAIL
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/bc3bdaaee1f3 [wpt PR 11748] - Disallow font-relative units when resolving var() for font-size., a=testonly https://hg.mozilla.org/integration/mozilla-inbound/rev/fedf245d4ffe [wpt PR 11748] - Update wpt metadata, a=testonly
Comment 8•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/bc3bdaaee1f3 https://hg.mozilla.org/mozilla-central/rev/fedf245d4ffe
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•