[webkit-changes] [WebKit/WebKit] 2f42ba: [CSS Fonts] Implement two-value syntax of font-siz...
ChangSeok Oh
noreply at github.com
Wed Mar 29 22:07:08 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2f42bab7265555901c27c9dbe5cef0b0c341ff14
https://github.com/WebKit/WebKit/commit/2f42bab7265555901c27c9dbe5cef0b0c341ff14
Author: ChangSeok Oh <changseok at webkit.org>
Date: 2023-03-29 (Wed, 29 Mar 2023)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/http/tests/incremental/stylesheet-body-incremental-rendering.html
M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/layer-counter-style-override-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/animations/font-size-adjust-interpolation-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-size-adjust-computed-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-size-adjust-valid-expected.txt
M LayoutTests/platform/glib/TestExpectations
A LayoutTests/platform/mac-ventura-wk2/imported/w3c/web-platform-tests/css/css-cascade/layer-counter-style-override-expected.txt
M Source/WebCore/Headers.cmake
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/animation/CSSPropertyAnimation.cpp
M Source/WebCore/css/CSSPrimitiveValueMappings.h
M Source/WebCore/css/CSSProperties.json
M Source/WebCore/css/CSSValueKeywords.in
M Source/WebCore/css/ComputedStyleExtractor.cpp
M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
M Source/WebCore/css/parser/CSSPropertyParserHelpers.h
M Source/WebCore/platform/graphics/FontCascadeCache.h
M Source/WebCore/platform/graphics/FontCascadeDescription.cpp
M Source/WebCore/platform/graphics/FontCascadeDescription.h
M Source/WebCore/platform/graphics/FontDescription.h
M Source/WebCore/platform/graphics/FontPlatformData.cpp
M Source/WebCore/platform/graphics/FontPlatformData.h
A Source/WebCore/platform/graphics/FontSizeAdjust.h
M Source/WebCore/rendering/style/RenderStyle.cpp
M Source/WebCore/rendering/style/RenderStyle.h
M Source/WebCore/style/StyleBuilderConverter.h
M Source/WebCore/style/StyleBuilderCustom.h
M Source/WebCore/style/StyleFontSizeFunctions.cpp
M Source/WebCore/style/StyleFontSizeFunctions.h
Log Message:
-----------
[CSS Fonts] Implement two-value syntax of font-size-adjust
https://bugs.webkit.org/show_bug.cgi?id=254191
Reviewed by Myles C. Maxfield.
This change implements the two-value syntax of font-size-adjust specified in
the CSS Fonts Module Level 5 [1]. Five new font metrics: ex-height, cap-height
ch-width, ic-width and ic-height, are added, which clarify what font metric the
given value is for.
This change does not handle the CSS animation support and the 'from-font' value.
Follow-up patches will cover them.
Test:
imported/w3c/web-platform-tests/css/css-fonts/font-size-adjust-009.html
imported/w3c/web-platform-tests/css/css-fonts/font-size-adjust-010.html
imported/w3c/web-platform-tests/css/css-fonts/font-size-adjust-011.html
[1] https://www.w3.org/TR/css-fonts-5/#font-size-adjust-prop
* LayoutTests/TestExpectations:
* LayoutTests/http/tests/incremental/stylesheet-body-incremental-rendering.html:
Modified to deterministically measure repainted regions caused by style changes.
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/layer-counter-style-override-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/animations/font-size-adjust-interpolation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-size-adjust-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-size-adjust-valid-expected.txt:
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/mac-ventura-wk2/imported/w3c/web-platform-tests/css/css-cascade/layer-counter-style-override-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/layer-counter-style-override-expected.txt.
* Source/WebCore/Headers.cmake:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/animation/CSSPropertyAnimation.cpp:
* Source/WebCore/css/CSSPrimitiveValueMappings.h:
(WebCore::toCSSValueID):
(WebCore::fromCSSValueID):
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/CSSValueKeywords.in:
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::fontSizeAdjustFromStyle):
(WebCore::fontShorthandValue):
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeFontSizeAdjust):
* Source/WebCore/css/parser/CSSPropertyParserHelpers.h:
* Source/WebCore/platform/graphics/FontCascadeCache.h:
(WebCore::FontDescriptionKeyRareData::create):
(WebCore::FontDescriptionKeyRareData::fontSizeAdjust const):
(WebCore::FontDescriptionKeyRareData::FontDescriptionKeyRareData):
(WebCore::FontDescriptionKey::FontDescriptionKey):
* Source/WebCore/platform/graphics/FontCascadeDescription.cpp:
* Source/WebCore/platform/graphics/FontCascadeDescription.h:
(WebCore::FontCascadeDescription::initialFontSizeAdjust):
* Source/WebCore/platform/graphics/FontDescription.h:
(WebCore::FontDescription::italic const):
(WebCore::FontDescription::fontSizeAdjust const):
(WebCore::FontDescription::setComputedSize):
(WebCore::FontDescription::setFontSizeAdjust):
(WebCore::FontDescription::decode):
(WebCore::FloatMarkableTraits::isEmptyValue): Deleted.
(WebCore::FloatMarkableTraits::emptyValue): Deleted.
* Source/WebCore/platform/graphics/FontPlatformData.cpp:
(WebCore::FontPlatformData::updateSizeWithFontSizeAdjust):
* Source/WebCore/platform/graphics/FontPlatformData.h:
* Source/WebCore/platform/graphics/FontSizeAdjust.h: Added.
(WebCore::FloatMarkableTraits::isEmptyValue):
(WebCore::FloatMarkableTraits::emptyValue):
(WebCore::FontSizeAdjust::operator== const):
(WebCore::FontSizeAdjust::operator!= const):
(WebCore::add):
(WebCore::operator<<):
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setFontSizeAdjust):
* Source/WebCore/rendering/style/RenderStyle.h:
(WebCore::RenderStyle::fontSizeAdjust const):
* Source/WebCore/style/StyleBuilderConverter.h:
(WebCore::Style::BuilderConverter::convertFontSizeAdjust):
* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyValueFontSizeAdjust):
* Source/WebCore/style/StyleFontSizeFunctions.cpp:
(WebCore::Style::adjustedFontSize):
* Source/WebCore/style/StyleFontSizeFunctions.h:
Canonical link: https://commits.webkit.org/262309@main
More information about the webkit-changes
mailing list