Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8d38ad5a27eb6025e46a6a812f3152cdefbd3283
https://github.com/WebKit/WebKit/commit/8d38ad5a27eb6025e46a6a812f3152cdefbd3283
Author: Brent Fulgham <[email protected]>
Date: 2026-10-07 (Wed, 07 Oct 2026)
Changed paths:
M Source/WebKit/UIProcess/Automation/Automation.json
M Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp
M Source/WebKit/UIProcess/Automation/WebAutomationSession.h
M Tools/TestWebKitAPI/SourcesCocoa.txt
A Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WebAutomationPageZoom.mm
Log Message:
-----------
Automation should be able to set the page zoom factor of a browsing context
https://bugs.webkit.org/show_bug.cgi?id=326548
rdar://189335219
Reviewed by Tim Nguyen.
Automation clients can resize a browsing context's window, but have no way to
apply the
page zoom that the browser's zoom in and zoom out commands apply.
Add setPageZoomFactorOfBrowsingContext, which sets WebPageProxy's page zoom
factor for the
browsing context's page. Text and layout reflow at the new size; this is not the
pinch-zoom page scale factor.
The factor must be a finite number greater than zero, otherwise the command
fails with
InvalidParameter. An unknown handle fails with WindowNotFound.
A client that applies per-site zoom of its own on navigation, as Safari does,
may replace
the factor when the page navigates.
Tests: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WebAutomationPageZoom.mm
* Source/WebKit/UIProcess/Automation/Automation.json:
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::setPageZoomFactorOfBrowsingContext):
* Source/WebKit/UIProcess/Automation/WebAutomationSession.h:
* Tools/TestWebKitAPI/SourcesCocoa.txt:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WebAutomationPageZoom.mm: Added.
(TestWebKitAPI::dispatchAutomationCommand):
(TestWebKitAPI::WebAutomationPageZoom::SetUp):
(TestWebKitAPI::WebAutomationPageZoom::TearDown):
(TestWebKitAPI::WebAutomationPageZoom::setPageZoomFactor):
(TestWebKitAPI::WebAutomationPageZoom::devicePixelRatio):
(TestWebKitAPI::TEST_F(WebAutomationPageZoom, SetsPageZoomFactor)):
(TestWebKitAPI::TEST_F(WebAutomationPageZoom, RejectsNonPositiveZoomFactor)):
(TestWebKitAPI::TEST_F(WebAutomationPageZoom, RejectsUnknownBrowsingContext)):
(TestWebKitAPI::TEST_F(WebAutomationPageZoom, RejectsMissingZoomFactor)):
Canonical link: https://commits.webkit.org/323005@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications