Title: [294349] branches/safari-7614.1.14.1-branch
Revision
294349
Author
alanc...@apple.com
Date
2022-05-17 14:34:55 -0700 (Tue, 17 May 2022)

Log Message

Cherry-pick r294285. rdar://problem/93385094

    Demote -[WKWebView retrieveAccessibilityTreeData:] to SPI
    https://bugs.webkit.org/show_bug.cgi?id=240494
    rdar://93385094

    Reviewed by Tim Horton.

    This method was only intended for use in MiniBrowser, and should ship as public API on WKWebView. Move the
    declaration and implementation of this over to WKWebViewPrivateForTestingMac.h and WKWebViewTestingMac.mm
    (respectively), and additionally prefix this testing-only SPI with an underscore.

    * UIProcess/API/Cocoa/WKWebView.h:
    * UIProcess/API/Cocoa/WKWebView.mm:
    (-[WKWebView retrieveAccessibilityTreeData:]): Deleted.
    * UIProcess/API/mac/WKWebViewPrivateForTestingMac.h:
    * UIProcess/API/mac/WKWebViewTestingMac.mm:
    (-[WKWebView _retrieveAccessibilityTreeData:]):
    Demote -[WKWebView retrieveAccessibilityTreeData:] to SPI
    https://bugs.webkit.org/show_bug.cgi?id=240494
    rdar://93385094

    Reviewed by Tim Horton.

    See WebKit/ChangeLog for more details.

    * MiniBrowser/mac/WK2BrowserWindowController.m:
    (-[WK2BrowserWindowController logAccessibilityTrees:]):

    Canonical link: https://commits.webkit.org/250629@main

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294285 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-7614.1.14.1-branch/Source/WebKit/ChangeLog (294348 => 294349)


--- branches/safari-7614.1.14.1-branch/Source/WebKit/ChangeLog	2022-05-17 21:34:51 UTC (rev 294348)
+++ branches/safari-7614.1.14.1-branch/Source/WebKit/ChangeLog	2022-05-17 21:34:55 UTC (rev 294349)
@@ -1,5 +1,60 @@
 2022-05-17  Alan Coon  <alanc...@apple.com>
 
+        Cherry-pick r294285. rdar://problem/93385094
+
+    Demote -[WKWebView retrieveAccessibilityTreeData:] to SPI
+    https://bugs.webkit.org/show_bug.cgi?id=240494
+    rdar://93385094
+    
+    Reviewed by Tim Horton.
+    
+    This method was only intended for use in MiniBrowser, and should ship as public API on WKWebView. Move the
+    declaration and implementation of this over to WKWebViewPrivateForTestingMac.h and WKWebViewTestingMac.mm
+    (respectively), and additionally prefix this testing-only SPI with an underscore.
+    
+    * UIProcess/API/Cocoa/WKWebView.h:
+    * UIProcess/API/Cocoa/WKWebView.mm:
+    (-[WKWebView retrieveAccessibilityTreeData:]): Deleted.
+    * UIProcess/API/mac/WKWebViewPrivateForTestingMac.h:
+    * UIProcess/API/mac/WKWebViewTestingMac.mm:
+    (-[WKWebView _retrieveAccessibilityTreeData:]):
+    Demote -[WKWebView retrieveAccessibilityTreeData:] to SPI
+    https://bugs.webkit.org/show_bug.cgi?id=240494
+    rdar://93385094
+    
+    Reviewed by Tim Horton.
+    
+    See WebKit/ChangeLog for more details.
+    
+    * MiniBrowser/mac/WK2BrowserWindowController.m:
+    (-[WK2BrowserWindowController logAccessibilityTrees:]):
+    
+    Canonical link: https://commits.webkit.org/250629@main
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-05-16  Wenson Hsieh  <wenson_hs...@apple.com>
+
+            Demote -[WKWebView retrieveAccessibilityTreeData:] to SPI
+            https://bugs.webkit.org/show_bug.cgi?id=240494
+            rdar://93385094
+
+            Reviewed by Tim Horton.
+
+            This method was only intended for use in MiniBrowser, and should not ship as public API on WKWebView. Move the
+            declaration and implementation of this over to WKWebViewPrivateForTestingMac.h and WKWebViewTestingMac.mm
+            (respectively), and additionally prefix this testing-only SPI with an underscore.
+
+            * UIProcess/API/Cocoa/WKWebView.h:
+            * UIProcess/API/Cocoa/WKWebView.mm:
+            (-[WKWebView retrieveAccessibilityTreeData:]): Deleted.
+            * UIProcess/API/mac/WKWebViewPrivateForTestingMac.h:
+            * UIProcess/API/mac/WKWebViewTestingMac.mm:
+            (-[WKWebView _retrieveAccessibilityTreeData:]):
+
+2022-05-17  Alan Coon  <alanc...@apple.com>
+
         Cherry-pick r294190. rdar://problem/91006582
 
     SharedBuffer should be copied and then attributed back to WebContent

Modified: branches/safari-7614.1.14.1-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.h (294348 => 294349)


--- branches/safari-7614.1.14.1-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.h	2022-05-17 21:34:51 UTC (rev 294348)
+++ branches/safari-7614.1.14.1-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.h	2022-05-17 21:34:55 UTC (rev 294349)
@@ -449,8 +449,6 @@
 */
 - (void)createWebArchiveDataWithCompletionHandler:(void (^)(NSData *, NSError *))completionHandler NS_REFINED_FOR_SWIFT WK_API_AVAILABLE(macos(11.0), ios(14.0));
 
-- (void)retrieveAccessibilityTreeData:(void (^)(NSData *, NSError *))completionHandler;
-
 /*! @abstract A Boolean value indicating whether horizontal swipe gestures
  will trigger back-forward list navigations.
  @discussion The default value is NO.

Modified: branches/safari-7614.1.14.1-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (294348 => 294349)


--- branches/safari-7614.1.14.1-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2022-05-17 21:34:51 UTC (rev 294348)
+++ branches/safari-7614.1.14.1-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2022-05-17 21:34:55 UTC (rev 294349)
@@ -1750,14 +1750,6 @@
     });
 }
 
-- (void)retrieveAccessibilityTreeData:(void (^)(NSData *, NSError *))completionHandler
-{
-    THROW_IF_SUSPENDED;
-    _page->getAccessibilityTreeData([completionHandler = makeBlockPtr(completionHandler)] (API::Data* data) {
-        completionHandler(wrapper(data), nil);
-    });
-}
-
 static NSDictionary *dictionaryRepresentationForEditorState(const WebKit::EditorState& state)
 {
     if (state.isMissingPostLayoutData)

Modified: branches/safari-7614.1.14.1-branch/Source/WebKit/UIProcess/API/mac/WKWebViewPrivateForTestingMac.h (294348 => 294349)


--- branches/safari-7614.1.14.1-branch/Source/WebKit/UIProcess/API/mac/WKWebViewPrivateForTestingMac.h	2022-05-17 21:34:51 UTC (rev 294348)
+++ branches/safari-7614.1.14.1-branch/Source/WebKit/UIProcess/API/mac/WKWebViewPrivateForTestingMac.h	2022-05-17 21:34:55 UTC (rev 294349)
@@ -53,6 +53,7 @@
 - (NSSet<NSView *> *)_pdfHUDs;
 
 - (void)_simulateMouseMove:(NSEvent *)event;
+- (void)_retrieveAccessibilityTreeData:(void (^)(NSData *, NSError *))completionHandler;
 
 @end
 

Modified: branches/safari-7614.1.14.1-branch/Source/WebKit/UIProcess/API/mac/WKWebViewTestingMac.mm (294348 => 294349)


--- branches/safari-7614.1.14.1-branch/Source/WebKit/UIProcess/API/mac/WKWebViewTestingMac.mm	2022-05-17 21:34:51 UTC (rev 294348)
+++ branches/safari-7614.1.14.1-branch/Source/WebKit/UIProcess/API/mac/WKWebViewTestingMac.mm	2022-05-17 21:34:55 UTC (rev 294349)
@@ -126,6 +126,13 @@
     return _impl->mouseMoved(event);
 }
 
+- (void)_retrieveAccessibilityTreeData:(void (^)(NSData *, NSError *))completionHandler
+{
+    _page->getAccessibilityTreeData([completionHandler = makeBlockPtr(completionHandler)] (API::Data* data) {
+        completionHandler(wrapper(data), nil);
+    });
+}
+
 @end
 
 #endif // PLATFORM(MAC)

Modified: branches/safari-7614.1.14.1-branch/Tools/ChangeLog (294348 => 294349)


--- branches/safari-7614.1.14.1-branch/Tools/ChangeLog	2022-05-17 21:34:51 UTC (rev 294348)
+++ branches/safari-7614.1.14.1-branch/Tools/ChangeLog	2022-05-17 21:34:55 UTC (rev 294349)
@@ -1,3 +1,52 @@
+2022-05-17  Alan Coon  <alanc...@apple.com>
+
+        Cherry-pick r294285. rdar://problem/93385094
+
+    Demote -[WKWebView retrieveAccessibilityTreeData:] to SPI
+    https://bugs.webkit.org/show_bug.cgi?id=240494
+    rdar://93385094
+    
+    Reviewed by Tim Horton.
+    
+    This method was only intended for use in MiniBrowser, and should ship as public API on WKWebView. Move the
+    declaration and implementation of this over to WKWebViewPrivateForTestingMac.h and WKWebViewTestingMac.mm
+    (respectively), and additionally prefix this testing-only SPI with an underscore.
+    
+    * UIProcess/API/Cocoa/WKWebView.h:
+    * UIProcess/API/Cocoa/WKWebView.mm:
+    (-[WKWebView retrieveAccessibilityTreeData:]): Deleted.
+    * UIProcess/API/mac/WKWebViewPrivateForTestingMac.h:
+    * UIProcess/API/mac/WKWebViewTestingMac.mm:
+    (-[WKWebView _retrieveAccessibilityTreeData:]):
+    Demote -[WKWebView retrieveAccessibilityTreeData:] to SPI
+    https://bugs.webkit.org/show_bug.cgi?id=240494
+    rdar://93385094
+    
+    Reviewed by Tim Horton.
+    
+    See WebKit/ChangeLog for more details.
+    
+    * MiniBrowser/mac/WK2BrowserWindowController.m:
+    (-[WK2BrowserWindowController logAccessibilityTrees:]):
+    
+    Canonical link: https://commits.webkit.org/250629@main
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-05-16  Wenson Hsieh  <wenson_hs...@apple.com>
+
+            Demote -[WKWebView retrieveAccessibilityTreeData:] to SPI
+            https://bugs.webkit.org/show_bug.cgi?id=240494
+            rdar://93385094
+
+            Reviewed by Tim Horton.
+
+            See WebKit/ChangeLog for more details.
+
+            * MiniBrowser/mac/WK2BrowserWindowController.m:
+            (-[WK2BrowserWindowController logAccessibilityTrees:]):
+
 2022-05-16  Russell Epstein  <repst...@apple.com>
 
         Cherry-pick r294264. rdar://problem/93118830

Modified: branches/safari-7614.1.14.1-branch/Tools/MiniBrowser/mac/WK2BrowserWindowController.m (294348 => 294349)


--- branches/safari-7614.1.14.1-branch/Tools/MiniBrowser/mac/WK2BrowserWindowController.m	2022-05-17 21:34:51 UTC (rev 294348)
+++ branches/safari-7614.1.14.1-branch/Tools/MiniBrowser/mac/WK2BrowserWindowController.m	2022-05-17 21:34:55 UTC (rev 294349)
@@ -315,7 +315,7 @@
 #pragma clang diagnostic pop
     [panel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result) {
         if (result == NSModalResponseOK) {
-            [_webView retrieveAccessibilityTreeData:^(NSData *data, NSError *error) {
+            [_webView _retrieveAccessibilityTreeData:^(NSData *data, NSError *error) {
                 [data writeToURL:[panel URL] options:0 error:nil];
             }];
         }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to