Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 371cab863ee8cb0010261fddb8e0435391fc4dbd
      
https://github.com/WebKit/WebKit/commit/371cab863ee8cb0010261fddb8e0435391fc4dbd
  Author: Brent Fulgham <bfulg...@apple.com>
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
    M Source/WebCore/animation/CSSPropertyAnimation.cpp
    M Source/WebCore/platform/graphics/FontDescription.h
    M Source/WebCore/platform/text/TextFlags.cpp
    M Source/WebCore/platform/text/TextFlags.h
    M Source/WebCore/rendering/style/RenderStyle.cpp
    M Source/WebCore/rendering/style/RenderStyle.h
    M Source/WebCore/rendering/style/RenderStyleInlines.h
    M Source/WebCore/style/StyleBuilderCustom.h

  Log Message:
  -----------
  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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to