[webkit-changes] [WebKit/WebKit] 8370cd: [IFC][Partial layout] InlineItemsBuilder should be...
Alan Baradlay
noreply at github.com
Sun Feb 26 08:57:15 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8370cdf110f273aa9b1e336578151b92ae9ca2d9
https://github.com/WebKit/WebKit/commit/8370cdf110f273aa9b1e336578151b92ae9ca2d9
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-02-26 (Sun, 26 Feb 2023)
Changed paths:
M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.h
M Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp
Log Message:
-----------
[IFC][Partial layout] InlineItemsBuilder should be able to generate content for expanding InlineTextBox
https://bugs.webkit.org/show_bug.cgi?id=252885
Reviewed by Antti Koivisto.
Currently InlineItemsBuilder only supports newly appended InlineTextBoxes. We treat startPosition's layout box as clean content and start
collecting new inline items at next sibling (again this is when we append a new layout box after the last one).
In this patch we move "damage boundary" to the startPosition and we start collecting inline items from the startPosition's layout box instead.
This makes sure damages inside exiting InlineTextBoxes get picked up.
However normally it would mean re-collecting (and more importantly re-measuring) large body of text as InlineTextBoxes may very well contain whole paragraphs.
To ensure performant partial layout, we compute and pass in the damaged content position to make sure content processing actually starts at an offset.
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp:
(WebCore::Layout::InlineItemsBuilder::build):
(WebCore::Layout::InlineItemsBuilder::collectInlineItems):
(WebCore::Layout::InlineItemsBuilder::handleTextContent):
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.h:
Canonical link: https://commits.webkit.org/260852@main
More information about the webkit-changes
mailing list