Changeset 278767 in webkit
- Timestamp:
- Jun 11, 2021, 10:46:08 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 23 edited
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/highlight/AppHighlightStorage.h (modified) (2 diffs)
-
Source/WebCore/en.lproj/Localizable.strings (modified) (2 diffs)
-
Source/WebCore/page/ContextMenuController.cpp (modified) (4 diffs)
-
Source/WebCore/platform/ContextMenuItem.cpp (modified) (1 diff)
-
Source/WebCore/platform/ContextMenuItem.h (modified) (1 diff)
-
Source/WebCore/platform/LocalizedStrings.h (modified) (1 diff)
-
Source/WebCore/platform/cocoa/LocalizedStringsCocoa.mm (modified) (1 diff)
-
Source/WebCore/testing/Internals.cpp (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/Shared/API/c/WKContextMenuItemTypes.h (modified) (1 diff)
-
Source/WebKit/Shared/API/c/WKSharedAPICast.h (modified) (2 diffs)
-
Source/WebKit/UIProcess/API/Cocoa/WKMenuItemIdentifiers.mm (modified) (1 diff)
-
Source/WebKit/UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h (modified) (1 diff)
-
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (modified) (1 diff)
-
Source/WebKit/UIProcess/WebPageProxy.cpp (modified) (2 diffs)
-
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (modified) (2 diffs)
-
Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm (modified) (1 diff)
-
Source/WebKitLegacy/mac/ChangeLog (modified) (1 diff)
-
Source/WebKitLegacy/mac/WebView/WebHTMLView.mm (modified) (1 diff)
-
Source/WebKitLegacy/mac/WebView/WebUIDelegatePrivate.h (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r278765 r278767 1 2021-06-11 Megan Gardner <megan_gardner@apple.com> 2 3 Rename AppHighlight group to QuickNote to correctly reflect feature. 4 https://bugs.webkit.org/show_bug.cgi?id=226888 5 6 Reviewed by Tim Horton. 7 8 Rename only, no behavior change. 9 10 * Modules/highlight/AppHighlight.h: 11 (WebCore::AppHighlight::encode const): 12 (WebCore::AppHighlight::decode): 13 * Modules/highlight/AppHighlightStorage.cpp: 14 (WebCore::AppHighlightStorage::storeAppHighlight): 15 * Modules/highlight/AppHighlightStorage.h: 16 * en.lproj/Localizable.strings: 17 * page/ContextMenuController.cpp: 18 (WebCore::ContextMenuController::contextMenuItemSelected): 19 (WebCore::ContextMenuController::populate): 20 (WebCore::ContextMenuController::checkOrEnableIfNeeded const): 21 * platform/ContextMenuItem.cpp: 22 (WebCore::isValidContextMenuAction): 23 * platform/ContextMenuItem.h: 24 * platform/LocalizedStrings.h: 25 * platform/cocoa/LocalizedStringsCocoa.mm: 26 (WebCore::contextMenuItemTagAddHighlightToQuickNote): 27 (WebCore::contextMenuItemTagAddHighlightToNewQuickNote): 28 (WebCore::contextMenuItemTagAddHighlightToCurrentGroup): Deleted. 29 (WebCore::contextMenuItemTagAddHighlightToNewGroup): Deleted. 30 * testing/Internals.cpp: 31 (WebCore::Internals::appHighlightContextMenuItemTitles const): 32 1 33 2021-06-11 Cathie Chen <cathiechen@igalia.com> 2 34 -
trunk/Source/WebCore/Modules/highlight/AppHighlightStorage.h
r278340 r278767 26 26 #pragma once 27 27 28 #include "AppHighlight.h" 28 29 #include "AppHighlightRangeData.h" 29 30 #include <wtf/Forward.h> … … 42 43 class StaticRange; 43 44 class Highlight; 44 45 enum class CreateNewGroupForHighlight : bool;46 45 47 46 enum class RestoreWithTextSearch : bool { No, Yes }; -
trunk/Source/WebCore/en.lproj/Localizable.strings
r278618 r278767 131 131 "A JavaScript exception occurred" = "A JavaScript exception occurred"; 132 132 133 /* Add to Quick Note context menu item. */ 134 "Add to Quick Note" = "Add to Quick Note"; 135 133 136 /* Label for the add money with Apple Pay button. */ 134 137 "Add money with Apple Pay" = "Add money with Apple Pay"; … … 626 629 "Mute" = "Mute"; 627 630 631 /* New Quick Note context menu item. */ 632 "New Quick Note" = "New Quick Note"; 633 628 634 /* No Guesses Found context menu item */ 629 635 "No Guesses Found" = "No Guesses Found"; -
trunk/Source/WebCore/page/ContextMenuController.cpp
r278575 r278767 442 442 frame->editor().command("MakeTextWritingDirectionRightToLeft").execute(); 443 443 break; 444 case ContextMenuItemTagAddHighlightToCurrentGroup:445 // FIXME: Add Highlight Logic446 break;447 case ContextMenuItemTagAddHighlightToNewGroup:448 // FIXME: Add Highlight Logic449 break;450 444 #if PLATFORM(COCOA) 451 445 case ContextMenuItemTagSearchInSpotlight: … … 802 796 #endif 803 797 #if ENABLE(APP_HIGHLIGHTS) 804 ContextMenuItem AddHighlightItem(ActionType, ContextMenuItemTagAddHighlightToCurrent Group, contextMenuItemTagAddHighlightToCurrentGroup());805 ContextMenuItem AddHighlightToNew GroupItem(ActionType, ContextMenuItemTagAddHighlightToNewGroup, contextMenuItemTagAddHighlightToNewGroup());798 ContextMenuItem AddHighlightItem(ActionType, ContextMenuItemTagAddHighlightToCurrentQuickNote, contextMenuItemTagAddHighlightToCurrentQuickNote()); 799 ContextMenuItem AddHighlightToNewQuickNoteItem(ActionType, ContextMenuItemTagAddHighlightToNewQuickNote, contextMenuItemTagAddHighlightToNewQuickNote()); 806 800 #endif 807 801 #if !PLATFORM(GTK) … … 969 963 if (auto* page = frame->page()) { 970 964 if (page->settings().appHighlightsEnabled() && !selectionIsInsideImageOverlay) { 971 appendItem(AddHighlightToNew GroupItem, m_contextMenu.get());965 appendItem(AddHighlightToNewQuickNoteItem, m_contextMenu.get()); 972 966 appendItem(AddHighlightItem, m_contextMenu.get()); 973 967 appendItem(*separatorItem(), m_contextMenu.get()); … … 1320 1314 shouldCheck = frame->editor().isContinuousSpellCheckingEnabled(); 1321 1315 break; 1322 case ContextMenuItemTagAddHighlightToCurrent Group:1316 case ContextMenuItemTagAddHighlightToCurrentQuickNote: 1323 1317 shouldEnable = frame->selection().isRange(); 1324 1318 break; 1325 case ContextMenuItemTagAddHighlightToNew Group:1319 case ContextMenuItemTagAddHighlightToNewQuickNote: 1326 1320 shouldEnable = frame->selection().isRange(); 1327 1321 break; -
trunk/Source/WebCore/platform/ContextMenuItem.cpp
r278575 r278767 230 230 case ContextMenuAction::ContextMenuItemTagTextDirectionLeftToRight: 231 231 case ContextMenuAction::ContextMenuItemTagTextDirectionRightToLeft: 232 case ContextMenuAction::ContextMenuItemTagAddHighlightToCurrent Group:233 case ContextMenuAction::ContextMenuItemTagAddHighlightToNew Group:232 case ContextMenuAction::ContextMenuItemTagAddHighlightToCurrentQuickNote: 233 case ContextMenuAction::ContextMenuItemTagAddHighlightToNewQuickNote: 234 234 #if PLATFORM(COCOA) 235 235 case ContextMenuAction::ContextMenuItemTagCorrectSpellingAutomatically: -
trunk/Source/WebCore/platform/ContextMenuItem.h
r278575 r278767 146 146 ContextMenuItemTagShareMenu, 147 147 ContextMenuItemTagToggleVideoEnhancedFullscreen, 148 ContextMenuItemTagAddHighlightToCurrent Group,149 ContextMenuItemTagAddHighlightToNew Group,148 ContextMenuItemTagAddHighlightToCurrentQuickNote, 149 ContextMenuItemTagAddHighlightToNewQuickNote, 150 150 ContextMenuItemTagLookUpImage, 151 151 ContextMenuItemTagTranslate, -
trunk/Source/WebCore/platform/LocalizedStrings.h
r278575 r278767 52 52 #endif 53 53 #if ENABLE(APP_HIGHLIGHTS) 54 WEBCORE_EXPORT String contextMenuItemTagAddHighlightToCurrent Group();55 WEBCORE_EXPORT String contextMenuItemTagAddHighlightToNew Group();54 WEBCORE_EXPORT String contextMenuItemTagAddHighlightToCurrentQuickNote(); 55 WEBCORE_EXPORT String contextMenuItemTagAddHighlightToNewQuickNote(); 56 56 #endif 57 57 -
trunk/Source/WebCore/platform/cocoa/LocalizedStringsCocoa.mm
r278575 r278767 59 59 } 60 60 #if ENABLE(APP_HIGHLIGHTS) 61 String contextMenuItemTagAddHighlightToCurrent Group()62 { 63 return localizedNSString(@"Add Highlight To Current Group");64 } 65 66 String contextMenuItemTagAddHighlightToNew Group()67 { 68 return localizedNSString(@" Add Highlight To New Group");61 String contextMenuItemTagAddHighlightToCurrentQuickNote() 62 { 63 return localizedNSString(@"Add to Quick Note"); 64 } 65 66 String contextMenuItemTagAddHighlightToNewQuickNote() 67 { 68 return localizedNSString(@"New Quick Note"); 69 69 } 70 70 #endif -
trunk/Source/WebCore/testing/Internals.cpp
r278690 r278767 6092 6092 { 6093 6093 return {{ 6094 contextMenuItemTagAddHighlightToCurrent Group(),6095 contextMenuItemTagAddHighlightToNew Group(),6094 contextMenuItemTagAddHighlightToCurrentQuickNote(), 6095 contextMenuItemTagAddHighlightToNewQuickNote(), 6096 6096 }}; 6097 6097 } -
trunk/Source/WebKit/ChangeLog
r278761 r278767 1 2021-06-11 Megan Gardner <megan_gardner@apple.com> 2 3 Rename AppHighlight group to QuickNote to correctly reflect feature. 4 https://bugs.webkit.org/show_bug.cgi?id=226888 5 6 Reviewed by Tim Horton. 7 8 * Scripts/webkit/messages.py: 9 (headers_for_type): 10 * Shared/API/c/WKContextMenuItemTypes.h: 11 * Shared/API/c/WKSharedAPICast.h: 12 (WebKit::toAPI): 13 (WebKit::toImpl): 14 * UIProcess/API/Cocoa/WKMenuItemIdentifiers.mm: 15 * UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h: 16 * UIProcess/API/Cocoa/WKWebView.mm: 17 (-[WKWebView _storeAppHighlight:]): 18 (-[WKWebView _addAppHighlightInNewGroup:originatedInApp:]): 19 (-[WKWebView _addAppHighlightInNewQuickNote:originatedInApp:]): 20 * UIProcess/API/Cocoa/WKWebViewPrivate.h: 21 * UIProcess/API/Cocoa/_WKAppHighlightDelegate.h: 22 * UIProcess/Cocoa/WebPageProxyCocoa.mm: 23 (WebKit::WebPageProxy::createAppHighlightInSelectedRange): 24 * UIProcess/WebPageProxy.cpp: 25 (WebKit::WebPageProxy::contextMenuItemSelected): 26 * UIProcess/WebPageProxy.h: 27 * UIProcess/ios/WKContentViewInteraction.mm: 28 (-[WKContentView targetForAction:withSender:]): 29 (-[WKContentView setUpAppHighlightMenusIfNeeded]): 30 (-[WKContentView createHighlightForCurrentQuickNoteWithRange:]): 31 (-[WKContentView createHighlightForNewQuickNoteWithRange:]): 32 (-[WKContentView createHighlightInCurrentGroupWithRange:]): Deleted. 33 (-[WKContentView createHighlightInNewGroupWithRange:]): Deleted. 34 * UIProcess/mac/WebContextMenuProxyMac.mm: 35 (WebKit::menuItemIdentifier): 36 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 37 (WebKit::WebChromeClient::storeAppHighlight const): 38 * WebProcess/WebPage/WebPage.cpp: 39 (WebKit::WebPage::createAppHighlightInSelectedRange): 40 * WebProcess/WebPage/WebPage.h: 41 (WebKit::WebPage::highlightIsNewQuickNote const): 42 (WebKit::WebPage::highlightIsNewGroup const): Deleted. 43 * WebProcess/WebPage/WebPage.messages.in: 44 1 45 2021-06-11 Michael Catanzaro <mcatanzaro@gnome.org> 2 46 -
trunk/Source/WebKit/Shared/API/c/WKContextMenuItemTypes.h
r274148 r278767 124 124 kWKContextMenuItemTagShareMenu, 125 125 kWKContextMenuItemTagToggleVideoEnhancedFullscreen, 126 kWKContextMenuItemTagAddHighlightToCurrent Group,127 kWKContextMenuItemTagAddHighlightToNew Group,126 kWKContextMenuItemTagAddHighlightToCurrentQuickNote, 127 kWKContextMenuItemTagAddHighlightToNewQuickNote, 128 128 kWKContextMenuItemTagRevealImage, 129 129 kWKContextMenuItemTagTranslate, -
trunk/Source/WebKit/Shared/API/c/WKSharedAPICast.h
r278575 r278767 510 510 case WebCore::ContextMenuItemTagMediaMute: 511 511 return kWKContextMenuItemTagMediaMute; 512 case WebCore::ContextMenuItemTagAddHighlightToCurrent Group:513 return kWKContextMenuItemTagAddHighlightToCurrent Group;514 case WebCore::ContextMenuItemTagAddHighlightToNew Group:515 return kWKContextMenuItemTagAddHighlightToNew Group;512 case WebCore::ContextMenuItemTagAddHighlightToCurrentQuickNote: 513 return kWKContextMenuItemTagAddHighlightToCurrentQuickNote; 514 case WebCore::ContextMenuItemTagAddHighlightToNewQuickNote: 515 return kWKContextMenuItemTagAddHighlightToNewQuickNote; 516 516 #if PLATFORM(COCOA) 517 517 case WebCore::ContextMenuItemTagCorrectSpellingAutomatically: … … 712 712 case kWKContextMenuItemTagMediaMute: 713 713 return WebCore::ContextMenuItemTagMediaMute; 714 case kWKContextMenuItemTagAddHighlightToCurrent Group:715 return WebCore::ContextMenuItemTagAddHighlightToCurrent Group;716 case kWKContextMenuItemTagAddHighlightToNew Group:717 return WebCore::ContextMenuItemTagAddHighlightToNew Group;714 case kWKContextMenuItemTagAddHighlightToCurrentQuickNote: 715 return WebCore::ContextMenuItemTagAddHighlightToCurrentQuickNote; 716 case kWKContextMenuItemTagAddHighlightToNewQuickNote: 717 return WebCore::ContextMenuItemTagAddHighlightToNewQuickNote; 718 718 #if PLATFORM(COCOA) 719 719 case kWKContextMenuItemTagCorrectSpellingAutomatically: -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKMenuItemIdentifiers.mm
r274148 r278767 38 38 NSString * const _WKMenuItemIdentifierInspectElement = @"WKMenuItemIdentifierInspectElement"; 39 39 NSString * const _WKMenuItemIdentifierLookUp = @"WKMenuItemIdentifierLookUp"; 40 NSString * const _WKMenuItemIdentifierAddHighlightToCurrentQuickNote = @"WKMenuItemIdentifierAddHighlightToCurrentQuickNote"; 41 NSString * const _WKMenuItemIdentifierAddHighlightToNewQuickNote = @"WKMenuItemIdentifierAddHighlightToNewQuickNote"; 42 // FIXME: Remove below after staging complete 40 43 NSString * const _WKMenuItemIdentifierAddHighlightToCurrentGroup = @"WKMenuItemIdentifierAddHighlightToCurrentGroup"; 41 44 NSString * const _WKMenuItemIdentifierAddHighlightToNewGroup = @"WKMenuItemIdentifierAddHighlightToNewGroup"; -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h
r274148 r278767 56 56 WK_EXPORT extern NSString * const _WKMenuItemIdentifierSpeechMenu WK_API_AVAILABLE(macos(10.12), ios(10.0)); 57 57 58 WK_EXPORT extern NSString * const _WKMenuItemIdentifierAddHighlightToCurrentQuickNote WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 59 WK_EXPORT extern NSString * const _WKMenuItemIdentifierAddHighlightToNewQuickNote WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 60 61 // FIXME: remove below after staging complete. 58 62 WK_EXPORT extern NSString * const _WKMenuItemIdentifierAddHighlightToCurrentGroup WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 59 63 WK_EXPORT extern NSString * const _WKMenuItemIdentifierAddHighlightToNewGroup WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
r278754 r278767 1565 1565 auto wkHighlight = adoptNS([[_WKAppHighlight alloc] initWithHighlight:highlight.highlight->createNSData().get() text:text image:nil]); 1566 1566 1567 [delegate _webView:self storeAppHighlight:wkHighlight.get() inNewGroup:highlight.isNewGroup == WebCore::CreateNewGroupForHighlight::Yes requestOriginatedInApp:highlight.requestOriginatedInApp == WebCore::HighlightRequestOriginatedInApp::Yes]; 1567 if ([delegate respondsToSelector:@selector(_webView:storeAppHighlight:inNewGroup:requestOriginatedInApp:)]) 1568 [delegate _webView:self storeAppHighlight:wkHighlight.get() inNewGroup:highlight.isNewGroup == WebCore::CreateNewGroupForHighlight::Yes requestOriginatedInApp:highlight.requestOriginatedInApp == WebCore::HighlightRequestOriginatedInApp::Yes]; 1568 1569 } 1569 1570 #endif -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r278575 r278767 6880 6880 return; 6881 6881 6882 case ContextMenuItemTagAddHighlightToNew Group:6882 case ContextMenuItemTagAddHighlightToNewQuickNote: 6883 6883 #if ENABLE(APP_HIGHLIGHTS) 6884 6884 createAppHighlightInSelectedRange(CreateNewGroupForHighlight::Yes, HighlightRequestOriginatedInApp::No); … … 6886 6886 return; 6887 6887 6888 case ContextMenuItemTagAddHighlightToCurrent Group:6888 case ContextMenuItemTagAddHighlightToCurrentQuickNote: 6889 6889 #if ENABLE(APP_HIGHLIGHTS) 6890 6890 createAppHighlightInSelectedRange(CreateNewGroupForHighlight::No, HighlightRequestOriginatedInApp::No); -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r278731 r278767 3861 3861 { 3862 3862 #if ENABLE(APP_HIGHLIGHTS) 3863 if (action == @selector(createHighlight InCurrentGroupWithRange:))3863 if (action == @selector(createHighlightForCurrentQuickNoteWithRange:)) 3864 3864 return self.shouldAllowAppHighlightCreation && _page->appHighlightsVisibility() ? self : nil; 3865 if (action == @selector(createHighlight InNewGroupWithRange:))3865 if (action == @selector(createHighlightForNewQuickNoteWithRange:)) 3866 3866 return self.shouldAllowAppHighlightCreation && !_page->appHighlightsVisibility() ? self : nil; 3867 3867 #endif … … 9330 9330 9331 9331 for (UIMenuItem *menuItem in [[UIMenuController sharedMenuController] menuItems]) { 9332 if ([menuItem action] == @selector(createHighlight InCurrentGroupWithRange:) || [menuItem action] == @selector(createHighlightInNewGroupWithRange:))9332 if ([menuItem action] == @selector(createHighlightForCurrentQuickNoteWithRange:) || [menuItem action] == @selector(createHighlightForNewQuickNoteWithRange:)) 9333 9333 return; 9334 9334 } 9335 9335 9336 auto addHighlightCurrent GroupItem = adoptNS([[UIMenuItem alloc] initWithTitle:WebCore::contextMenuItemTagAddHighlightToCurrentGroup() action:@selector(createHighlightInCurrentGroupWithRange:)]);9337 auto addHighlightNew GroupItem = adoptNS([[UIMenuItem alloc] initWithTitle:WebCore::contextMenuItemTagAddHighlightToNewGroup() action:@selector(createHighlightInNewGroupWithRange:)]);9338 [[UIMenuController sharedMenuController] setMenuItems:@[ addHighlightCurrent GroupItem.get(), addHighlightNewGroupItem.get() ]];9339 } 9340 9341 - (void)createHighlight InCurrentGroupWithRange:(id)sender9336 auto addHighlightCurrentQuickNoteItem = adoptNS([[UIMenuItem alloc] initWithTitle:WebCore::contextMenuItemTagAddHighlightToCurrentQuickNote() action:@selector(createHighlightForCurrentQuickNoteWithRange:)]); 9337 auto addHighlightNewQuickNoteItem = adoptNS([[UIMenuItem alloc] initWithTitle:WebCore::contextMenuItemTagAddHighlightToNewQuickNote() action:@selector(createHighlightForNewQuickNoteWithRange:)]); 9338 [[UIMenuController sharedMenuController] setMenuItems:@[ addHighlightCurrentQuickNoteItem.get(), addHighlightNewQuickNoteItem.get() ]]; 9339 } 9340 9341 - (void)createHighlightForCurrentQuickNoteWithRange:(id)sender 9342 9342 { 9343 9343 _page->createAppHighlightInSelectedRange(WebCore::CreateNewGroupForHighlight::No, WebCore::HighlightRequestOriginatedInApp::No); 9344 9344 } 9345 9345 9346 - (void)createHighlight InNewGroupWithRange:(id)sender9346 - (void)createHighlightForNewQuickNoteWithRange:(id)sender 9347 9347 { 9348 9348 _page->createAppHighlightInSelectedRange(WebCore::CreateNewGroupForHighlight::Yes, WebCore::HighlightRequestOriginatedInApp::No); -
trunk/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
r278575 r278767 410 410 return _WKMenuItemIdentifierLookUp; 411 411 412 case ContextMenuItemTagAddHighlightToCurrent Group:413 return _WKMenuItemIdentifierAddHighlightToCurrent Group;412 case ContextMenuItemTagAddHighlightToCurrentQuickNote: 413 return _WKMenuItemIdentifierAddHighlightToCurrentQuickNote; 414 414 415 case ContextMenuItemTagAddHighlightToNew Group:416 return _WKMenuItemIdentifierAddHighlightToNew Group;415 case ContextMenuItemTagAddHighlightToNewQuickNote: 416 return _WKMenuItemIdentifierAddHighlightToNewQuickNote; 417 417 418 418 case ContextMenuItemTagOpenFrameInNewWindow: -
trunk/Source/WebKitLegacy/mac/ChangeLog
r278715 r278767 1 2021-06-11 Megan Gardner <megan_gardner@apple.com> 2 3 Rename AppHighlight group to QuickNote to correctly reflect feature. 4 https://bugs.webkit.org/show_bug.cgi?id=226888 5 6 Reviewed by Tim Horton. 7 8 * WebView/WebHTMLView.mm: 9 (toTag): 10 * WebView/WebUIDelegatePrivate.h: 11 1 12 2021-06-10 Alex Christensen <achristensen@webkit.org> 2 13 -
trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
r278575 r278767 608 608 case ContextMenuItemTagToggleVideoFullscreen: 609 609 return WebMenuItemTagToggleVideoFullscreen; 610 case ContextMenuItemTagAddHighlightToCurrent Group:611 case ContextMenuItemTagAddHighlightToNew Group:610 case ContextMenuItemTagAddHighlightToCurrentQuickNote: 611 case ContextMenuItemTagAddHighlightToNewQuickNote: 612 612 return std::nullopt; 613 613 case ContextMenuItemTagShareMenu: -
trunk/Source/WebKitLegacy/mac/WebView/WebUIDelegatePrivate.h
r276220 r278767 108 108 WebMenuItemTagShareMenu, 109 109 WebMenuItemTagToggleVideoEnhancedFullscreen, 110 WebMenuItemTagAddHighlightToCurrent Group,111 WebMenuItemTagAddHighlightToNew Group,110 WebMenuItemTagAddHighlightToCurrentQuickNote, 111 WebMenuItemTagAddHighlightToNewQuickNote, 112 112 WebMenuItemTagRevealImage, 113 113 WebMenuItemTagTranslate, -
trunk/Tools/ChangeLog
r278762 r278767 1 2021-06-11 Megan Gardner <megan_gardner@apple.com> 2 3 Rename AppHighlight group to QuickNote to correctly reflect feature. 4 https://bugs.webkit.org/show_bug.cgi?id=226888 5 6 Reviewed by Tim Horton. 7 8 * TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm: 9 (TEST): 10 1 11 2021-06-11 Jonathan Bedard <jbedard@apple.com> 2 12 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm
r278575 r278767 86 86 [webView waitForNextPresentationUpdate]; 87 87 88 auto createHighlight InCurrentGroupWithRangeSelector = NSSelectorFromString(@"createHighlightInCurrentGroupWithRange:");89 auto createHighlight InNewGroupWithRangeSelector = NSSelectorFromString(@"createHighlightInNewGroupWithRange:");88 auto createHighlightForCurrentQuickNoteWithRangeSelector = NSSelectorFromString(@"createHighlightForCurrentQuickNoteWithRange:"); 89 auto createHighlightForNewQuickNoteWithRangeSelector = NSSelectorFromString(@"createHighlightForNewQuickNoteWithRange:"); 90 90 91 91 auto contentView = [webView textInputContentView]; 92 EXPECT_NULL([contentView targetForAction:createHighlight InCurrentGroupWithRangeSelector withSender:nil]);93 EXPECT_NULL([contentView targetForAction:createHighlight InNewGroupWithRangeSelector withSender:nil]);92 EXPECT_NULL([contentView targetForAction:createHighlightForCurrentQuickNoteWithRangeSelector withSender:nil]); 93 EXPECT_NULL([contentView targetForAction:createHighlightForNewQuickNoteWithRangeSelector withSender:nil]); 94 94 95 95 [webView synchronouslyLoadTestPageNamed:@"simple"]; 96 96 [webView selectAll:nil]; 97 97 [webView waitForNextPresentationUpdate]; 98 EXPECT_EQ([contentView targetForAction:createHighlight InCurrentGroupWithRangeSelector withSender:nil], contentView);99 EXPECT_EQ([contentView targetForAction:createHighlight InNewGroupWithRangeSelector withSender:nil], contentView);98 EXPECT_EQ([contentView targetForAction:createHighlightForCurrentQuickNoteWithRangeSelector withSender:nil], contentView); 99 EXPECT_EQ([contentView targetForAction:createHighlightForNewQuickNoteWithRangeSelector withSender:nil], contentView); 100 100 } 101 101
Note:
See TracChangeset
for help on using the changeset viewer.