Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e9235eeac4b213cb15e87a5c1b2a97bd27826195
https://github.com/WebKit/WebKit/commit/e9235eeac4b213cb15e87a5c1b2a97bd27826195
Author: Alan Baradlay <[email protected]>
Date: 2024-02-29 (Thu, 29 Feb 2024)
Changed paths:
M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.h
Log Message:
-----------
[IFC] Turn recursive "let's find the first damaged box" tree traversal to
iterative
https://bugs.webkit.org/show_bug.cgi?id=270293
<rdar://120523982>
Reviewed by Antti Koivisto.
InlineItemsBuilder::traverseUntilDamaged builds the initial queue for partial
layouts which in most cases
only contains the damage box, but with inline boxes (e.g. <span>) it also
includes the parent ancestor chain
e.g.
<span id=first><span id=second><damaged box></span</span>
produces the following layout queue: [first][second][damaged box]
while
<span id=first><span id=second><not damaged box></span><damaged box></span>
drops the second inline box: [first][damaged box]
This change turns recursing tree traversal to an iterative approach. While
inline content does not tend to be
deeply nested, it could easily have a long list of sibling inline boxes (which
may exhaust stack space given the recursive nature of this traversal).
Canonical link: https://commits.webkit.org/275514@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes