-
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.
Rename widthForSimpleText, floatWidthForSimpleText, floatWidthForComp…
…lexText https://bugs.webkit.org/show_bug.cgi?id=271729 rdar://problem/125440731 Reviewed by Alan Baradlay. We currently have 3 functions for width calculation named: 1. widthForSimpleText 2. floatWidthForSimpleText 3. floatWidthForComplexText These functions all do something similar but their names are a bit confusing, specially by the different meanings of the word "simple" here. They scale in level of complexity: 1. widthForSimpleText: does not use any width iterator, but has to pass "computeCanUseSimplifiedTextMeasuring" to be used. 2. floatWidthForSimpleText: It is used when we have a CodePath::Simple (calculated on FontCascade). It uses iterator WidthIterator 3. floatWidthForComplexText: It is used when we have a CodePath::Complex (calculated on FontCascade). It uses the ComplexTextControler, a more complete and slower iterator (supports kerning and ligaments, for example, which are currently not supported by WidthIterator). We are renaming them to: 1. widthForSimpleText -> widthForTextUsingSimplifiedMeasuring 2. floatWidthForSimpleText -> widthForTextUsingWidthIterator 3. floatWidthForComplexText -> floatWidthForTextUsingComplexTextController * Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp: (WebCore::Layout::TextUtil::width): * Source/WebCore/platform/graphics/FontCascade.cpp: (WebCore::FontCascade::width const): (WebCore::FontCascade::widthForTextUsingWidthIterator const): (WebCore::FontCascade::widthForTextUsingComplexTextController const): (WebCore::FontCascade::offsetForPositionForSimpleText const): (WebCore::FontCascade::floatWidthForSimpleText const): Deleted. (WebCore::FontCascade::floatWidthForComplexText const): Deleted. * Source/WebCore/platform/graphics/FontCascade.h: (WebCore::FontCascade::widthForTextUsingSimplifiedMeasuring const): (WebCore::FontCascade::widthForSimpleText const): Deleted. * Source/WebCore/platform/graphics/WidthIterator.cpp: (WebCore::WidthIterator::advanceInternal): * Tools/TestWebKitAPI/Tests/WebCore/MonospaceFontTests.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/276716@main
- Loading branch information
1 parent
bee5958
commit 31aadb0
Showing
5 changed files
with
13 additions
and
13 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