Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b237a14cbdab4cb6b22f40e29676e6f0433d448f
https://github.com/WebKit/WebKit/commit/b237a14cbdab4cb6b22f40e29676e6f0433d448f
Author: Cole Carley <[email protected]>
Date: 2026-04-17 (Fri, 17 Apr 2026)
Changed paths:
M Source/WebCore/dom/Document.cpp
M Source/WebCore/editing/CachedMatchFinder.cpp
M Source/WebCore/editing/Editor.cpp
Log Message:
-----------
Reduce calls and cost of updateLayout during find in page
https://bugs.webkit.org/show_bug.cgi?id=312330
rdar://174787681
Reviewed by Ryosuke Niwa.
I moved redundant calls to updateLayoutIgnorePendingStylesheets
to the CachedMatchFinder before building the new text buffer, which
reduces the cost of a cache hit.
I also added a guard to Document::updateLayout to skip updating the
relevancy of content visibility elements when the layout options
contain TreatContentVisibilityAutoAsVisible or TreatRevealedWhenFoundAsVisible.
These options are passed in when doing layout for find in page, which
should make layout cheaper.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::updateLayout):
* Source/WebCore/editing/CachedMatchFinder.cpp:
(WebCore::CachedMatchFinder::textForScope):
* Source/WebCore/editing/Editor.cpp:
(WebCore::Editor::findString):
(WebCore::Editor::countMatchesForText):
Canonical link: https://commits.webkit.org/311476@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications