Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4a76f50075d2435edcdc89e0d2ccdfe8958e3140
https://github.com/WebKit/WebKit/commit/4a76f50075d2435edcdc89e0d2ccdfe8958e3140
Author: Alan Baradlay <[email protected]>
Date: 2023-10-11 (Wed, 11 Oct 2023)
Changed paths:
A
LayoutTests/fast/text/partial-line-leading-content-change-crash-expected.txt
A LayoutTests/fast/text/partial-line-leading-content-change-crash.html
M
Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
M
Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp
Log Message:
-----------
[IFC][Partial layout] Partial layout should always start _before_ the damage
position
https://bugs.webkit.org/show_bug.cgi?id=262995
<rdar://116714641>
Reviewed by Antti Koivisto.
1. "\nsome_text" produces 2 InlineTextItems [whitespace][some_text] (they
belong to the same layout box)
2. in case of non-preserved whitespace, this produces only one display
(content) box [some_text] (in addition to the root inline display box)
Now if [some_text] is deleted, we
1. run the invalidation process and find the 2nd InlineTextItem ([some_text])
as the candidate entry point for the subsequent layout.
2. run layout
2a. generate the new inline item list -> [whitespace] ([some_text] is gone)
2b. call linebuilder with the entry point of "2nd InlineItem" producing an
empty layout range, which makes sense as there's nothing to lay out really.
While we should be able to handle this simple (yet very special) case by
adjusting line dimensions, removing display boxes,
it's better to just fallback to force laying out this (visually empty) line by
moving the candidate position _before_ the [some_text] InlineTextItem.
* LayoutTests/fast/text/partial-line-leading-content-change-crash-expected.txt:
Added.
* LayoutTests/fast/text/partial-line-leading-content-change-crash.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layout):
*
Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp:
(WebCore::Layout::inlineItemPositionForDamagedContentPosition):
Canonical link: https://commits.webkit.org/269199@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes