Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7b312e8e9f18faa378255c49f3ab63c3ff2ea057
https://github.com/WebKit/WebKit/commit/7b312e8e9f18faa378255c49f3ab63c3ff2ea057
Author: Andres Gonzalez <[email protected]>
Date: 2023-05-02 (Tue, 02 May 2023)
Changed paths:
M Source/WebCore/loader/EmptyClients.cpp
M Source/WebCore/loader/EmptyFrameLoaderClient.h
M Source/WebCore/loader/FrameLoaderClient.h
M Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h
M Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm
M Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm
M Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
M Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h
Log Message:
-----------
AX: Avoid hitting the main thread to retrieve position and size of
WKAccessibilityWebPageObjects in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=256207
<rdar://problem/108787870>
Reviewed by Chris Dumez and Tyler Wilcock.
The WKAccessibilityWebPageObject methods accessibilityAttributePositionValue
and accessibilityAttributeSizeValue are contributors to the thread contention
occurring during page load while AT client is querying for accessibility data.
Currently these methods always hit the main thread. With this change, we cache
and update these properties and thus avoid hitting the main thread, improving
responsiveness to AT clients.
In addition, this patch also allows the caching of the root of the isolated
tree in WKAccessibilityWebPageObject which will be used in a follow up change.
* Source/WebCore/loader/EmptyClients.cpp:
(WebCore::EmptyFrameLoaderClient::setAXIsolatedTreeRoot):
* Source/WebCore/loader/EmptyFrameLoaderClient.h:
* Source/WebCore/loader/FrameLoaderClient.h:
* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::setAXIsolatedTreeRoot):
* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setSize):
(WebKit::WebPage::windowAndViewFramesChanged):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h:
* Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
(-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]):
(-[WKAccessibilityWebPageObjectBase setWebPage:]):
(-[WKAccessibilityWebPageObjectBase setPosition:]):
(-[WKAccessibilityWebPageObjectBase setSize:]):
(-[WKAccessibilityWebPageObjectBase setIsolatedTreeRoot:]):
* Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
(-[WKAccessibilityWebPageObject accessibilityChildren]):
(-[WKAccessibilityWebPageObject accessibilityAttributeSizeValue]):
(-[WKAccessibilityWebPageObject accessibilityAttributePositionValue]):
* Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::cacheAXPosition):
(WebKit::WebPage::cacheAXSize):
(WebKit::WebPage::setAXIsolatedTreeRoot):
* Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h:
Canonical link: https://commits.webkit.org/263618@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes