[webkit-changes] [WebKit/WebKit] b5583c: Pull out LazyLineBreakIterator's prior context han...
Myles C. Maxfield
noreply at github.com
Tue May 23 15:51:26 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b5583c5d124d54f19e8e87f3f9daad7450495656
https://github.com/WebKit/WebKit/commit/b5583c5d124d54f19e8e87f3f9daad7450495656
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-05-23 (Tue, 23 May 2023)
Changed paths:
M Source/WTF/wtf/text/TextBreakIterator.h
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
M Source/WebCore/rendering/BreakLines.h
M Source/WebCore/rendering/LegacyLineLayout.cpp
M Source/WebCore/rendering/RenderRubyBase.cpp
M Source/WebCore/rendering/RenderRubyRun.cpp
M Source/WebCore/rendering/RenderRubyText.cpp
M Source/WebCore/rendering/line/BreakingContext.h
M Tools/TestWebKitAPI/Tests/WTF/TextBreakIterator.cpp
Log Message:
-----------
Pull out LazyLineBreakIterator's prior context handling into a separate class
https://bugs.webkit.org/show_bug.cgi?id=257115
rdar://109646131
Reviewed by Yusuke Suzuki.
LazyLineBreakIterator is really a factory, which holds the necessary parameters to
create line break iterators. But, it also has a bunch of handling for a "prior context"
which is conceptually a prefix to the string being broken.
This patch isn't strictly necessary, but I thought it would be a bit more elegant to
have a class separation between the two pieces of LazyLineBreakIterator.
* Source/WTF/wtf/text/TextBreakIterator.h:
(WTF::LazyLineBreakIterator::PriorContext::PriorContext):
(WTF::LazyLineBreakIterator::PriorContext::lastCharacter const):
(WTF::LazyLineBreakIterator::PriorContext::secondToLastCharacter const):
(WTF::LazyLineBreakIterator::PriorContext::set):
(WTF::LazyLineBreakIterator::PriorContext::update):
(WTF::LazyLineBreakIterator::PriorContext::reset):
(WTF::LazyLineBreakIterator::PriorContext::length const):
(WTF::LazyLineBreakIterator::PriorContext::characters const):
(WTF::LazyLineBreakIterator::LazyLineBreakIterator):
(WTF::LazyLineBreakIterator::get):
(WTF::LazyLineBreakIterator::resetStringAndReleaseIterator):
(WTF::LazyLineBreakIterator::priorContext const):
(WTF::LazyLineBreakIterator::priorContext):
(WTF::TextBreakIteratorCache::TextBreakIteratorCache): Deleted.
(WTF::LazyLineBreakIterator::lastCharacter const): Deleted.
(WTF::LazyLineBreakIterator::secondToLastCharacter const): Deleted.
(WTF::LazyLineBreakIterator::setPriorContext): Deleted.
(WTF::LazyLineBreakIterator::updatePriorContext): Deleted.
(WTF::LazyLineBreakIterator::resetPriorContext): Deleted.
(WTF::LazyLineBreakIterator::priorContextLength const): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::endsWithSoftWrapOpportunity):
* Source/WebCore/rendering/BreakLines.h:
(WebCore::nextBreakablePosition):
* Source/WebCore/rendering/LegacyLineLayout.cpp:
(WebCore::LegacyLineLayout::layoutRunsAndFloatsInRange):
* Source/WebCore/rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):
* Source/WebCore/rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator const):
* Source/WebCore/rendering/RenderRubyText.cpp:
(WebCore::RenderRubyText::canBreakBefore const):
* Source/WebCore/rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleOutOfFlowPositioned):
(WebCore::BreakingContext::handleFloat):
(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::handleText):
Canonical link: https://commits.webkit.org/264444@main
More information about the webkit-changes
mailing list