Adjust naming of action menu SPI
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Jan 2015 23:46:06 +0000 (23:46 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Jan 2015 23:46:06 +0000 (23:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=140644
<rdar://problem/19448129>

Reviewed by Brian Weinstein.

* platform/spi/mac/NSViewSPI.h:
Add an underscore.

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController prepareForMenu:withEvent:]):
(-[WebActionMenuController willOpenMenu:withEvent:]):
(-[WebActionMenuController didCloseMenu:withEvent:]):
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView prepareForMenu:withEvent:]):
(-[WebView willOpenMenu:withEvent:]):
(-[WebView didCloseMenu:withEvent:]):

* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processPool:configuration:webView:]):
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
(-[WKActionMenuController willOpenMenu:withEvent:]):
(-[WKActionMenuController didCloseMenu:withEvent:]):
(-[WKActionMenuController menuNeedsUpdate:]):
(-[WKActionMenuController _updateActionMenuItems]):

* TestWebKitAPI/Tests/WebKit2ObjC/ActionMenus.mm:
(-[ActionMenusTestWKView runMenuSequenceAtPoint:preDidCloseMenuHandler:]):
(TestWebKitAPI::TEST):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/spi/mac/NSViewSPI.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebActionMenuController.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/mac/WKActionMenuController.mm
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2ObjC/ActionMenus.mm

index 38324c9..9dc3219 100644 (file)
@@ -1,3 +1,14 @@
+2015-01-19  Timothy Horton  <timothy_horton@apple.com>
+
+        Adjust naming of action menu SPI
+        https://bugs.webkit.org/show_bug.cgi?id=140644
+        <rdar://problem/19448129>
+
+        Reviewed by Brian Weinstein.
+
+        * platform/spi/mac/NSViewSPI.h:
+        Add an underscore.
+
 2015-01-19  Dhi Aurrahman  <diorahman@rockybars.com>
 
         Canonicalization of :lang() should preserve the :lang()'s arguments representations
index 24c58c6..23d8378 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if USE(APPLE_INTERNAL_SDK) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101002
-
-#import <AppKit/NSView_Private.h>
-
-#else
+// FIXME: This should include private headers when possible.
 
 #import <AppKit/NSView.h>
 
 @interface NSView (Private)
-@property (strong) NSMenu *actionMenu;
+@property (strong) NSMenu *_actionMenu;
 @end
-
-#endif
index 94cfc83..c63c5f9 100644 (file)
@@ -1,3 +1,21 @@
+2015-01-19  Timothy Horton  <timothy_horton@apple.com>
+
+        Adjust naming of action menu SPI
+        https://bugs.webkit.org/show_bug.cgi?id=140644
+        <rdar://problem/19448129>
+
+        Reviewed by Brian Weinstein.
+
+        * WebView/WebActionMenuController.mm:
+        (-[WebActionMenuController prepareForMenu:withEvent:]):
+        (-[WebActionMenuController willOpenMenu:withEvent:]):
+        (-[WebActionMenuController didCloseMenu:withEvent:]):
+        * WebView/WebView.mm:
+        (-[WebView _commonInitializationWithFrameName:groupName:]):
+        (-[WebView prepareForMenu:withEvent:]):
+        (-[WebView willOpenMenu:withEvent:]):
+        (-[WebView didCloseMenu:withEvent:]):
+
 2015-01-19  Beth Dakin  <bdakin@apple.com>
 
         REGRESSION (r178290): Yellow highlight from context menu Lookup in Dictionary is 
index 4b25b93..51d5514 100644 (file)
@@ -123,7 +123,7 @@ using namespace WebCore;
     if (!_webView)
         return;
 
-    NSMenu *actionMenu = _webView.actionMenu;
+    NSMenu *actionMenu = _webView._actionMenu;
     if (menu != actionMenu)
         return;
 
@@ -174,7 +174,7 @@ using namespace WebCore;
 
 - (void)willOpenMenu:(NSMenu *)menu withEvent:(NSEvent *)event
 {
-    if (menu != _webView.actionMenu)
+    if (menu != _webView._actionMenu)
         return;
 
     if (!menu.numberOfItems)
@@ -206,7 +206,7 @@ using namespace WebCore;
 
 - (void)didCloseMenu:(NSMenu *)menu withEvent:(NSEvent *)event
 {
-    if (menu != _webView.actionMenu)
+    if (menu != _webView._actionMenu)
         return;
 
     if (_currentActionContext && _hasActivatedActionContext) {
index 9519099..7d38cd2 100644 (file)
@@ -891,9 +891,9 @@ static void WebKitInitializeGamepadProviderIfNecessary()
 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
     if ([self respondsToSelector:@selector(setActionMenu:)]) {
         RetainPtr<NSMenu> actionMenu = adoptNS([[NSMenu alloc] init]);
-        self.actionMenu = actionMenu.get();
+        self._actionMenu = actionMenu.get();
         _private->actionMenuController = [[WebActionMenuController alloc] initWithWebView:self];
-        self.actionMenu.autoenablesItems = NO;
+        self._actionMenu.autoenablesItems = NO;
     }
 
     if (Class gestureClass = NSClassFromString(@"NSImmediateActionGestureRecognizer")) {
@@ -8581,7 +8581,7 @@ static void glibContextIterationCallback(CFRunLoopObserverRef, CFRunLoopActivity
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
 - (void)prepareForMenu:(NSMenu *)menu withEvent:(NSEvent *)event
 {
-    if (menu != self.actionMenu)
+    if (menu != self._actionMenu)
         return;
 
     [_private->actionMenuController prepareForMenu:menu withEvent:event];
@@ -8589,7 +8589,7 @@ static void glibContextIterationCallback(CFRunLoopObserverRef, CFRunLoopActivity
 
 - (void)willOpenMenu:(NSMenu *)menu withEvent:(NSEvent *)event
 {
-    if (menu != self.actionMenu)
+    if (menu != self._actionMenu)
         return;
 
     [_private->actionMenuController willOpenMenu:menu withEvent:event];
@@ -8597,7 +8597,7 @@ static void glibContextIterationCallback(CFRunLoopObserverRef, CFRunLoopActivity
 
 - (void)didCloseMenu:(NSMenu *)menu withEvent:(NSEvent *)event
 {
-    if (menu != self.actionMenu)
+    if (menu != self._actionMenu)
         return;
 
     [_private->actionMenuController didCloseMenu:menu withEvent:event];
index 295a29c..66ad935 100644 (file)
@@ -1,3 +1,20 @@
+2015-01-19  Timothy Horton  <timothy_horton@apple.com>
+
+        Adjust naming of action menu SPI
+        https://bugs.webkit.org/show_bug.cgi?id=140644
+        <rdar://problem/19448129>
+
+        Reviewed by Brian Weinstein.
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView initWithFrame:processPool:configuration:webView:]):
+        * UIProcess/mac/WKActionMenuController.mm:
+        (-[WKActionMenuController prepareForMenu:withEvent:]):
+        (-[WKActionMenuController willOpenMenu:withEvent:]):
+        (-[WKActionMenuController didCloseMenu:withEvent:]):
+        (-[WKActionMenuController menuNeedsUpdate:]):
+        (-[WKActionMenuController _updateActionMenuItems]):
+
 2015-01-19  Zan Dobersek  <zdobersek@igalia.com>
 
         [CoordinatedGraphics] Use C++ lambda instead of WTF::bind() in ThreadedCompositor::updateSceneState()
index 7da345e..d76ba85 100644 (file)
@@ -3615,10 +3615,10 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
     if ([self respondsToSelector:@selector(setActionMenu:)]) {
         RetainPtr<NSMenu> menu = adoptNS([[NSMenu alloc] init]);
-        self.actionMenu = menu.get();
+        self._actionMenu = menu.get();
         _data->_actionMenuController = adoptNS([[WKActionMenuController alloc] initWithPage:*_data->_page view:self]);
-        self.actionMenu.delegate = _data->_actionMenuController.get();
-        self.actionMenu.autoenablesItems = NO;
+        self._actionMenu.delegate = _data->_actionMenuController.get();
+        self._actionMenu.autoenablesItems = NO;
     }
 
     if (Class gestureClass = NSClassFromString(@"NSImmediateActionGestureRecognizer")) {
index ff6874c..c3fd62a 100644 (file)
@@ -96,7 +96,7 @@ using namespace WebKit;
 
 - (void)prepareForMenu:(NSMenu *)menu withEvent:(NSEvent *)event
 {
-    if (menu != _wkView.actionMenu)
+    if (menu != _wkView._actionMenu)
         return;
 
     [_wkView _dismissContentRelativeChildWindows];
@@ -114,7 +114,7 @@ using namespace WebKit;
 
 - (void)willOpenMenu:(NSMenu *)menu withEvent:(NSEvent *)event
 {
-    if (menu != _wkView.actionMenu)
+    if (menu != _wkView._actionMenu)
         return;
 
     if (!menu.numberOfItems)
@@ -147,7 +147,7 @@ using namespace WebKit;
 
 - (void)didCloseMenu:(NSMenu *)menu withEvent:(NSEvent *)event
 {
-    if (menu != _wkView.actionMenu)
+    if (menu != _wkView._actionMenu)
         return;
 
     [self _clearActionMenuState];
@@ -505,7 +505,7 @@ static NSString *pathToPhotoOnDisk(NSString *suggestedFilename)
 
 - (void)menuNeedsUpdate:(NSMenu *)menu
 {
-    if (menu != _wkView.actionMenu)
+    if (menu != _wkView._actionMenu)
         return;
 
     ASSERT(_state != ActionMenuState::None);
@@ -749,7 +749,7 @@ static NSString *pathToPhotoOnDisk(NSString *suggestedFilename)
 
 - (void)_updateActionMenuItems
 {
-    [_wkView.actionMenu removeAllItems];
+    [_wkView._actionMenu removeAllItems];
 
     NSArray *menuItems = [self _defaultMenuItems];
     RefPtr<WebHitTestResult> hitTestResult = [self _webHitTestResult];
@@ -760,10 +760,10 @@ static NSString *pathToPhotoOnDisk(NSString *suggestedFilename)
         menuItems = [_wkView _actionMenuItemsForHitTestResult:toAPI(hitTestResult.get()) withType:_type defaultActionMenuItems:menuItems userData:toAPI(_userData.get())];
 
     for (NSMenuItem *item in menuItems)
-        [_wkView.actionMenu addItem:item];
+        [_wkView._actionMenu addItem:item];
 
-    if (!_wkView.actionMenu.numberOfItems)
-        [_wkView.actionMenu cancelTracking];
+    if (!_wkView._actionMenu.numberOfItems)
+        [_wkView._actionMenu cancelTracking];
 }
 
 @end
index 985f127..49765dc 100644 (file)
@@ -1,3 +1,15 @@
+2015-01-19  Timothy Horton  <timothy_horton@apple.com>
+
+        Adjust naming of action menu SPI
+        https://bugs.webkit.org/show_bug.cgi?id=140644
+        <rdar://problem/19448129>
+
+        Reviewed by Brian Weinstein.
+
+        * TestWebKitAPI/Tests/WebKit2ObjC/ActionMenus.mm:
+        (-[ActionMenusTestWKView runMenuSequenceAtPoint:preDidCloseMenuHandler:]):
+        (TestWebKitAPI::TEST):
+
 2015-01-19  Michael Catanzaro  <mcatanzaro@igalia.com>
 
         [GTK] Generate the make dist manifest from a CMake template file
index 8eac7ad..4a84d3b 100644 (file)
@@ -51,7 +51,7 @@ static bool didFinishDownload = false;
 - (void)willOpenMenu:(NSMenu *)menu withEvent:(NSEvent *)event;
 - (void)didCloseMenu:(NSMenu *)menu withEvent:(NSEvent *)event;
 
-- (NSMenu *)actionMenu;
+- (NSMenu *)_actionMenu;
 - (void)copy:(id)sender;
 
 @end
@@ -108,7 +108,7 @@ struct ActionMenuResult {
 {
     __block bool didFinishSequence = false;
 
-    NSMenu *actionMenu = self.actionMenu;
+    NSMenu *actionMenu = self._actionMenu;
     RetainPtr<NSEvent> event = [NSEvent mouseEventWithType:NSLeftMouseDown location:point modifierFlags:0 timestamp:0 windowNumber:self.window.windowNumber context:0 eventNumber:0 clickCount:0 pressure:0];
 
     dispatch_async(dispatch_get_main_queue(), ^{
@@ -480,7 +480,7 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
     [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::Word) preDidCloseMenuHandler:^() {
         EXPECT_EQ(kWKActionMenuReadOnlyText, [wkView _actionMenuResult].type);
         EXPECT_WK_STREQ(@"word", retrieveSelection([wkView pageRef]));
-        performMenuItemAtIndexOfTypeAsync([wkView actionMenu], 0, kWKContextActionItemTagCopyText);
+        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyText);
         EXPECT_WK_STREQ(@"word", watchPasteboardForString());
     }];
 
@@ -488,7 +488,7 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
     [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::Phrase) preDidCloseMenuHandler:^() {
         EXPECT_EQ(kWKActionMenuReadOnlyText, [wkView _actionMenuResult].type);
         EXPECT_WK_STREQ(@"New York", retrieveSelection([wkView pageRef]));
-        performMenuItemAtIndexOfTypeAsync([wkView actionMenu], 0, kWKContextActionItemTagCopyText);
+        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyText);
         EXPECT_WK_STREQ(@"New York", watchPasteboardForString());
     }];
 
@@ -518,7 +518,7 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
     [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::ContentEditableWords) preDidCloseMenuHandler:^() {
         EXPECT_EQ(kWKActionMenuEditableText, [wkView _actionMenuResult].type);
         EXPECT_WK_STREQ(@"editable", retrieveSelection([wkView pageRef]));
-        performMenuItemAtIndexOfTypeAsync([wkView actionMenu], 0, kWKContextActionItemTagCopyText);
+        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyText);
         EXPECT_WK_STREQ(@"editable", watchPasteboardForString());
     }];
 
@@ -526,7 +526,7 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
     [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::ContentEditablePhrase) preDidCloseMenuHandler:^() {
         EXPECT_EQ(kWKActionMenuEditableText, [wkView _actionMenuResult].type);
         EXPECT_WK_STREQ(@"New York", retrieveSelection([wkView pageRef]));
-        performMenuItemAtIndexOfTypeAsync([wkView actionMenu], 0, kWKContextActionItemTagCopyText);
+        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyText);
         EXPECT_WK_STREQ(@"New York", watchPasteboardForString());
     }];
 
@@ -536,7 +536,7 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
         [[NSPasteboard generalPasteboard] clearContents];
         [[NSPasteboard generalPasteboard] setString:@"pasted string" forType:NSPasteboardTypeString];
         EXPECT_WK_STREQ(@"editable", retrieveSelection([wkView pageRef]));
-        performMenuItemAtIndexOfTypeAsync([wkView actionMenu], 2, kWKContextActionItemTagPaste);
+        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 2, kWKContextActionItemTagPaste);
 
         // Now check and see if our paste succeeded. It should only replace one 'editable'.
         watchEditableAreaForString([wkView pageRef], "editable1", "pasted string editable editable editable");
@@ -548,7 +548,7 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
         [[NSPasteboard generalPasteboard] clearContents];
         [[NSPasteboard generalPasteboard] setString:@"pasted over phrase" forType:NSPasteboardTypeString];
         EXPECT_WK_STREQ(@"New York", retrieveSelection([wkView pageRef]));
-        performMenuItemAtIndexOfTypeAsync([wkView actionMenu], 2, kWKContextActionItemTagPaste);
+        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 2, kWKContextActionItemTagPaste);
 
         // Now check and see if our paste succeeded, and replaced the whole phrase.
         watchEditableAreaForString([wkView pageRef], "editable2", "pasted over phrase some words");
@@ -558,7 +558,7 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
     [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::TextInputWords) preDidCloseMenuHandler:^() {
         EXPECT_EQ(kWKActionMenuEditableText, [wkView _actionMenuResult].type);
         EXPECT_WK_STREQ(@"editable", retrieveSelectionInElement([wkView pageRef], "input1"));
-        performMenuItemAtIndexOfTypeAsync([wkView actionMenu], 0, kWKContextActionItemTagCopyText);
+        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyText);
         EXPECT_WK_STREQ(@"editable", watchPasteboardForString());
     }];
 
@@ -566,7 +566,7 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
     [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::TextInputPhrase) preDidCloseMenuHandler:^() {
         EXPECT_EQ(kWKActionMenuEditableText, [wkView _actionMenuResult].type);
         EXPECT_WK_STREQ(@"New York", retrieveSelectionInElement([wkView pageRef], "input2"));
-        performMenuItemAtIndexOfTypeAsync([wkView actionMenu], 0, kWKContextActionItemTagCopyText);
+        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyText);
         EXPECT_WK_STREQ(@"New York", watchPasteboardForString());
     }];
 
@@ -576,7 +576,7 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
         [[NSPasteboard generalPasteboard] clearContents];
         [[NSPasteboard generalPasteboard] setString:@"pasted string" forType:NSPasteboardTypeString];
         EXPECT_WK_STREQ(@"editable", retrieveSelectionInElement([wkView pageRef], "input1"));
-        performMenuItemAtIndexOfTypeAsync([wkView actionMenu], 2, kWKContextActionItemTagPaste);
+        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 2, kWKContextActionItemTagPaste);
 
         // Now check and see if our paste succeeded. It should only replace one 'editable'.
         watchEditableAreaForString([wkView pageRef], "input1", "pasted string editable editable editable");
@@ -588,7 +588,7 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
         [[NSPasteboard generalPasteboard] clearContents];
         [[NSPasteboard generalPasteboard] setString:@"pasted over phrase" forType:NSPasteboardTypeString];
         EXPECT_WK_STREQ(@"New York", retrieveSelectionInElement([wkView pageRef], "input2"));
-        performMenuItemAtIndexOfTypeAsync([wkView actionMenu], 2, kWKContextActionItemTagPaste);
+        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 2, kWKContextActionItemTagPaste);
 
         // Now check and see if our paste succeeded, and replaced the whole phrase.
         watchEditableAreaForString([wkView pageRef], "input2", "pasted over phrase some words");
@@ -598,7 +598,7 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
     [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::TextAreaWords) preDidCloseMenuHandler:^() {
         EXPECT_EQ(kWKActionMenuEditableText, [wkView _actionMenuResult].type);
         EXPECT_WK_STREQ(@"editable", retrieveSelectionInElement([wkView pageRef], "textarea1"));
-        performMenuItemAtIndexOfTypeAsync([wkView actionMenu], 0, kWKContextActionItemTagCopyText);
+        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyText);
         EXPECT_WK_STREQ(@"editable", watchPasteboardForString());
     }];
 
@@ -606,7 +606,7 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
     [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::TextAreaPhrase) preDidCloseMenuHandler:^() {
         EXPECT_EQ(kWKActionMenuEditableText, [wkView _actionMenuResult].type);
         EXPECT_WK_STREQ(@"New York", retrieveSelectionInElement([wkView pageRef], "textarea2"));
-        performMenuItemAtIndexOfTypeAsync([wkView actionMenu], 0, kWKContextActionItemTagCopyText);
+        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyText);
         EXPECT_WK_STREQ(@"New York", watchPasteboardForString());
     }];
 
@@ -616,7 +616,7 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
         [[NSPasteboard generalPasteboard] clearContents];
         [[NSPasteboard generalPasteboard] setString:@"pasted" forType:NSPasteboardTypeString];
         EXPECT_WK_STREQ(@"editable", retrieveSelectionInElement([wkView pageRef], "textarea1"));
-        performMenuItemAtIndexOfTypeAsync([wkView actionMenu], 2, kWKContextActionItemTagPaste);
+        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 2, kWKContextActionItemTagPaste);
 
         // Now check and see if our paste succeeded. It should only replace one 'editable'.
         watchEditableAreaForString([wkView pageRef], "textarea1", "pasted editable editable editable");
@@ -628,7 +628,7 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
         [[NSPasteboard generalPasteboard] clearContents];
         [[NSPasteboard generalPasteboard] setString:@"pasted over phrase" forType:NSPasteboardTypeString];
         EXPECT_WK_STREQ(@"New York", retrieveSelectionInElement([wkView pageRef], "textarea2"));
-        performMenuItemAtIndexOfTypeAsync([wkView actionMenu], 2, kWKContextActionItemTagPaste);
+        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 2, kWKContextActionItemTagPaste);
 
         // Now check and see if our paste succeeded, and replaced the whole phrase.
         watchEditableAreaForString([wkView pageRef], "textarea2", "pasted over phrase some words");
@@ -638,7 +638,7 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
     [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::Image) preDidCloseMenuHandler:^() {
         EXPECT_EQ(kWKActionMenuImage, [wkView _actionMenuResult].type);
 
-        performMenuItemAtIndexOfTypeAsync([wkView actionMenu], 0, kWKContextActionItemTagCopyImage);
+        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyImage);
         NSImage *image = watchPasteboardForImage();
 
         EXPECT_EQ(215, image.size.width);
@@ -651,7 +651,7 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
         EXPECT_EQ(kWKActionMenuImage, [wkView _actionMenuResult].type);
 
         didFinishDownload = false;
-        performMenuItemAtIndexOfTypeAsync([wkView actionMenu], 2, kWKContextActionItemTagSaveImageToDownloads);
+        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 2, kWKContextActionItemTagSaveImageToDownloads);
         Util::run(&didFinishDownload);
     }];
     activeDownloadContext.shouldCheckForImage = false;
@@ -668,7 +668,7 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
     [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::Video) preDidCloseMenuHandler:^() {
         EXPECT_EQ(kWKActionMenuVideo, [wkView _actionMenuResult].type);
 
-        performMenuItemAtIndexOfTypeAsync([wkView actionMenu], 0, kWKContextActionItemTagCopyVideoURL);
+        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyVideoURL);
         NSString *videoURL = watchPasteboardForString();
         EXPECT_WK_STREQ(@"test.mp4", [videoURL lastPathComponent]);
     }];
@@ -678,12 +678,12 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
     [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::MSEVideo) preDidCloseMenuHandler:^() {
         EXPECT_EQ(kWKActionMenuVideo, [wkView _actionMenuResult].type);
 
-        performMenuItemAtIndexOfTypeAsync([wkView actionMenu], 0, kWKContextActionItemTagCopyVideoURL);
+        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyVideoURL);
         NSString *videoURL = watchPasteboardForString();
         EXPECT_WK_STREQ(@"action-menu-targets.html", [videoURL lastPathComponent]);
 
         // Also, the download menu item should be disabled for non-downloadable video.
-        ensureMenuItemAtIndexOfTypeIsDisabled([wkView actionMenu], 2, kWKContextActionItemTagSaveVideoToDownloads);
+        ensureMenuItemAtIndexOfTypeIsDisabled([wkView _actionMenu], 2, kWKContextActionItemTagSaveVideoToDownloads);
     }];
 
     // HTTP link.
@@ -721,8 +721,8 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
     RetainPtr<NSMenuItem> item = adoptNS([[NSMenuItem alloc] initWithTitle:@"Some Action" action:@selector(copy:) keyEquivalent:@""]);
     [wkView _setOverrideActionMenuItems:@[ item.get() ]];
     [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::Image) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(1, [wkView actionMenu].numberOfItems);
-        EXPECT_WK_STREQ(@"Some Action", [[wkView actionMenu] itemAtIndex:0].title);
+        EXPECT_EQ(1, [wkView _actionMenu].numberOfItems);
+        EXPECT_WK_STREQ(@"Some Action", [[wkView _actionMenu] itemAtIndex:0].title);
     }];
     [wkView _setOverrideActionMenuItems:nil];
 
@@ -736,7 +736,7 @@ TEST(WebKit2, DISABLED_ActionMenusTest)
     // No menu should be built for whitespace (except in editable areas).
     [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::PageWhitespace) preDidCloseMenuHandler:^() {
         EXPECT_EQ(kWKActionMenuNone, [wkView _actionMenuResult].type);
-        EXPECT_EQ(0, [wkView actionMenu].numberOfItems);
+        EXPECT_EQ(0, [wkView _actionMenu].numberOfItems);
     }];
 }