Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0beddeef1fecd4ac9fbd0dc195698987e8a07042
https://github.com/WebKit/WebKit/commit/0beddeef1fecd4ac9fbd0dc195698987e8a07042
Author: Ahmad Saleem <[email protected]>
Date: 2025-06-15 (Sun, 15 Jun 2025)
Changed paths:
M Source/WebCore/rendering/svg/RenderSVGText.cpp
Log Message:
-----------
Refactor `findPreviousAndNextAttributes` to use iterative pre-order traversal
https://bugs.webkit.org/show_bug.cgi?id=265450
rdar://119183485
Reviewed by Said Abou-Hallawa.
Inspired by:
https://chromium.googlesource.com/chromium/blink/+/ab5b1a60d9ef3c196db20634d36c1d66c14a042f
This patch refactors `findPreviousAndNextAttributes` function to use the
existing pre-order traversal methods on RenderObject to implement the traversal
in an iterative fashion instead of as a recursion.
This also leverages std::tuple and renames variable from 'stopAfterNext'
to 'foundLocateElement' and flatten control flow with early returns.
* Source/WebCore/rendering/svg/RenderSVGText.cpp:
(WebCore::findPreviousAndNextAttributes):
(WebCore::RenderSVGText::subtreeChildWasAdded):
(WebCore::RenderSVGText::subtreeChildWillBeRemoved):
Canonical link: https://commits.webkit.org/296257@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