-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid copying FontPalette and FontVariantAlternates
https://bugs.webkit.org/show_bug.cgi?id=273568 <rdar://problem/127380343> Reviewed by Chris Dumez. Reduce unnecessary copies in our font handling code: (1) FontPalette is a struct containing an enum and an AtomString, and should be returned by const reference to avoid copying that string. (2) FontVariantAlternates is lightweight, containing only a `Markable`, but the `Markable` is holding a very heavy-weight object that contains Vectors of Strings, and Strings. * Source/WebCore/css/CSSFontFace.h: * Source/WebCore/css/CSSFontFaceSet.cpp: (WebCore::CSSFontFaceSet::fontFace): * Source/WebCore/css/CSSFontFaceSet.h: * Source/WebCore/platform/graphics/FontDescription.h: (WebCore::FontDescription::variantAlternates const): (WebCore::FontDescription::fontPalette const): (WebCore::FontDescription::setVariantAlternates): (WebCore::FontDescription::setFontPalette): * Source/WebCore/platform/text/TextFlags.cpp: (WebCore::operator<<): * Source/WebCore/platform/text/TextFlags.h: * Source/WebCore/rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::setFontPalette): * Source/WebCore/rendering/style/RenderStyle.h: * Source/WebCore/rendering/style/RenderStyleInlines.h: (WebCore::RenderStyle::fontPalette const): * Source/WebCore/style/StyleBuilderCustom.h: (WebCore::Style::BuilderCustom::applyValueFontVariantAlternates): Canonical link: https://commits.webkit.org/278351@main
- Loading branch information
1 parent
0470d0f
commit 371cab8
Showing
8 changed files
with
17 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters