[webkit-changes] [WebKit/WebKit] 44b5f7: [IFC][Partial layout] Incorrect damage line index ...

Alan Baradlay noreply at github.com
Thu Apr 27 08:43:57 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 44b5f74e5accebba03b5df063720d930f1db6276
      https://github.com/WebKit/WebKit/commit/44b5f74e5accebba03b5df063720d930f1db6276
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

  Changed paths:
    A LayoutTests/fast/inline/contenteditable-with-leading-whitespace-crash-expected.txt
    A LayoutTests/fast/inline/contenteditable-with-leading-whitespace-crash.html
    M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp

  Log Message:
  -----------
  [IFC][Partial layout] Incorrect damage line index may cause double inline 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




More information about the webkit-changes mailing list