Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d36800d6828a7eea27126bd52932152b12891888
https://github.com/WebKit/WebKit/commit/d36800d6828a7eea27126bd52932152b12891888
Author: Cole Carley <[email protected]>
Date: 2025-12-16 (Tue, 16 Dec 2025)
Changed paths:
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
Log Message:
-----------
Add an early return to updateLayout if unnecessary
https://bugs.webkit.org/show_bug.cgi?id=302312
rdar://164455646
Reviewed by Simon Fraser.
There is a recursion updateLayoutIgnorePendingStylesheet -> updateLayout ->
updateRelevancyOfContentVisibilityElements ->
updateLayoutIgnorePendingStylesheets.
This recursion makes it possible to handle contentVisibility.
The problem is that updateRelevancyOfContentVisibilityElements calls
updateLayoutIgnorePendingStylesheets as a side effect. When updateLayout tries
to
update the content visibility, the expensive updateLayout function is called
again.
I have instead given updateLayoutOfContentVisibilityElement's client's a choice
to
call updateLayoutIgnorePendingStylesheets. That way, we can stop the
updateLayout
recursion if updateLayout needs to be called again after
updateLayoutOfContextVisibilityElements.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::updateLayout):
(WebCore::Document::updateRelevancyOfContentVisibilityElements):
* Source/WebCore/dom/Document.h:
Canonical link: https://commits.webkit.org/304566@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications