-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename widthForSimpleText, floatWidthForSimpleText, floatWidthForComplexText #26483
Merged
webkit-commit-queue
merged 1 commit into
WebKit:main
from
vitorroriz:eng/Rename-widthFor-functions
Mar 27, 2024
Merged
Rename widthForSimpleText, floatWidthForSimpleText, floatWidthForComplexText #26483
webkit-commit-queue
merged 1 commit into
WebKit:main
from
vitorroriz:eng/Rename-widthFor-functions
Mar 27, 2024
Conversation
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
vitorroriz
added
the
Text
For bugs in text layout and rendering, including international text support.
label
Mar 26, 2024
alanbaradlay
approved these changes
Mar 26, 2024
EWS run on previous version of this PR (hash 0389680) |
vitorroriz
force-pushed
the
eng/Rename-widthFor-functions
branch
from
March 26, 2024 22:05
0389680
to
8ca8092
Compare
EWS run on current version of this PR (hash 8ca8092) |
β¦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
webkit-commit-queue
force-pushed
the
eng/Rename-widthFor-functions
branch
from
March 27, 2024 00:00
8ca8092
to
31aadb0
Compare
Committed 276716@main (31aadb0): https://commits.webkit.org/276716@main Reviewed commits have been landed. Closing PR #26483 and removing active labels. |
webkit-commit-queue
removed
the
merge-queue
Applied to send a pull request to merge-queue
label
Mar 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
31aadb0
8ca8092
π§ͺ wpe-wk2π§ͺ ios-wk2-wptπ§ͺ mac-AS-debug-wk2