Reduce copying of FontCascadeDescription objects by moving them around
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 May 2018 00:25:23 +0000 (00:25 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 May 2018 00:25:23 +0000 (00:25 +0000)
commitd706787c287f0b1ea2d6a7bb96619f5a3c4add4b
tree3825a39e131cc845632ab3e8331cbd2098da53e1
parent06907ba1dce079c18e5deacf1e141096cf34b325
Reduce copying of FontCascadeDescription objects by moving them around
https://bugs.webkit.org/show_bug.cgi?id=185963

Reviewed by Simon Fraser.

Reduce copying of FontCascadeDescription objects by moving them around when possible.

Source/WebCore:

* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueWebkitLocale):
(WebCore::StyleBuilderCustom::applyInitialFontFamily):
(WebCore::StyleBuilderCustom::applyInheritFontFamily):
(WebCore::StyleBuilderCustom::applyValueFontFamily):
(WebCore::StyleBuilderCustom::applyInheritFontVariantLigatures):
(WebCore::StyleBuilderCustom::applyInitialFontVariantLigatures):
(WebCore::StyleBuilderCustom::applyValueFontVariantLigatures):
(WebCore::StyleBuilderCustom::applyInheritFontVariantNumeric):
(WebCore::StyleBuilderCustom::applyInitialFontVariantNumeric):
(WebCore::StyleBuilderCustom::applyValueFontVariantNumeric):
(WebCore::StyleBuilderCustom::applyInheritFontVariantEastAsian):
(WebCore::StyleBuilderCustom::applyInitialFontVariantEastAsian):
(WebCore::StyleBuilderCustom::applyValueFontVariantEastAsian):
(WebCore::StyleBuilderCustom::applyInitialFontSize):
(WebCore::StyleBuilderCustom::applyInheritFontSize):
(WebCore::StyleBuilderCustom::applyInitialFontStyle):
(WebCore::StyleBuilderCustom::applyInheritFontStyle):
(WebCore::StyleBuilderCustom::applyValueFontStyle):
(WebCore::StyleBuilderCustom::applyValueFontSize):
* css/StyleResolver.cpp:
(WebCore::checkForOrientationChange):
(WebCore::StyleResolver::checkForTextSizeAdjust):
(WebCore::StyleResolver::checkForZoomChange):
(WebCore::StyleResolver::checkForGenericFamilyChange):
(WebCore::StyleResolver::initializeFontStyle):
* css/StyleResolver.h:
(WebCore::StyleResolver::State::setFontDescription):
(WebCore::StyleResolver::setFontDescription):
* css/makeprop.pl:
(generateInitialValueSetter):
(generateInheritValueSetter):
(generateValueSetter):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::setFont):
* page/DebugPageOverlays.cpp:
(WebCore::NonFastScrollableRegionOverlay::drawRect):
* page/linux/ResourceUsageOverlayLinux.cpp:
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::FontCascade):
* platform/graphics/FontCascade.h:
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::drawTextAtPoint const):
* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::drawText):
* platform/win/DragImageWin.cpp:
(WebCore::dragLabelFont):
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::calculatePositionAndSize):
(WebCore::PopupMenuWin::paint):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineTextIfNeeded):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::getReplacementTextGeometry const):
* rendering/RenderListBox.cpp:
(WebCore::bolder):
(WebCore::RenderListBox::paintItemForeground):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::computeMarkerStyle const):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::setFontFromControlSize const):
* rendering/TextAutoSizing.cpp:
(WebCore::TextAutoSizingValue::adjustTextNodeSizes):
(WebCore::TextAutoSizingValue::reset):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setFontDescription):
(WebCore::RenderStyle::setFontSize):
(WebCore::RenderStyle::setFontVariationSettings):
(WebCore::RenderStyle::setFontWeight):
(WebCore::RenderStyle::setFontStretch):
(WebCore::RenderStyle::setFontItalic):
* rendering/style/RenderStyle.h:
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
* rendering/updating/RenderTreeBuilderFirstLetter.cpp:
(WebCore::styleForFirstLetter):
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):

Source/WebKitLegacy/win:

* FullscreenVideoController.cpp:
(FullscreenVideoController::draw):

Tools:

* TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:
(TestWebKitAPI::TEST_F):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
31 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/StyleBuilderCustom.h
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/StyleResolver.h
Source/WebCore/css/makeprop.pl
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/page/DebugPageOverlays.cpp
Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp
Source/WebCore/platform/graphics/FontCascade.cpp
Source/WebCore/platform/graphics/FontCascade.h
Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp
Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp
Source/WebCore/platform/win/DragImageWin.cpp
Source/WebCore/platform/win/PopupMenuWin.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderCombineText.cpp
Source/WebCore/rendering/RenderEmbeddedObject.cpp
Source/WebCore/rendering/RenderListBox.cpp
Source/WebCore/rendering/RenderListItem.cpp
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebCore/rendering/TextAutoSizing.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/svg/RenderSVGInlineText.cpp
Source/WebCore/rendering/updating/RenderTreeBuilderFirstLetter.cpp
Source/WebCore/style/StyleResolveForDocument.cpp
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/FullscreenVideoController.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp