Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1d9bd34cbf6bd73b8dafbb3977c551147e004add
https://github.com/WebKit/WebKit/commit/1d9bd34cbf6bd73b8dafbb3977c551147e004add
Author: Alan Baradlay <[email protected]>
Date: 2023-02-17 (Fri, 17 Feb 2023)
Changed paths:
M
Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.h
M Source/WebCore/layout/formattingContexts/inline/InlineLineTypes.h
Log Message:
-----------
[IFC][Partial layout] InlineItemsBuilder should be able to construct
InlineItems for a subset of inline content
https://bugs.webkit.org/show_bug.cgi?id=252330
Reviewed by Antti Koivisto.
1. Inline content gets split up at soft wrap opportunities as the first step
before running inline layout. We call these "runs" InlineItems.
2. The list of InlineItems is cached across subsequent layouts.
3. With partial layout (and damaged content) we need to be able to a
(re-)create inline items by visiting only the damaged part of the inline tree.
In this patch InlineItemsBuilder takes the damage position and
- finds the first damaged inline item
- figures out the associated layout box position in the tree and sets up the
layout queue accordingly.
(currently it (re-)constructs inline items starting from the damaged position
all the way to the end of the inline content.
This needs to be turned into a proper range in order to support "insert" type
of partial layout).
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
(WebCore::Layout::InlineFormattingContext::layoutInFlowContentForIntegration):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraintsForIntegration):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
(WebCore::Layout::InlineFormattingContext::collectContentIfNeeded): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp:
(WebCore::Layout::InlineItemsBuilder::InlineItemsBuilder):
(WebCore::Layout::InlineItemsBuilder::build):
(WebCore::Layout::InlineItemsBuilder::collectInlineItems):
(WebCore::Layout::InlineItemsBuilder::breakAndComputeBidiLevels):
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.h:
Canonical link: https://commits.webkit.org/260487@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes