Changeset 269384 in webkit
- Timestamp:
- Nov 4, 2020, 2:04:58 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/dom/focus-rem-style-update-expected.html (added)
-
LayoutTests/fast/dom/focus-rem-style-update.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/style/StyleTreeResolver.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r269383 r269384 1 2020-11-04 Antti Koivisto <antti@apple.com> 2 3 REGRESSION (r257839): Miscomputed style due to computed 'rem' value in matched declaration cache 4 https://bugs.webkit.org/show_bug.cgi?id=218561 5 <rdar://problem/70074191> 6 7 Reviewed by Zalan Bujtas. 8 9 * fast/dom/focus-rem-style-update-expected.html: Added. 10 * fast/dom/focus-rem-style-update.html: Added. 11 1 12 2020-11-04 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r269383 r269384 1 2020-11-04 Antti Koivisto <antti@apple.com> 2 3 REGRESSION (r257839): Miscomputed style due to computed 'rem' value in matched declaration cache 4 https://bugs.webkit.org/show_bug.cgi?id=218561 5 <rdar://problem/70074191> 6 7 Reviewed by Zalan Bujtas. 8 9 Test: fast/dom/focus-rem-style-update.html 10 11 Call to focus() causes computed style update for the element’s ancestor chain before the the document 12 has otherwise been styled (using the shortcut mechanism introduced in r257839). This style, which uses ‘rem’ 13 unit and so depends on root element font size, gets cached in MatchedDeclarationsCache. The root font size 14 then changes but during the resulting style update we use this cached value, failing to re-resolve ‘rem’. 15 16 * style/StyleTreeResolver.cpp: 17 (WebCore::Style::TreeResolver::resolveElement): 18 19 Invalidate matched declarations cache also when there is no existing document element style. 20 1 21 2020-11-04 Chris Dumez <cdumez@apple.com> 2 22 -
trunk/Source/WebCore/style/StyleTreeResolver.cpp
r268932 r269384 225 225 scope().resolver.setOverrideDocumentElementStyle(m_documentElementStyle.get()); 226 226 227 if ( update.change != Change::None && existingStyle &&existingStyle->computedFontPixelSize() != update.style->computedFontPixelSize()) {227 if (!existingStyle || existingStyle->computedFontPixelSize() != update.style->computedFontPixelSize()) { 228 228 // "rem" units are relative to the document element's font size so we need to recompute everything. 229 // In practice this is rare.230 229 scope().resolver.invalidateMatchedDeclarationsCache(); 231 230 descendantsToResolve = DescendantsToResolve::All;
Note:
See TracChangeset
for help on using the changeset viewer.