Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6a8f22846055c809de62d7fea99a9b11b9acd783
      
https://github.com/WebKit/WebKit/commit/6a8f22846055c809de62d7fea99a9b11b9acd783
  Author: Antti Koivisto <an...@apple.com>
  Date:   2025-03-06 (Thu, 06 Mar 2025)

  Changed paths:
    M 
Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/inline/RangeBasedLineBuilder.h
    M 
Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.h

  Log Message:
  -----------
  Heap allocate TextOnlySimpleLineBuilder and RangeBasedLineBuilder
https://bugs.webkit.org/show_bug.cgi?id=289236
rdar://146067168

Reviewed by Alan Baradlay.

Nested inline blocks can result in deep recursion in extreme cases.
Reduce stack usage on the recursion path.

* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layout):

Heap allocate all LineBuilders. This reduces stack usage of this function from 
~6KB to 600B.

* Source/WebCore/layout/formattingContexts/inline/RangeBasedLineBuilder.h:
* Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to