Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 531ad5e6cac68fc0d7e9dc9b8bd4205f6f6821df
      
https://github.com/WebKit/WebKit/commit/531ad5e6cac68fc0d7e9dc9b8bd4205f6f6821df
  Author: Myles C. Maxfield <[email protected]>
  Date:   2023-05-31 (Wed, 31 May 2023)

  Changed paths:
    M Source/WTF/wtf/text/TextBreakIterator.cpp
    M Source/WTF/wtf/text/TextBreakIterator.h
    M Source/WTF/wtf/text/cocoa/TextBreakIteratorInternalICUCocoa.cpp
    M Source/WTF/wtf/text/icu/TextBreakIteratorICU.h
    M Source/WebCore/platform/graphics/ComplexTextController.cpp
    M Source/WebCore/platform/graphics/ComposedCharacterClusterTextIterator.h
    M Source/WebCore/rendering/RenderText.cpp
    M Tools/TestWebKitAPI/Tests/WTF/TextBreakIterator.cpp

  Log Message:
  -----------
  Update TextBreakIterator's API to support prior context
https://bugs.webkit.org/show_bug.cgi?id=257529
<rdar://problem/110051433>

Reviewed by Yusuke Suzuki.

Now that TextBreakIteratorCF and TextBreakIteratorICU both support prior 
context,
we can hook it up to TextBreakIterator's API.

After this patch, all the features supported by LazyLineBreakIterator are 
supported
by TextBreakIterator, so we can switch over from from using 
LazyLineBreakIterator to
TextBreakIterator whenever we want. However, before making the switch, we still 
need
to determine if there is a performance cost to doing so.

* Source/WTF/wtf/text/TextBreakIterator.cpp:
(WTF::TextBreakIterator::mapModeToBackingIterator):
(WTF::TextBreakIterator::TextBreakIterator):
* Source/WTF/wtf/text/TextBreakIterator.h:
(WTF::TextBreakIterator::setText):
(WTF::TextBreakIteratorCache::take):
(WTF::CachedTextBreakIterator::CachedTextBreakIterator):
* Source/WTF/wtf/text/cocoa/TextBreakIteratorInternalICUCocoa.cpp:
(WTF::TextBreakIterator::mapModeToBackingIterator):
(WTF::TextBreakIterator::TextBreakIterator):
* Source/WTF/wtf/text/icu/TextBreakIteratorICU.h:
(WTF::TextBreakIteratorICU::TextBreakIteratorICU):
* Source/WebCore/platform/graphics/ComplexTextController.cpp:
(WebCore::ComplexTextController::offsetForPosition):
(WebCore::ComplexTextController::collectComplexTextRuns):
* Source/WebCore/platform/graphics/ComposedCharacterClusterTextIterator.h:
(WebCore::ComposedCharacterClusterTextIterator::ComposedCharacterClusterTextIterator):
* Source/WebCore/rendering/RenderText.cpp:
(WebCore::RenderText::previousOffset const):
(WebCore::RenderText::previousOffsetForBackwardDeletion const):
(WebCore::RenderText::nextOffset const):
* Tools/TestWebKitAPI/Tests/WTF/TextBreakIterator.cpp:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/264772@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to