[webkit-changes] [WebKit/WebKit] 320590: [IFC][Partial layout] Populate InlineDamage::m_tra...

Alan Baradlay noreply at github.com
Tue Mar 21 06:23:26 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 320590b1f044f7a20ee4975016ccab61bc6c9f4e
      https://github.com/WebKit/WebKit/commit/320590b1f044f7a20ee4975016ccab61bc6c9f4e
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-03-21 (Tue, 21 Mar 2023)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/inline/invalidation/InlineDamage.h
    M Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp
    M Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.h
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp

  Log Message:
  -----------
  [IFC][Partial layout] Populate InlineDamage::m_trailingDisplayBoxes for subsequent partial layout when new renderer is added/removed.
https://bugs.webkit.org/show_bug.cgi?id=253763
<rdar://problem/106901404>

Reviewed by Antti Koivisto.

Let's hold on to the line ending display boxes so that InlineFormattingContext::lineLayout can match them with the freshly laid out lines. This is to figure out whether damage stops at a given line.

(Slightly refactor candidateLineIndex to return optional<size_t> to be able to fallback to full layout when we can't find a valid line index -unexpected state case).

Note that this is not enabled yet when InlineTextBox's content is being mutated.

* Source/WebCore/layout/formattingContexts/inline/invalidation/InlineDamage.h:
(WebCore::Layout::InlineDamage::setTrailingDisplayBoxes):
* Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp:
(WebCore::Layout::InlineInvalidation::InlineInvalidation):
(WebCore::Layout::damagedLineIndex):
(WebCore::Layout::trailingDisplayBoxesForDamagedLines):
(WebCore::Layout::InlineInvalidation::updateInlineDamage):
(WebCore::Layout::InlineInvalidation::applyFullDamageIfNeeded):
(WebCore::Layout::InlineInvalidation::textInserted):
(WebCore::Layout::InlineInvalidation::textWillBeRemoved):
(WebCore::Layout::InlineInvalidation::inlineLevelBoxInserted):
(WebCore::Layout::InlineInvalidation::inlineLevelBoxWillBeRemoved):
* Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.h:
(WebCore::Layout::InlineInvalidation::displayBoxes const):
(WebCore::Layout::InlineInvalidation::displayLines const):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::updateStyle):
(WebCore::LayoutIntegration::LineLayout::insertedIntoTree):
(WebCore::LayoutIntegration::LineLayout::removedFromTree):
(WebCore::LayoutIntegration::LineLayout::updateTextContent):

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




More information about the webkit-changes mailing list