[webkit-changes] [WebKit/WebKit] 7b5320: [IFC][Partial layout] InlineItemsBuilder::m_isNonB...

Alan Baradlay noreply at github.com
Sat Sep 9 12:50:51 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7b53201b5eeb31379032bac023bccc125877e993
      https://github.com/WebKit/WebKit/commit/7b53201b5eeb31379032bac023bccc125877e993
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-09-09 (Sat, 09 Sep 2023)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.h

  Log Message:
  -----------
  [IFC][Partial layout] InlineItemsBuilder::m_isNonBidiTextAndForcedLineBreakOnlyContent may get stale with partial content
https://bugs.webkit.org/show_bug.cgi?id=261373

Reviewed by Antti Koivisto.

m_isNonBidiTextAndForcedLineBreakOnlyContent tells whether the _entire_ IFC content is text and/or forced line break only.
This patch fixes the case where the partial content is indeed text and/or forced line break, but the non-mutated part of the content has other type of boxes.

As the first step of inline item collection on partial content, we traverse the inline tree starting from the root
all the way to the damaged box while pushing/poping subtree roots. It ensures that we can continue collecting mutated content
even when it is nested inside inline boxes
e.g.
 This is old <span>content but here <span>we've got some newly appended and nested content</span><span>
During this initialization we can also check for m_isNonBidiTextAndForcedLineBreakOnlyContent.

* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp:
(WebCore::Layout::isNonBidiTextOrForcedLineBreak):
(WebCore::Layout::InlineItemsBuilder::traverseUntilDamaged):
(WebCore::Layout::InlineItemsBuilder::initializeLayoutQueue):
(WebCore::Layout::InlineItemsBuilder::collectInlineItems):
(WebCore::Layout::traverseUntilDamaged): Deleted.
(WebCore::Layout::initializeLayoutQueue): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.h:

Canonical link: https://commits.webkit.org/267835@main




More information about the webkit-changes mailing list