Changeset 271688 in webkit
- Timestamp:
- Jan 21, 2021 1:51:11 AM (18 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/css/letter-spacing-calc-with-font-relative-lengths-crash-expected.txt (added)
-
LayoutTests/fast/css/letter-spacing-calc-with-font-relative-lengths-crash.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/style/StyleBuilderCustom.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r271679 r271688 1 2021-01-21 Frederic Wang <fwang@igalia.com> 2 3 Update font when resolving letter-spacing: calc(...) values 4 https://bugs.webkit.org/show_bug.cgi?id=216659 5 6 Reviewed by Ryosuke Niwa. 7 8 * fast/css/letter-spacing-calc-with-font-relative-lengths-crash-expected.txt: Added. 9 * fast/css/letter-spacing-calc-with-font-relative-lengths-crash.html: Added. 10 1 11 2021-01-20 Kenneth Russell <kbr@chromium.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r271686 r271688 1 2021-01-21 Frederic Wang <fwang@igalia.com> 2 3 Update font when resolving letter-spacing: calc(...) values 4 https://bugs.webkit.org/show_bug.cgi?id=216659 5 6 Reviewed by Ryosuke Niwa. 7 8 In bug 176215, maybeUpdateFontForLetterSpacing was added to ensure a font is available for 9 resolution of letter-spacing values that rely on relative font lengths. However, this does 10 not take into account the case when these lengths are part of a calc expression. In order to 11 keep things simple, this patch unconditionally updates the font when letter-spacing is a 12 calc expression. 13 14 Test: fast/css/letter-spacing-calc-with-font-relative-lengths-crash.html 15 16 * style/StyleBuilderCustom.h: 17 (WebCore::Style::maybeUpdateFontForLetterSpacing): 18 1 19 2021-01-20 Yusuke Suzuki <ysuzuki@apple.com> 2 20 -
trunk/Source/WebCore/style/StyleBuilderCustom.h
r269957 r271688 655 655 // to only do work if the font is actually dirty. 656 656 657 if (is<CSSPrimitiveValue>(value) && downcast<CSSPrimitiveValue>(value).isFontRelativeLength()) 658 builderState.updateFont(); 657 if (is<CSSPrimitiveValue>(value)) { 658 auto& primitiveValue = downcast<CSSPrimitiveValue>(value); 659 if (primitiveValue.isFontRelativeLength() || primitiveValue.isCalculated()) 660 builderState.updateFont(); 661 } 659 662 } 660 663
Note: See TracChangeset
for help on using the changeset viewer.