Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 95c7507d3ee9c81743172c0a5c30ca47a6d453b0
https://github.com/WebKit/WebKit/commit/95c7507d3ee9c81743172c0a5c30ca47a6d453b0
Author: Ben Nham <[email protected]>
Date: 2026-09-29 (Tue, 29 Sep 2026)
Changed paths:
A
LayoutTests/compositing/iframes/scroll-with-fixed-composited-iframe-expected.txt
A LayoutTests/compositing/iframes/scroll-with-fixed-composited-iframe.html
A
LayoutTests/http/tests/site-isolation/move-cross-site-iframe-rendering-expected.html
A
LayoutTests/http/tests/site-isolation/move-cross-site-iframe-rendering.html
A
LayoutTests/http/tests/site-isolation/move-cross-site-iframe-without-resizing-expected.txt
A
LayoutTests/http/tests/site-isolation/move-cross-site-iframe-without-resizing.html
A
LayoutTests/http/tests/site-isolation/resources/rendering-update-counter-frame.html
A
LayoutTests/http/tests/site-isolation/scroll-with-fixed-cross-site-iframe-expected.txt
A
LayoutTests/http/tests/site-isolation/scroll-with-fixed-cross-site-iframe.html
M Source/WebCore/page/LocalFrameView.cpp
M Source/WebCore/platform/ScrollView.cpp
M Source/WebCore/rendering/RenderWidget.cpp
M Source/WebKit/WebProcess/WebPage/WebFrame.cpp
Log Message:
-----------
Minimize work when a frame moves without resizing
https://bugs.webkit.org/show_bug.cgi?id=325594
rdar://problem/188665149
Reviewed by Simon Fraser.
Optimize some code paths that treat any frame rect change as a resize, even if
the frame only moves
(e.g. scrolling a page with a fixed position iframe):
- RenderWidget::setWidgetGeometry called widgetDidChangeSize on every move,
which scheduled a
compositing update.
- WebFrame::updateLocalFrameRect repainted the iframe and scheduled a rendering
update on every
move.
- LocalFrameView::setFrameRect called frameViewDidChangeSize on every move,
which also scheduled a
rendering update. ScrollView::setFrameRect called updateScrollbars on every
move in fixed-layout
mode.
- ScrollView::setFrameRect called updateScrollbars on every move, which could
also call
frameViewDidChangeSize (via LocalFrameView::updateContentsSize).
These functions now skip that work if the frame size didn't change. The extra
work was higher when
Site Isolation was enabled, because every cross-site iframe position change
caused the new frame
rect to be sent to the remote frame process, which then did its own extra
rendering and compositing
update work.
Tests: compositing/iframes/scroll-with-fixed-composited-iframe.html
http/tests/site-isolation/move-cross-site-iframe-rendering.html
http/tests/site-isolation/move-cross-site-iframe-without-resizing.html
http/tests/site-isolation/scroll-with-fixed-cross-site-iframe.html
*
LayoutTests/compositing/iframes/scroll-with-fixed-composited-iframe-expected.txt:
Added.
* LayoutTests/compositing/iframes/scroll-with-fixed-composited-iframe.html:
Added.
*
LayoutTests/http/tests/site-isolation/move-cross-site-iframe-rendering-expected.html:
Added.
* LayoutTests/http/tests/site-isolation/move-cross-site-iframe-rendering.html:
Added.
*
LayoutTests/http/tests/site-isolation/move-cross-site-iframe-without-resizing-expected.txt:
Added.
*
LayoutTests/http/tests/site-isolation/move-cross-site-iframe-without-resizing.html:
Added.
*
LayoutTests/http/tests/site-isolation/resources/rendering-update-counter-frame.html:
Added.
*
LayoutTests/http/tests/site-isolation/scroll-with-fixed-cross-site-iframe-expected.txt:
Added.
*
LayoutTests/http/tests/site-isolation/scroll-with-fixed-cross-site-iframe.html:
Added.
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::setFrameRect):
* Source/WebCore/platform/ScrollView.cpp:
(WebCore::ScrollView::setFrameRect):
* Source/WebCore/rendering/RenderWidget.cpp:
(WebCore::RenderWidget::setWidgetGeometry):
* Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::updateLocalFrameRect):
Canonical link: https://commits.webkit.org/322194@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications