Bug 218561 - REGRESSION (r257839): Miscomputed style due to computed 'rem' value in matched declaration cache
Summary: REGRESSION (r257839): Miscomputed style due to computed 'rem' value in matche...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-11-04 05:42 PST by Antti Koivisto
Modified: 2020-11-04 14:05 PST (History)
1 user (show)

See Also:


Attachments
patch (3.95 KB, patch)
2020-11-04 05:48 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2020-11-04 05:42:02 PST
Call to focus() causes computed style update for the element’s ancestor chain before the the document has otherwise been styled (using the shortcut mechanism introduced in r257839). This style, which uses ‘rem’ unit and so depends on root element font size, gets cached in MatchedDeclarationsCache. The root font size then changes but during the resulting style update we use this cached value, failing to re-resolve ‘rem’.
Comment 1 Antti Koivisto 2020-11-04 05:42:36 PST
<rdar://problem/70074191>
Comment 2 Antti Koivisto 2020-11-04 05:48:58 PST
Created attachment 413157 [details]
patch
Comment 3 EWS 2020-11-04 14:05:03 PST
Committed r269384: <https://trac.webkit.org/changeset/269384>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 413157 [details].