Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e3afdb45b846457e5ae8d7b9a8e506fccf8f5cdd
https://github.com/WebKit/WebKit/commit/e3afdb45b846457e5ae8d7b9a8e506fccf8f5cdd
Author: Yusuke Suzuki <[email protected]>
Date: 2024-03-21 (Thu, 21 Mar 2024)
Changed paths:
M Source/WTF/WTF.xcodeproj/project.pbxproj
M Source/WTF/wtf/CMakeLists.txt
A Source/WTF/wtf/text/CharacterProperties.h
M Source/WTF/wtf/text/StringCommon.h
M Source/WebCore/Headers.cmake
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp
M Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp
M Source/WebCore/platform/graphics/ComplexTextController.cpp
M Source/WebCore/platform/graphics/Font.cpp
M Source/WebCore/platform/graphics/FontCascade.cpp
M Source/WebCore/platform/graphics/FontCascade.h
M Source/WebCore/platform/graphics/FontRanges.cpp
M Source/WebCore/platform/graphics/GlyphPage.h
M Source/WebCore/platform/graphics/WidthIterator.cpp
M Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
M Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp
M Source/WebCore/platform/graphics/freetype/FontSetCache.cpp
M Source/WebCore/platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp
M Source/WebCore/platform/graphics/skia/FontCacheSkia.cpp
M Source/WebCore/platform/graphics/skia/FontCascadeSkia.cpp
R Source/WebCore/platform/text/CharacterProperties.h
M Source/WebCore/rendering/RenderText.cpp
M Tools/TestWebKitAPI/CMakeLists.txt
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A Tools/TestWebKitAPI/Tests/WTF/CharacterProperties.cpp
Log Message:
-----------
Use BitSet for canUseSimplifiedTextMeasuring
https://bugs.webkit.org/show_bug.cgi?id=271347
rdar://125124560
Reviewed by Antti Koivisto.
This patch adds canUseSimplifiedTextMeasuringForNormalVariantCache BitSet cache
in FontCascade
so that we do not need to query to GlyphData multiple times to obtain
information about canUseSimplifiedTextMeasuring for Latin-1 characters.
Since this is stored in FontCascade, we can continue using this cache even
beyond multiple different RenderText. Furthermore, we apply using
this function in TextUtil::width etc.
We also move CharacterProperties.h to WTF, and adding Latin-1 fast path to make
caching condition clear and querying function fast
(isEmojiWithPresentationByDefault).
* Source/WTF/WTF.xcodeproj/project.pbxproj:
* Source/WTF/wtf/CMakeLists.txt:
* Source/WTF/wtf/text/CharacterProperties.h: Renamed from
Source/WebCore/platform/text/CharacterProperties.h.
(WTF::isEmojiGroupCandidate):
(WTF::isEmojiFitzpatrickModifier):
(WTF::isVariationSelector):
(WTF::isEmojiKeycapBase):
(WTF::isEmojiRegionalIndicator):
(WTF::isEmojiWithPresentationByDefault):
(WTF::isEmojiModifierBase):
(WTF::isDefaultIgnorableCodePoint):
(WTF::isControlCharacter):
(WTF::isPrivateUseAreaCharacter):
* Source/WTF/wtf/text/StringCommon.h:
(WTF::isLatin1):
* Source/WebCore/Headers.cmake:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::canUseSimplifiedTextMeasuringForCharacters):
* Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::canUseSimplifiedTextMeasuringForCharacters):
* Source/WebCore/platform/graphics/ComplexTextController.cpp:
* Source/WebCore/platform/graphics/Font.cpp:
* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::canUseSimplifiedTextMeasuring const):
* Source/WebCore/platform/graphics/FontCascade.h:
* Source/WebCore/platform/graphics/FontRanges.cpp:
* Source/WebCore/platform/graphics/GlyphPage.h:
(WebCore::GlyphPage::create): Deleted.
(WebCore::GlyphPage::~GlyphPage): Deleted.
(WebCore::GlyphPage::count): Deleted.
(WebCore::GlyphPage::sizeForPageNumber): Deleted.
(WebCore::GlyphPage::indexForCodePoint): Deleted.
(WebCore::GlyphPage::pageNumberForCodePoint): Deleted.
(WebCore::GlyphPage::startingCodePointInPageNumber): Deleted.
(WebCore::GlyphPage::pageNumberIsUsedForArabic): Deleted.
(WebCore::GlyphPage::glyphDataForCharacter const): Deleted.
(WebCore::GlyphPage::glyphForCharacter const): Deleted.
(WebCore::GlyphPage::glyphDataForIndex const): Deleted.
(WebCore::GlyphPage::glyphForIndex const): Deleted.
(WebCore::GlyphPage::colorGlyphTypeForIndex const): Deleted.
(WebCore::GlyphPage::setGlyphForIndex): Deleted.
(WebCore::GlyphPage::font const): Deleted.
(WebCore::GlyphPage::GlyphPage): Deleted.
* Source/WebCore/platform/graphics/WidthIterator.cpp:
* Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
* Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp:
(WebCore::FontCascade::resolveEmojiPolicy):
* Source/WebCore/platform/graphics/freetype/FontSetCache.cpp:
* Source/WebCore/platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:
* Source/WebCore/platform/graphics/skia/FontCacheSkia.cpp:
* Source/WebCore/platform/graphics/skia/FontCascadeSkia.cpp:
* Source/WebCore/rendering/RenderText.cpp:
(WebCore::RenderText::initiateFontLoadingByAccessingGlyphDataAndComputeCanUseSimplifiedTextMeasuring):
* Tools/TestWebKitAPI/CMakeLists.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WTF/CharacterProperties.cpp: Added.
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/276466@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes