This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse the repository at this point in the history
[IFC][Partial layout] Incorrect damage line index may cause double in…
…line items https://bugs.webkit.org/show_bug.cgi?id=256020 <rdar://108558653> Reviewed by Antti Koivisto. When the damaged content is at the beginning of the line, we mark the previous line as the entry point for the subsequent partial layout. It is not only a correctness requirement but also it provides a more convenient starting point for line layout/InlineItemBuilder to process the inline content. Layout::damagedLineIndex failed to recognize a leading display box due to collapsed whitespace content. Through some further content mutation, it lead to duplicated inline items (hard line breaks). * LayoutTests/fast/inline/contenteditable-with-leading-whitespace-crash-expected.txt: Added. * LayoutTests/fast/inline/contenteditable-with-leading-whitespace-crash.html: Added. * Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp: (WebCore::Layout::InlineItemsBuilder::build): * Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp: (WebCore::Layout::damagedLineIndex): Canonical link: https://commits.webkit.org/263455@main
- Loading branch information
Showing 4 changed files with 31 additions and 2 deletions.