[webkit-changes] [WebKit/WebKit] 10f56d: [Remote Inspection] Add SPI to make it possible to...
Wenson Hsieh
noreply at github.com
Fri Mar 22 15:37:57 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 10f56d8c541aa03898e9f1120e687d16d604d2a4
https://github.com/WebKit/WebKit/commit/10f56d8c541aa03898e9f1120e687d16d604d2a4
Author: Wenson Hsieh <wenson_hsieh at apple.com>
Date: 2024-03-22 (Fri, 22 Mar 2024)
Changed paths:
M LayoutTests/TestExpectations
A LayoutTests/fast/element-targeting/basic-element-targeting-expected.html
A LayoutTests/fast/element-targeting/basic-element-targeting.html
M LayoutTests/platform/ios-wk2/TestExpectations
M LayoutTests/platform/mac-wk2/TestExpectations
M LayoutTests/resources/ui-helper.js
M Source/WebCore/page/ElementTargeting.cpp
M Source/WebCore/page/ElementTargeting.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
M Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl
M Tools/TestRunnerShared/UIScriptContext/UIScriptController.h
M Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.h
M Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm
Log Message:
-----------
[Remote Inspection] Add SPI to make it possible to inspect content under targeted elements
https://bugs.webkit.org/show_bug.cgi?id=271475
Reviewed by Aditya Keerthi.
Introduce `-_adjustVisibilityForTargetedElements:completionHandler:`, and hook it up to the newly-
landed visibility adjustment infrastructure in WebCore. See below for more details.
* LayoutTests/TestExpectations:
* LayoutTests/fast/element-targeting/basic-element-targeting-expected.html: Added.
* LayoutTests/fast/element-targeting/basic-element-targeting.html: Added.
* LayoutTests/platform/ios-wk2/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
Add a test directory (and basic test) to exercise this new SPI.
* LayoutTests/resources/ui-helper.js:
(window.UIHelper.requestRenderedTextForSelector):
(window.UIHelper.adjustVisibilityForFrontmostTarget):
(window.UIHelper):
Add a testing hook that allows layout tests to exercise element targeting.
* Source/WebCore/page/ElementTargeting.cpp:
(WebCore::setNeedsVisibilityAdjustmentRecursive):
(WebCore::adjustVisibilityForTargetedElements):
* Source/WebCore/page/ElementTargeting.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _adjustVisibilityForTargetedElements:completionHandler:]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::adjustVisibilityForTargetedElements):
Add plumbing through `WebPageProxy` and `WebPage`, down into WebCore.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::adjustVisibilityForTargetedElements):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
* Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* Tools/TestRunnerShared/UIScriptContext/UIScriptController.h:
(WTR::UIScriptController::adjustVisibilityForFrontmostTarget):
* Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.h:
* Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm:
(WTR::UIScriptControllerCocoa::adjustVisibilityForFrontmostTarget):
Canonical link: https://commits.webkit.org/276573@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list