Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 59f02dbfbc2353adafbef64ec5f8ac5875c21559 https://github.com/WebKit/WebKit/commit/59f02dbfbc2353adafbef64ec5f8ac5875c21559 Author: Matt Woodrow <mattwood...@apple.com> Date: 2024-08-13 (Tue, 13 Aug 2024)
Changed paths: M Source/WebCore/dom/Document.cpp M Source/WebCore/dom/Document.h M Source/WebCore/page/Page.cpp Log Message: ----------- Refactor setVisualUpdatesAllowed to allow adding more reasons. https://bugs.webkit.org/show_bug.cgi?id=277931 <rdar://133648465> Reviewed by Tim Horton. The state changes for enabling/disabling visual updates allowed are complicated, and will get worse if we try to add new reasons to prevent updates. Render blocking (bug 268743) will want to use this, and I think we can fold in view-transition rendering suppression too. This adds a set of flags, and visual updates are prevented when any are present. There are a few behaviour changes: The explicit flushing of layout and compositing layers has been removed. Any code that needs to result of these (like a rendering update) should already be calling these as needed, and we shouldn't need to preemptively do so at this point. A suspend/resume pair no longer clobbers the state, and will now leave client-requested blocking in place. rAF is also skipped for Documents with visual updates prevented. This is required for render-blocking and rendering suppression, and seems like it would also be the right thing for the existing uses too. * Source/WebCore/dom/Document.cpp: (WebCore::Document::setReadyState): (WebCore::Document::setVisualUpdatesAllowed): (WebCore::Document::addVisualUpdatePreventedReason): (WebCore::Document::removeVisualUpdatePreventedReasons): (WebCore::Document::visualUpdatesSuppressionTimerFired): (WebCore::Document::setVisualUpdatesAllowedByClient): (WebCore::Document::suspend): (WebCore::Document::resume): * Source/WebCore/dom/Document.h: (WebCore::Document::visualUpdatesAllowed const): (WebCore::Document::visualUpdatePreventReasonsClearedByTimer): (WebCore::Document::visualUpdatePreventRequiresLayoutMilestones): * Source/WebCore/page/Page.cpp: (WebCore::Page::forEachRenderableDocument const): Canonical link: https://commits.webkit.org/282185@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