Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: bf59b0f5302437cb685292dccc8ddd88d7391293
https://github.com/WebKit/WebKit/commit/bf59b0f5302437cb685292dccc8ddd88d7391293
Author: Ahmad Saleem <[email protected]>
Date: 2026-10-06 (Tue, 06 Oct 2026)
Changed paths:
M Source/WebCore/rendering/RenderFragmentedFlow.cpp
Log Message:
-----------
Add a helper to iterate over a fragment range in RenderFragmentedFlow
https://bugs.webkit.org/show_bug.cgi?id=326212
rdar://189096888
Reviewed by Ryosuke Niwa.
RenderFragmentedFlow.cpp repeated the same loop many times: find the start
fragment in m_fragmentList, iterate, and break once the end fragment is
reached. This patch adds a file-local forEachFragmentInRange() helper and
converts these loops to use it. The functor can return IterationStatus::Done
to stop early; a functor returning void visits the whole range. The helper
asserts that both the start and end fragments belong to the fragment list.
The loop in objectInFlowFragment() is left as is, since it stops at the
target fragment rather than the end of the range. fragmentInRange() is also
left as is, since it is annotated NODELETE and the static analyzer cannot
verify that through the helper.
No change in behavior.
* Source/WebCore/rendering/RenderFragmentedFlow.cpp:
(WebCore::forEachFragmentInRange):
(WebCore::RenderFragmentedFlow::absoluteQuadsForBox const):
(WebCore::RenderFragmentedFlow::removeRenderBoxFragmentInfo):
(WebCore::RenderFragmentedFlow::logicalWidthChangedInFragmentsForBlock):
(WebCore::RenderFragmentedFlow::addFragmentsVisualEffectOverflow):
(WebCore::RenderFragmentedFlow::addFragmentsVisualOverflowFromTheme):
(WebCore::RenderFragmentedFlow::addFragmentsOverflowFromChild):
(WebCore::RenderFragmentedFlow::addFragmentsLayoutOverflow):
(WebCore::RenderFragmentedFlow::addFragmentsVisualOverflow):
(WebCore::RenderFragmentedFlow::clearFragmentsOverflow):
Canonical link: https://commits.webkit.org/322865@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications