Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b1f1e04f4d8db6c4ddbe79c0102e55f6e557ad44
      
https://github.com/WebKit/WebKit/commit/b1f1e04f4d8db6c4ddbe79c0102e55f6e557ad44
  Author: Alan Baradlay <[email protected]>
  Date:   2023-09-12 (Tue, 12 Sep 2023)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingState.h
    M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp
    M Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp

  Log Message:
  -----------
  [IFC] fast/canvas/imageData-consistency.html is a flaky timeout in debug
https://bugs.webkit.org/show_bug.cgi?id=261452

Reviewed by Antti Koivisto.

fast/canvas/imageData-consistency.html produces over 30K boxes by appending 
multiple
boxes at a time followed by a forced layout.
Calling LineLayout::contentNeedsVisualReordering in debug mode on such an 
extended content is costly.

This patch caches the "content needs visual reordering" bit during inline items 
building so that
we don't have to traverse the content at invalidation time to see if it is 
eligible for partial layout.

Introducing this bit also helps with the upcoming bidi content invalidation.

* Source/WebCore/layout/formattingContexts/inline/InlineFormattingState.h:
(WebCore::Layout::InlineFormattingState::setContentRequiresVisualReordering):
(WebCore::Layout::InlineFormattingState::contentRequiresVisualReordering const):
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp:
(WebCore::Layout::requiresVisualReordering):
(WebCore::Layout::InlineItemsBuilder::traverseUntilDamaged):
(WebCore::Layout::InlineItemsBuilder::initializeLayoutQueue): remove redundant 
check. traverseUntilDamaged takes care of the first child.
(WebCore::Layout::InlineItemsBuilder::collectInlineItems):
(WebCore::Layout::InlineItemsBuilder::handleTextContent):
(WebCore::Layout::InlineItemsBuilder::handleInlineBoxStart):
(WebCore::Layout::isNonBidiTextOrForcedLineBreak): Deleted.
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::contentNeedsVisualReordering const):

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to