Changeset 269798 in webkit
- Timestamp:
- Nov 13, 2020, 2:17:34 PM (6 years ago)
- Location:
- branches/safari-610-branch
- 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
-
branches/safari-610-branch/LayoutTests/ChangeLog
r269795 r269798 1 2020-11-13 Russell Epstein <repstein@apple.com> 2 3 Cherry-pick r269384. rdar://problem/71381924 4 5 REGRESSION (r257839): Miscomputed style due to computed 'rem' value in matched declaration cache 6 https://bugs.webkit.org/show_bug.cgi?id=218561 7 <rdar://problem/70074191> 8 9 Reviewed by Zalan Bujtas. 10 11 Source/WebCore: 12 13 Test: fast/dom/focus-rem-style-update.html 14 15 Call to focus() causes computed style update for the element’s ancestor chain before the the document 16 has otherwise been styled (using the shortcut mechanism introduced in r257839). This style, which uses ‘rem’ 17 unit and so depends on root element font size, gets cached in MatchedDeclarationsCache. The root font size 18 then changes but during the resulting style update we use this cached value, failing to re-resolve ‘rem’. 19 20 * style/StyleTreeResolver.cpp: 21 (WebCore::Style::TreeResolver::resolveElement): 22 23 Invalidate matched declarations cache also when there is no existing document element style. 24 25 LayoutTests: 26 27 * fast/dom/focus-rem-style-update-expected.html: Added. 28 * fast/dom/focus-rem-style-update.html: Added. 29 30 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269384 268f45cc-cd09-0410-ab3c-d52691b4dbfc 31 32 2020-11-04 Antti Koivisto <antti@apple.com> 33 34 REGRESSION (r257839): Miscomputed style due to computed 'rem' value in matched declaration cache 35 https://bugs.webkit.org/show_bug.cgi?id=218561 36 <rdar://problem/70074191> 37 38 Reviewed by Zalan Bujtas. 39 40 * fast/dom/focus-rem-style-update-expected.html: Added. 41 * fast/dom/focus-rem-style-update.html: Added. 42 1 43 2020-11-13 Russell Epstein <repstein@apple.com> 2 44 -
branches/safari-610-branch/Source/WebCore/ChangeLog
r269797 r269798 1 2020-11-13 Russell Epstein <repstein@apple.com> 2 3 Cherry-pick r269384. rdar://problem/71381924 4 5 REGRESSION (r257839): Miscomputed style due to computed 'rem' value in matched declaration cache 6 https://bugs.webkit.org/show_bug.cgi?id=218561 7 <rdar://problem/70074191> 8 9 Reviewed by Zalan Bujtas. 10 11 Source/WebCore: 12 13 Test: fast/dom/focus-rem-style-update.html 14 15 Call to focus() causes computed style update for the element’s ancestor chain before the the document 16 has otherwise been styled (using the shortcut mechanism introduced in r257839). This style, which uses ‘rem’ 17 unit and so depends on root element font size, gets cached in MatchedDeclarationsCache. The root font size 18 then changes but during the resulting style update we use this cached value, failing to re-resolve ‘rem’. 19 20 * style/StyleTreeResolver.cpp: 21 (WebCore::Style::TreeResolver::resolveElement): 22 23 Invalidate matched declarations cache also when there is no existing document element style. 24 25 LayoutTests: 26 27 * fast/dom/focus-rem-style-update-expected.html: Added. 28 * fast/dom/focus-rem-style-update.html: Added. 29 30 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269384 268f45cc-cd09-0410-ab3c-d52691b4dbfc 31 32 2020-11-04 Antti Koivisto <antti@apple.com> 33 34 REGRESSION (r257839): Miscomputed style due to computed 'rem' value in matched declaration cache 35 https://bugs.webkit.org/show_bug.cgi?id=218561 36 <rdar://problem/70074191> 37 38 Reviewed by Zalan Bujtas. 39 40 Test: fast/dom/focus-rem-style-update.html 41 42 Call to focus() causes computed style update for the element’s ancestor chain before the the document 43 has otherwise been styled (using the shortcut mechanism introduced in r257839). This style, which uses ‘rem’ 44 unit and so depends on root element font size, gets cached in MatchedDeclarationsCache. The root font size 45 then changes but during the resulting style update we use this cached value, failing to re-resolve ‘rem’. 46 47 * style/StyleTreeResolver.cpp: 48 (WebCore::Style::TreeResolver::resolveElement): 49 50 Invalidate matched declarations cache also when there is no existing document element style. 51 1 52 2020-11-13 Russell Epstein <repstein@apple.com> 2 53 -
branches/safari-610-branch/Source/WebCore/style/StyleTreeResolver.cpp
r266880 r269798 225 225 scope().resolver.setOverrideDocumentElementStyle(m_documentElementStyle.get()); 226 226 227 if ( update.change != NoChange && 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.