Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6bff3ad561862598ef24a2723cf53fcd1b0cc07e
      
https://github.com/WebKit/WebKit/commit/6bff3ad561862598ef24a2723cf53fcd1b0cc07e
  Author: Antti Koivisto <[email protected]>
  Date:   2026-10-07 (Wed, 07 Oct 2026)

  Changed paths:
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h
    M Source/WebCore/rendering/RenderBlockFlow.cpp

  Log Message:
  -----------
  [IFC][SVG text] Initialize some LineLayout fields lazily
https://bugs.webkit.org/show_bug.cgi?id=326698
rdar://problem/189429163

Reviewed by Alan Baradlay.

SVG text roots created a block formatting state, an inline content cache and 
box geometries for inline boxes
even when only the SVG text fast path runs. This is a significant part of the 
cost when SVG text is created and
destroyed frequently.

Create the block formatting state and the inline content cache on first use by 
the inline formatting context.
Don't create box geometries for inline boxes in the SVG text fast path.

* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::LineLayout):
(WebCore::LayoutIntegration::LineLayout::~LineLayout):
(WebCore::LayoutIntegration::LineLayout::contains const):

The SVG text fast path doesn't compute box geometries. Test for display boxes 
instead.

(WebCore::LayoutIntegration::LineLayout::rootStyleWillChange):
(WebCore::LayoutIntegration::LineLayout::styleWillChange):
(WebCore::LayoutIntegration::LineLayout::boxContentWillChange):
(WebCore::LayoutIntegration::LineLayout::computeIntrinsicWidthConstraints):
(WebCore::LayoutIntegration::LineLayout::setExcludedMarkerPositions):
(WebCore::LayoutIntegration::LineLayout::layout):
(WebCore::LayoutIntegration::LineLayout::constructContent):
(WebCore::LayoutIntegration::LineLayout::updateRenderTreePositions):
(WebCore::LayoutIntegration::LineLayout::layoutSVGText):

Drop an inline content cache left behind by an earlier inline layout.

(WebCore::LayoutIntegration::LineLayout::preparePlacedFloats):
(WebCore::LayoutIntegration::LineLayout::adjustContentForPagination):
(WebCore::LayoutIntegration::LineLayout::insertedIntoTree):
(WebCore::LayoutIntegration::LineLayout::removedFromTree):
(WebCore::LayoutIntegration::LineLayout::updateTextContent):
(WebCore::LayoutIntegration::LineLayout::releaseCachesAndResetDamage):
(WebCore::LayoutIntegration::LineLayout::ensureBlockFormattingState):
(WebCore::LayoutIntegration::LineLayout::ensureInlineContentCache):
(WebCore::LayoutIntegration::LineLayout::inlineItemsForInvalidation const):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h:
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::resetInlineContentCache):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to