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

Alan Baradlay noreply at github.com
Sun Mar 19 06:56:03 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bd3b167968591a8a2019dcfe22f337fdd1015be0
      https://github.com/WebKit/WebKit/commit/bd3b167968591a8a2019dcfe22f337fdd1015be0
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-03-19 (Sun, 19 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
https://bugs.webkit.org/show_bug.cgi?id=253763

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).

* 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::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/261836@main




More information about the webkit-changes mailing list