Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b927d5607bfe96bb2008c8c70212ee8825f971cc
https://github.com/WebKit/WebKit/commit/b927d5607bfe96bb2008c8c70212ee8825f971cc
Author: Brent Fulgham <[email protected]>
Date: 2026-03-30 (Mon, 30 Mar 2026)
Changed paths:
M LayoutTests/TestExpectations
M Source/WebCore/css/CSSFontFace.cpp
M Source/WebCore/css/FontSelectionValueInlines.h
M Source/WebCore/platform/graphics/FontCascadeCache.h
M Source/WebCore/platform/graphics/FontDescription.cpp
M Source/WebCore/platform/graphics/FontDescription.h
M Source/WebCore/platform/graphics/FontSelectionAlgorithm.cpp
M Source/WebCore/platform/graphics/FontSelectionAlgorithm.h
M Source/WebCore/platform/graphics/cocoa/UnrealizedCoreTextFont.h
M Source/WebCore/platform/text/TextFlags.h
M Source/WebCore/style/StyleResolveForFont.cpp
M Source/WebCore/style/values/fonts/StyleFontStyle.cpp
M Source/WebCore/style/values/fonts/StyleFontStyle.h
M Source/WebCore/style/values/primitives/StylePrimitiveNumeric.h
Log Message:
-----------
Use a single tri-state member to distinguish between "normal", "italic" and
"oblique" font-style values
https://bugs.webkit.org/show_bug.cgi?id=187774
rdar://172702768
Reviewed by Vitor Roriz.
FontStyle used a two-state flag to represent normal, slnt, and italic font
style. The combination of slnt and an angle of 0 degrees was used to represent
'normal' fonts. This led to some incorrect font selection behavior since in
some cases this matched against oblique fonts.
After this change we no longer store m_fontStyleAxis individually, as it is
now part of m_fontSelectionRequest.
Tests:
imported/w3c/web-platform-tests/css/css-fonts/italic-oblique-fallback.html
* LayoutTests/TestExpectations:
* Source/WebCore/css/CSSFontFace.cpp:
(WebCore::calculateFontFaceStyleInfo):
(WebCore::CSSFontFace::setStyle):
(WebCore::calculateItalicRange): Deleted.
* Source/WebCore/css/FontSelectionValueInlines.h:
(WebCore::fontStyleKeyword):
* Source/WebCore/platform/graphics/FontCascadeCache.h:
(WebCore::FontDescriptionKey::makeFlagsKey):
* Source/WebCore/platform/graphics/FontDescription.cpp:
* Source/WebCore/platform/graphics/FontDescription.h:
(WebCore::FontDescription::fontStyleAxis const):
(WebCore::FontDescription::setFontStyleAxis):
* Source/WebCore/platform/graphics/FontSelectionAlgorithm.cpp:
(WebCore::FontSelectionAlgorithm::styleDistance const):
* Source/WebCore/platform/graphics/FontSelectionAlgorithm.h:
(WebCore::add):
(WebCore::FontSelectionSpecifiedCapabilities::computeFontSelectionCapabilities
const):
(WebCore::FontSelectionSpecifiedCapabilities::operator=):
* Source/WebCore/platform/graphics/cocoa/UnrealizedCoreTextFont.h:
* Source/WebCore/platform/text/TextFlags.h:
* Source/WebCore/style/StyleResolveForFont.cpp:
(WebCore::Style::fontStyleFromUnresolvedFontStyle):
* Source/WebCore/style/values/fonts/StyleFontStyle.cpp:
(WebCore::Style::CSSValueCreation<FontStyle>::operator):
(WebCore::Style::Blending<FontStyle>::canBlend):
* Source/WebCore/style/values/fonts/StyleFontStyle.h:
(WebCore::Style::FontStyle::FontStyle):
(WebCore::Style::FontStyle::isNormal const):
(WebCore::Style::FontStyle::isOblique const):
(WebCore::Style::FontStyle::switchOn const):
* Source/WebCore/style/values/primitives/StylePrimitiveNumeric.h:
(WebCore::Style::Angle::requires):
Canonical link: https://commits.webkit.org/310249@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications