-
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
[Cocoa] Hook "prior context" infrastructure up to TextBreakIteratorCF #14463
Merged
webkit-commit-queue
merged 1 commit into
WebKit:main
from
litherum:eng/Cocoa-Hook-prior-context-infrastructure-up-to-TextBreakIteratorCF
May 31, 2023
Merged
[Cocoa] Hook "prior context" infrastructure up to TextBreakIteratorCF #14463
webkit-commit-queue
merged 1 commit into
WebKit:main
from
litherum:eng/Cocoa-Hook-prior-context-infrastructure-up-to-TextBreakIteratorCF
May 31, 2023
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
litherum
added
the
Text
For bugs in text layout and rendering, including international text support.
label
May 30, 2023
EWS run on previous version of this PR (hash aa20a35) |
webkit-ews-buildbot
added
the
merging-blocked
Applied to prevent a change from being merged
label
May 30, 2023
litherum
removed
the
merging-blocked
Applied to prevent a change from being merged
label
May 30, 2023
litherum
force-pushed
the
eng/Cocoa-Hook-prior-context-infrastructure-up-to-TextBreakIteratorCF
branch
from
May 30, 2023 00:54
aa20a35
to
539ded9
Compare
EWS run on previous version of this PR (hash 539ded9) |
litherum
commented
May 30, 2023
litherum
force-pushed
the
eng/Cocoa-Hook-prior-context-infrastructure-up-to-TextBreakIteratorCF
branch
from
May 30, 2023 05:41
539ded9
to
f5dc39a
Compare
webkit-ews-buildbot
added
the
merging-blocked
Applied to prevent a change from being merged
label
May 30, 2023
alanbaradlay
approved these changes
May 31, 2023
litherum
added
merge-queue
Applied to send a pull request to merge-queue
and removed
merging-blocked
Applied to prevent a change from being merged
labels
May 31, 2023
https://bugs.webkit.org/show_bug.cgi?id=257467 rdar://109983296 Reviewed by Alan Baradlay. This patch is the next step to being able to use platform text iterators to break lines. Previously, I implemented ContextualizedNSString, which is a subclass of NSString whose backing store is 2 StringViews: one for the prior context of the string at hand, and one for the string at hand itself. This patch hooks up ContextualizedNSString to our TextBreakIteratorCF class, to allow TextBreakIteratorCF to work with prior context. This is necessary because our line breaking code requires this prior context to work correctly, and TextBreakIterator is the object which has a Core Foundation backend. If we want to be able to do line breaking using Core Foundation, this patch is necessary. The next patch will do something similar for TextBreakIteratorICU (which we luckily already have UText support for). Once that's done, we should be able to migrate entirely from LazyLineBreakIterator to TextBreakIterator. * Source/WTF/WTF.xcodeproj/project.pbxproj: * Source/WTF/wtf/text/TextBreakIterator.h: (WTF::TextBreakIterator::setText): * Source/WTF/wtf/text/cf/TextBreakIteratorCF.h: (WTF::TextBreakIteratorCF::TextBreakIteratorCF): (WTF::TextBreakIteratorCF::setText): (WTF::TextBreakIteratorCF::mapModeToBackingIterator): * Source/WTF/wtf/text/cf/TextBreakIteratorCFCharacterCluster.h: (WTF::TextBreakIteratorCFCharacterCluster::TextBreakIteratorCFCharacterCluster): (WTF::TextBreakIteratorCFCharacterCluster::setText): (WTF::TextBreakIteratorCFCharacterCluster::preceding const): (WTF::TextBreakIteratorCFCharacterCluster::following const): (WTF::TextBreakIteratorCFCharacterCluster::isBoundary const): * Source/WTF/wtf/text/cf/TextBreakIteratorCFStringTokenizer.h: (WTF::TextBreakIteratorCFStringTokenizer::TextBreakIteratorCFStringTokenizer): (WTF::TextBreakIteratorCFStringTokenizer::setText): (WTF::TextBreakIteratorCFStringTokenizer::preceding const): (WTF::TextBreakIteratorCFStringTokenizer::following const): (WTF::TextBreakIteratorCFStringTokenizer::isBoundary const): * Source/WTF/wtf/text/cocoa/ContextualizedCFString.h: Added. * Source/WTF/wtf/text/cocoa/ContextualizedCFString.mm: Added. (WTF::createContextualizedCFString): * Source/WTF/wtf/text/cocoa/TextBreakIteratorInternalICUCocoa.cpp: (WTF::TextBreakIterator::mapModeToBackingIterator): * Source/WTF/wtf/text/icu/TextBreakIteratorICU.h: (WTF::TextBreakIteratorICU::setText): * Tools/TestWebKitAPI/Tests/WTF/TextBreakIterator.cpp: (TestWebKitAPI::TEST): * Tools/TestWebKitAPI/Tests/WTF/cocoa/ContextualizedNSString.mm: (TEST): Canonical link: https://commits.webkit.org/264714@main
webkit-commit-queue
force-pushed
the
eng/Cocoa-Hook-prior-context-infrastructure-up-to-TextBreakIteratorCF
branch
from
May 31, 2023 06:46
f5dc39a
to
7d9c042
Compare
Committed 264714@main (7d9c042): https://commits.webkit.org/264714@main Reviewed commits have been landed. Closing PR #14463 and removing active labels. |
webkit-commit-queue
removed
the
merge-queue
Applied to send a pull request to merge-queue
label
May 31, 2023
litherum
deleted the
eng/Cocoa-Hook-prior-context-infrastructure-up-to-TextBreakIteratorCF
branch
May 31, 2023 06:57
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.
7d9c042
f5dc39a