⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 278767 in webkit


Ignore:
Timestamp:
Jun 11, 2021, 10:46:08 AM (5 years ago)
Author:
Megan Gardner
Message:

Rename AppHighlight group to QuickNote to correctly reflect feature.
https://bugs.webkit.org/show_bug.cgi?id=226888

Reviewed by Tim Horton.

Source/WebCore:

Rename only, no behavior change.

  • Modules/highlight/AppHighlight.h:

(WebCore::AppHighlight::encode const):
(WebCore::AppHighlight::decode):

  • Modules/highlight/AppHighlightStorage.cpp:

(WebCore::AppHighlightStorage::storeAppHighlight):

  • Modules/highlight/AppHighlightStorage.h:
  • en.lproj/Localizable.strings:
  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::checkOrEnableIfNeeded const):

  • platform/ContextMenuItem.cpp:

(WebCore::isValidContextMenuAction):

  • platform/ContextMenuItem.h:
  • platform/LocalizedStrings.h:
  • platform/cocoa/LocalizedStringsCocoa.mm:

(WebCore::contextMenuItemTagAddHighlightToQuickNote):
(WebCore::contextMenuItemTagAddHighlightToNewQuickNote):
(WebCore::contextMenuItemTagAddHighlightToCurrentGroup): Deleted.
(WebCore::contextMenuItemTagAddHighlightToNewGroup): Deleted.

  • testing/Internals.cpp:

(WebCore::Internals::appHighlightContextMenuItemTitles const):

Source/WebKit:

  • Scripts/webkit/messages.py:

(headers_for_type):

  • Shared/API/c/WKContextMenuItemTypes.h:
  • Shared/API/c/WKSharedAPICast.h:

(WebKit::toAPI):
(WebKit::toImpl):

  • UIProcess/API/Cocoa/WKMenuItemIdentifiers.mm:
  • UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _storeAppHighlight:]):
(-[WKWebView _addAppHighlightInNewGroup:originatedInApp:]):
(-[WKWebView _addAppHighlightInNewQuickNote:originatedInApp:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/_WKAppHighlightDelegate.h:
  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::createAppHighlightInSelectedRange):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::contextMenuItemSelected):

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView targetForAction:withSender:]):
(-[WKContentView setUpAppHighlightMenusIfNeeded]):
(-[WKContentView createHighlightForCurrentQuickNoteWithRange:]):
(-[WKContentView createHighlightForNewQuickNoteWithRange:]):
(-[WKContentView createHighlightInCurrentGroupWithRange:]): Deleted.
(-[WKContentView createHighlightInNewGroupWithRange:]): Deleted.

  • UIProcess/mac/WebContextMenuProxyMac.mm:

(WebKit::menuItemIdentifier):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::storeAppHighlight const):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::createAppHighlightInSelectedRange):

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::highlightIsNewQuickNote const):
(WebKit::WebPage::highlightIsNewGroup const): Deleted.

  • WebProcess/WebPage/WebPage.messages.in:

Source/WebKitLegacy/mac:

  • WebView/WebHTMLView.mm:

(toTag):

  • WebView/WebUIDelegatePrivate.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm:

(TEST):

Location:
trunk
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r278765 r278767  
     12021-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
    1332021-06-11  Cathie Chen  <cathiechen@igalia.com>
    234
  • trunk/Source/WebCore/Modules/highlight/AppHighlightStorage.h

    r278340 r278767  
    2626#pragma once
    2727
     28#include "AppHighlight.h"
    2829#include "AppHighlightRangeData.h"
    2930#include <wtf/Forward.h>
     
    4243class StaticRange;
    4344class Highlight;
    44 
    45 enum class CreateNewGroupForHighlight : bool;
    4645
    4746enum class RestoreWithTextSearch : bool { No, Yes };
  • trunk/Source/WebCore/en.lproj/Localizable.strings

    r278618 r278767  
    131131"A JavaScript exception occurred" = "A JavaScript exception occurred";
    132132
     133/* Add to Quick Note context menu item. */
     134"Add to Quick Note" = "Add to Quick Note";
     135
    133136/* Label for the add money with Apple Pay button. */
    134137"Add money with Apple Pay" = "Add money with Apple Pay";
     
    626629"Mute" = "Mute";
    627630
     631/* New Quick Note context menu item. */
     632"New Quick Note" = "New Quick Note";
     633
    628634/* No Guesses Found context menu item */
    629635"No Guesses Found" = "No Guesses Found";
  • trunk/Source/WebCore/page/ContextMenuController.cpp

    r278575 r278767  
    442442        frame->editor().command("MakeTextWritingDirectionRightToLeft").execute();
    443443        break;
    444     case ContextMenuItemTagAddHighlightToCurrentGroup:
    445         // FIXME: Add Highlight Logic
    446         break;
    447     case ContextMenuItemTagAddHighlightToNewGroup:
    448         // FIXME: Add Highlight Logic
    449         break;
    450444#if PLATFORM(COCOA)
    451445    case ContextMenuItemTagSearchInSpotlight:
     
    802796#endif
    803797#if ENABLE(APP_HIGHLIGHTS)
    804     ContextMenuItem AddHighlightItem(ActionType, ContextMenuItemTagAddHighlightToCurrentGroup, contextMenuItemTagAddHighlightToCurrentGroup());
    805     ContextMenuItem AddHighlightToNewGroupItem(ActionType, ContextMenuItemTagAddHighlightToNewGroup, contextMenuItemTagAddHighlightToNewGroup());
     798    ContextMenuItem AddHighlightItem(ActionType, ContextMenuItemTagAddHighlightToCurrentQuickNote, contextMenuItemTagAddHighlightToCurrentQuickNote());
     799    ContextMenuItem AddHighlightToNewQuickNoteItem(ActionType, ContextMenuItemTagAddHighlightToNewQuickNote, contextMenuItemTagAddHighlightToNewQuickNote());
    806800#endif
    807801#if !PLATFORM(GTK)
     
    969963                if (auto* page = frame->page()) {
    970964                    if (page->settings().appHighlightsEnabled() && !selectionIsInsideImageOverlay) {
    971                         appendItem(AddHighlightToNewGroupItem, m_contextMenu.get());
     965                        appendItem(AddHighlightToNewQuickNoteItem, m_contextMenu.get());
    972966                        appendItem(AddHighlightItem, m_contextMenu.get());
    973967                        appendItem(*separatorItem(), m_contextMenu.get());
     
    13201314            shouldCheck = frame->editor().isContinuousSpellCheckingEnabled();
    13211315            break;
    1322         case ContextMenuItemTagAddHighlightToCurrentGroup:
     1316        case ContextMenuItemTagAddHighlightToCurrentQuickNote:
    13231317            shouldEnable = frame->selection().isRange();
    13241318            break;
    1325         case ContextMenuItemTagAddHighlightToNewGroup:
     1319        case ContextMenuItemTagAddHighlightToNewQuickNote:
    13261320            shouldEnable = frame->selection().isRange();
    13271321            break;
  • trunk/Source/WebCore/platform/ContextMenuItem.cpp

    r278575 r278767  
    230230    case ContextMenuAction::ContextMenuItemTagTextDirectionLeftToRight:
    231231    case ContextMenuAction::ContextMenuItemTagTextDirectionRightToLeft:
    232     case ContextMenuAction::ContextMenuItemTagAddHighlightToCurrentGroup:
    233     case ContextMenuAction::ContextMenuItemTagAddHighlightToNewGroup:
     232    case ContextMenuAction::ContextMenuItemTagAddHighlightToCurrentQuickNote:
     233    case ContextMenuAction::ContextMenuItemTagAddHighlightToNewQuickNote:
    234234#if PLATFORM(COCOA)
    235235    case ContextMenuAction::ContextMenuItemTagCorrectSpellingAutomatically:
  • trunk/Source/WebCore/platform/ContextMenuItem.h

    r278575 r278767  
    146146    ContextMenuItemTagShareMenu,
    147147    ContextMenuItemTagToggleVideoEnhancedFullscreen,
    148     ContextMenuItemTagAddHighlightToCurrentGroup,
    149     ContextMenuItemTagAddHighlightToNewGroup,
     148    ContextMenuItemTagAddHighlightToCurrentQuickNote,
     149    ContextMenuItemTagAddHighlightToNewQuickNote,
    150150    ContextMenuItemTagLookUpImage,
    151151    ContextMenuItemTagTranslate,
  • trunk/Source/WebCore/platform/LocalizedStrings.h

    r278575 r278767  
    5252#endif
    5353#if ENABLE(APP_HIGHLIGHTS)
    54     WEBCORE_EXPORT String contextMenuItemTagAddHighlightToCurrentGroup();
    55     WEBCORE_EXPORT String contextMenuItemTagAddHighlightToNewGroup();
     54    WEBCORE_EXPORT String contextMenuItemTagAddHighlightToCurrentQuickNote();
     55    WEBCORE_EXPORT String contextMenuItemTagAddHighlightToNewQuickNote();
    5656#endif
    5757
  • trunk/Source/WebCore/platform/cocoa/LocalizedStringsCocoa.mm

    r278575 r278767  
    5959}
    6060#if ENABLE(APP_HIGHLIGHTS)
    61 String contextMenuItemTagAddHighlightToCurrentGroup()
    62 {
    63     return localizedNSString(@"Add Highlight To Current Group");
    64 }
    65 
    66 String contextMenuItemTagAddHighlightToNewGroup()
    67 {
    68     return localizedNSString(@"Add Highlight To New Group");
     61String contextMenuItemTagAddHighlightToCurrentQuickNote()
     62{
     63    return localizedNSString(@"Add to Quick Note");
     64}
     65
     66String contextMenuItemTagAddHighlightToNewQuickNote()
     67{
     68    return localizedNSString(@"New Quick Note");
    6969}
    7070#endif
  • trunk/Source/WebCore/testing/Internals.cpp

    r278690 r278767  
    60926092{
    60936093    return {{
    6094         contextMenuItemTagAddHighlightToCurrentGroup(),
    6095         contextMenuItemTagAddHighlightToNewGroup(),
     6094        contextMenuItemTagAddHighlightToCurrentQuickNote(),
     6095        contextMenuItemTagAddHighlightToNewQuickNote(),
    60966096    }};
    60976097}
  • trunk/Source/WebKit/ChangeLog

    r278761 r278767  
     12021-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
    1452021-06-11  Michael Catanzaro  <mcatanzaro@gnome.org>
    246
  • trunk/Source/WebKit/Shared/API/c/WKContextMenuItemTypes.h

    r274148 r278767  
    124124    kWKContextMenuItemTagShareMenu,
    125125    kWKContextMenuItemTagToggleVideoEnhancedFullscreen,
    126     kWKContextMenuItemTagAddHighlightToCurrentGroup,
    127     kWKContextMenuItemTagAddHighlightToNewGroup,
     126    kWKContextMenuItemTagAddHighlightToCurrentQuickNote,
     127    kWKContextMenuItemTagAddHighlightToNewQuickNote,
    128128    kWKContextMenuItemTagRevealImage,
    129129    kWKContextMenuItemTagTranslate,
  • trunk/Source/WebKit/Shared/API/c/WKSharedAPICast.h

    r278575 r278767  
    510510    case WebCore::ContextMenuItemTagMediaMute:
    511511        return kWKContextMenuItemTagMediaMute;
    512     case WebCore::ContextMenuItemTagAddHighlightToCurrentGroup:
    513         return kWKContextMenuItemTagAddHighlightToCurrentGroup;
    514     case WebCore::ContextMenuItemTagAddHighlightToNewGroup:
    515         return kWKContextMenuItemTagAddHighlightToNewGroup;
     512    case WebCore::ContextMenuItemTagAddHighlightToCurrentQuickNote:
     513        return kWKContextMenuItemTagAddHighlightToCurrentQuickNote;
     514    case WebCore::ContextMenuItemTagAddHighlightToNewQuickNote:
     515        return kWKContextMenuItemTagAddHighlightToNewQuickNote;
    516516#if PLATFORM(COCOA)
    517517    case WebCore::ContextMenuItemTagCorrectSpellingAutomatically:
     
    712712    case kWKContextMenuItemTagMediaMute:
    713713        return WebCore::ContextMenuItemTagMediaMute;
    714     case kWKContextMenuItemTagAddHighlightToCurrentGroup:
    715         return WebCore::ContextMenuItemTagAddHighlightToCurrentGroup;
    716     case kWKContextMenuItemTagAddHighlightToNewGroup:
    717         return WebCore::ContextMenuItemTagAddHighlightToNewGroup;
     714    case kWKContextMenuItemTagAddHighlightToCurrentQuickNote:
     715        return WebCore::ContextMenuItemTagAddHighlightToCurrentQuickNote;
     716    case kWKContextMenuItemTagAddHighlightToNewQuickNote:
     717        return WebCore::ContextMenuItemTagAddHighlightToNewQuickNote;
    718718#if PLATFORM(COCOA)
    719719    case kWKContextMenuItemTagCorrectSpellingAutomatically:
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKMenuItemIdentifiers.mm

    r274148 r278767  
    3838NSString * const _WKMenuItemIdentifierInspectElement = @"WKMenuItemIdentifierInspectElement";
    3939NSString * const _WKMenuItemIdentifierLookUp = @"WKMenuItemIdentifierLookUp";
     40NSString * const _WKMenuItemIdentifierAddHighlightToCurrentQuickNote = @"WKMenuItemIdentifierAddHighlightToCurrentQuickNote";
     41NSString * const _WKMenuItemIdentifierAddHighlightToNewQuickNote = @"WKMenuItemIdentifierAddHighlightToNewQuickNote";
     42// FIXME: Remove below after staging complete
    4043NSString * const _WKMenuItemIdentifierAddHighlightToCurrentGroup = @"WKMenuItemIdentifierAddHighlightToCurrentGroup";
    4144NSString * const _WKMenuItemIdentifierAddHighlightToNewGroup = @"WKMenuItemIdentifierAddHighlightToNewGroup";
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h

    r274148 r278767  
    5656WK_EXPORT extern NSString * const _WKMenuItemIdentifierSpeechMenu WK_API_AVAILABLE(macos(10.12), ios(10.0));
    5757
     58WK_EXPORT extern NSString * const _WKMenuItemIdentifierAddHighlightToCurrentQuickNote WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
     59WK_EXPORT extern NSString * const _WKMenuItemIdentifierAddHighlightToNewQuickNote WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
     60
     61// FIXME: remove below after staging complete.
    5862WK_EXPORT extern NSString * const _WKMenuItemIdentifierAddHighlightToCurrentGroup WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
    5963WK_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  
    15651565    auto wkHighlight = adoptNS([[_WKAppHighlight alloc] initWithHighlight:highlight.highlight->createNSData().get() text:text image:nil]);
    15661566
    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];
    15681569}
    15691570#endif
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r278575 r278767  
    68806880        return;
    68816881
    6882     case ContextMenuItemTagAddHighlightToNewGroup:
     6882    case ContextMenuItemTagAddHighlightToNewQuickNote:
    68836883#if ENABLE(APP_HIGHLIGHTS)
    68846884        createAppHighlightInSelectedRange(CreateNewGroupForHighlight::Yes, HighlightRequestOriginatedInApp::No);
     
    68866886        return;
    68876887
    6888     case ContextMenuItemTagAddHighlightToCurrentGroup:
     6888    case ContextMenuItemTagAddHighlightToCurrentQuickNote:
    68896889#if ENABLE(APP_HIGHLIGHTS)
    68906890        createAppHighlightInSelectedRange(CreateNewGroupForHighlight::No, HighlightRequestOriginatedInApp::No);
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r278731 r278767  
    38613861{
    38623862#if ENABLE(APP_HIGHLIGHTS)
    3863     if (action == @selector(createHighlightInCurrentGroupWithRange:))
     3863    if (action == @selector(createHighlightForCurrentQuickNoteWithRange:))
    38643864        return self.shouldAllowAppHighlightCreation && _page->appHighlightsVisibility() ? self : nil;
    3865     if (action == @selector(createHighlightInNewGroupWithRange:))
     3865    if (action == @selector(createHighlightForNewQuickNoteWithRange:))
    38663866        return self.shouldAllowAppHighlightCreation && !_page->appHighlightsVisibility() ? self : nil;
    38673867#endif
     
    93309330   
    93319331    for (UIMenuItem *menuItem in [[UIMenuController sharedMenuController] menuItems]) {
    9332         if ([menuItem action] == @selector(createHighlightInCurrentGroupWithRange:) || [menuItem action] == @selector(createHighlightInNewGroupWithRange:))
     9332        if ([menuItem action] == @selector(createHighlightForCurrentQuickNoteWithRange:) || [menuItem action] == @selector(createHighlightForNewQuickNoteWithRange:))
    93339333            return;
    93349334    }
    93359335   
    9336     auto addHighlightCurrentGroupItem = adoptNS([[UIMenuItem alloc] initWithTitle:WebCore::contextMenuItemTagAddHighlightToCurrentGroup() action:@selector(createHighlightInCurrentGroupWithRange:)]);
    9337     auto addHighlightNewGroupItem = adoptNS([[UIMenuItem alloc] initWithTitle:WebCore::contextMenuItemTagAddHighlightToNewGroup() action:@selector(createHighlightInNewGroupWithRange:)]);
    9338     [[UIMenuController sharedMenuController] setMenuItems:@[ addHighlightCurrentGroupItem.get(), addHighlightNewGroupItem.get() ]];
    9339 }
    9340 
    9341 - (void)createHighlightInCurrentGroupWithRange:(id)sender
     9336    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
    93429342{
    93439343    _page->createAppHighlightInSelectedRange(WebCore::CreateNewGroupForHighlight::No, WebCore::HighlightRequestOriginatedInApp::No);
    93449344}
    93459345
    9346 - (void)createHighlightInNewGroupWithRange:(id)sender
     9346- (void)createHighlightForNewQuickNoteWithRange:(id)sender
    93479347{
    93489348    _page->createAppHighlightInSelectedRange(WebCore::CreateNewGroupForHighlight::Yes, WebCore::HighlightRequestOriginatedInApp::No);
  • trunk/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm

    r278575 r278767  
    410410        return _WKMenuItemIdentifierLookUp;
    411411
    412     case ContextMenuItemTagAddHighlightToCurrentGroup:
    413         return _WKMenuItemIdentifierAddHighlightToCurrentGroup;
     412    case ContextMenuItemTagAddHighlightToCurrentQuickNote:
     413        return _WKMenuItemIdentifierAddHighlightToCurrentQuickNote;
    414414       
    415     case ContextMenuItemTagAddHighlightToNewGroup:
    416         return _WKMenuItemIdentifierAddHighlightToNewGroup;
     415    case ContextMenuItemTagAddHighlightToNewQuickNote:
     416        return _WKMenuItemIdentifierAddHighlightToNewQuickNote;
    417417
    418418    case ContextMenuItemTagOpenFrameInNewWindow:
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r278715 r278767  
     12021-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
    1122021-06-10  Alex Christensen  <achristensen@webkit.org>
    213
  • trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm

    r278575 r278767  
    608608    case ContextMenuItemTagToggleVideoFullscreen:
    609609        return WebMenuItemTagToggleVideoFullscreen;
    610     case ContextMenuItemTagAddHighlightToCurrentGroup:
    611     case ContextMenuItemTagAddHighlightToNewGroup:
     610    case ContextMenuItemTagAddHighlightToCurrentQuickNote:
     611    case ContextMenuItemTagAddHighlightToNewQuickNote:
    612612        return std::nullopt;
    613613    case ContextMenuItemTagShareMenu:
  • trunk/Source/WebKitLegacy/mac/WebView/WebUIDelegatePrivate.h

    r276220 r278767  
    108108    WebMenuItemTagShareMenu,
    109109    WebMenuItemTagToggleVideoEnhancedFullscreen,
    110     WebMenuItemTagAddHighlightToCurrentGroup,
    111     WebMenuItemTagAddHighlightToNewGroup,
     110    WebMenuItemTagAddHighlightToCurrentQuickNote,
     111    WebMenuItemTagAddHighlightToNewQuickNote,
    112112    WebMenuItemTagRevealImage,
    113113    WebMenuItemTagTranslate,
  • trunk/Tools/ChangeLog

    r278762 r278767  
     12021-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
    1112021-06-11  Jonathan Bedard  <jbedard@apple.com>
    212
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm

    r278575 r278767  
    8686    [webView waitForNextPresentationUpdate];
    8787
    88     auto createHighlightInCurrentGroupWithRangeSelector = NSSelectorFromString(@"createHighlightInCurrentGroupWithRange:");
    89     auto createHighlightInNewGroupWithRangeSelector = NSSelectorFromString(@"createHighlightInNewGroupWithRange:");
     88    auto createHighlightForCurrentQuickNoteWithRangeSelector = NSSelectorFromString(@"createHighlightForCurrentQuickNoteWithRange:");
     89    auto createHighlightForNewQuickNoteWithRangeSelector = NSSelectorFromString(@"createHighlightForNewQuickNoteWithRange:");
    9090
    9191    auto contentView = [webView textInputContentView];
    92     EXPECT_NULL([contentView targetForAction:createHighlightInCurrentGroupWithRangeSelector withSender:nil]);
    93     EXPECT_NULL([contentView targetForAction:createHighlightInNewGroupWithRangeSelector withSender:nil]);
     92    EXPECT_NULL([contentView targetForAction:createHighlightForCurrentQuickNoteWithRangeSelector withSender:nil]);
     93    EXPECT_NULL([contentView targetForAction:createHighlightForNewQuickNoteWithRangeSelector withSender:nil]);
    9494
    9595    [webView synchronouslyLoadTestPageNamed:@"simple"];
    9696    [webView selectAll:nil];
    9797    [webView waitForNextPresentationUpdate];
    98     EXPECT_EQ([contentView targetForAction:createHighlightInCurrentGroupWithRangeSelector withSender:nil], contentView);
    99     EXPECT_EQ([contentView targetForAction:createHighlightInNewGroupWithRangeSelector withSender:nil], contentView);
     98    EXPECT_EQ([contentView targetForAction:createHighlightForCurrentQuickNoteWithRangeSelector withSender:nil], contentView);
     99    EXPECT_EQ([contentView targetForAction:createHighlightForNewQuickNoteWithRangeSelector withSender:nil], contentView);
    100100}
    101101
Note: See TracChangeset for help on using the changeset viewer.