[webkit-changes] [WebKit/WebKit] a8f7b2: [IFC][Partial layout] Exit line layout when curren...
Alan Baradlay
noreply at github.com
Fri Mar 17 05:33:49 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a8f7b254c9857b3c870acb19cfb352444b20e8ca
https://github.com/WebKit/WebKit/commit/a8f7b254c9857b3c870acb19cfb352444b20e8ca
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-03-17 (Fri, 17 Mar 2023)
Changed paths:
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h
M Source/WebCore/layout/formattingContexts/inline/invalidation/InlineDamage.h
M Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp
M Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.h
M Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
Log Message:
-----------
[IFC][Partial layout] Exit line layout when current line ends exactly where it ended at the previous layout
https://bugs.webkit.org/show_bug.cgi?id=253582
Reviewed by Antti Koivisto.
During partial layout, we may find ourselves laying out lines beyond the damaged position and yet producing the same set of display boxes.
This patch implements an exit strategy for such partial layouts by looking at the trailing position of the freshly laid out line.
If we see no change at the trailing position, we assume running line layout on the subsequent line would produce
the same set of display boxes that we already have (note that this is limited to text only content, no floats, no special first/last lines etc).
This is not yet functional as m_trailingDisplayBoxes is not populated.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
(WebCore::Layout::InlineFormattingContext::layoutInFlowContentForIntegration):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraintsForIntegration):
(WebCore::Layout::mayExitFromPartialLayout):
(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h:
(WebCore::InlineDisplay::operator==):
* Source/WebCore/layout/formattingContexts/inline/invalidation/InlineDamage.h:
(WebCore::Layout::InlineDamage::start const):
(WebCore::Layout::InlineDamage::setDamagedPosition):
(WebCore::Layout::InlineDamage::trailingContentForLine const):
(WebCore::Layout::InlineDamage::~InlineDamage):
(WebCore::Layout::InlineDamage::reset):
(WebCore::Layout::InlineDamage::contentPosition const): Deleted.
* Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp:
(WebCore::Layout::InlineInvalidation::updateInlineDamage):
(WebCore::Layout::InlineInvalidation::textInserted):
(WebCore::Layout::InlineInvalidation::textWillBeRemoved):
(WebCore::Layout::InlineInvalidation::inlineLevelBoxInserted):
(WebCore::Layout::InlineInvalidation::inlineLevelBoxWillBeRemoved):
* Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.cpp:
(WebCore::LayoutIntegration::InlineContentBuilder::build const):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::layout):
Canonical link: https://commits.webkit.org/261790@main
More information about the webkit-changes
mailing list