Changeset 74941 in webkit


Ignore:
Timestamp:
Jan 3, 2011 3:42:33 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-01-03 Yi Shen <yi.4.shen@nokia.com>

Reviewed by Adam Barth.

[Qt] Add SelectAll option to the context menu for the editor
https://bugs.webkit.org/show_bug.cgi?id=50049

Set shortcut for the SelectAll action.

  • QtTestBrowser/mainwindow.cpp: (MainWindow::buildUI):

2011-01-03 Yi Shen <yi.4.shen@nokia.com>

Reviewed by Adam Barth.

[Qt] Add SelectAll option to the context menu for the editor
https://bugs.webkit.org/show_bug.cgi?id=50049

Enable SelectAll for the Qt context menu.

  • page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate):
  • platform/ContextMenuItem.h:
  • platform/LocalizationStrategy.h:
  • platform/LocalizedStrings.cpp: (WebCore::contextMenuItemTagSelectAll):
  • platform/LocalizedStrings.h:

2011-01-03 Yi Shen <yi.4.shen@nokia.com>

Reviewed by Adam Barth.

[Qt] Add SelectAll option to the context menu for the editor
https://bugs.webkit.org/show_bug.cgi?id=50049

Enable SelectAll for the Qt context menu.

  • Api/qwebpage.cpp: (webActionForContextMenuAction): (QWebPage::action):
  • WebCoreSupport/WebPlatformStrategies.cpp: (WebPlatformStrategies::contextMenuItemTagSelectAll):
  • WebCoreSupport/WebPlatformStrategies.h:

2011-01-03 Yi Shen <yi.4.shen@nokia.com>

Reviewed by Adam Barth.

[Qt] Add SelectAll option to the context menu for the editor
https://bugs.webkit.org/show_bug.cgi?id=50049

Add WebPlatformStrategies::contextMenuItemTagSelectAll for Qt.

  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::contextMenuItemTagSelectAll):
  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:
Location:
trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r74934 r74941  
     12011-01-03  Yi Shen  <yi.4.shen@nokia.com>
     2
     3        Reviewed by Adam Barth.
     4
     5        [Qt] Add SelectAll option to the context menu for the editor
     6        https://bugs.webkit.org/show_bug.cgi?id=50049
     7
     8        Set shortcut for the SelectAll action.
     9
     10        * QtTestBrowser/mainwindow.cpp:
     11        (MainWindow::buildUI):
     12
    1132011-01-03  David Levin  <levin@chromium.org>
    214
  • trunk/Tools/QtTestBrowser/mainwindow.cpp

    r72671 r74941  
    9696    page()->action(QWebPage::Copy)->setShortcut(QKeySequence::Copy);
    9797    page()->action(QWebPage::Paste)->setShortcut(QKeySequence::Paste);
     98    page()->action(QWebPage::SelectAll)->setShortcut(QKeySequence::SelectAll);
    9899
    99100    page()->action(QWebPage::ToggleBold)->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_B));
  • trunk/WebCore/ChangeLog

    r74937 r74941  
     12011-01-03  Yi Shen  <yi.4.shen@nokia.com>
     2
     3        Reviewed by Adam Barth.
     4
     5        [Qt] Add SelectAll option to the context menu for the editor
     6        https://bugs.webkit.org/show_bug.cgi?id=50049
     7
     8        Enable SelectAll for the Qt context menu.
     9
     10        * page/ContextMenuController.cpp:
     11        (WebCore::ContextMenuController::populate):
     12        * platform/ContextMenuItem.h:
     13        * platform/LocalizationStrategy.h:
     14        * platform/LocalizedStrings.cpp:
     15        (WebCore::contextMenuItemTagSelectAll):
     16        * platform/LocalizedStrings.h:
     17
    1182011-01-03  Dan Bernstein  <mitz@apple.com>
    219
  • trunk/WebCore/page/ContextMenuController.cpp

    r74877 r74941  
    681681#if PLATFORM(GTK)
    682682    ContextMenuItem DeleteItem(ActionType, ContextMenuItemTagDelete, contextMenuItemTagDelete());
     683#endif
     684#if PLATFORM(GTK) || PLATFORM(QT)
    683685    ContextMenuItem SelectAllItem(ActionType, ContextMenuItemTagSelectAll, contextMenuItemTagSelectAll());
    684686#endif
     
    863865        appendItem(DeleteItem, m_contextMenu.get());
    864866        appendItem(*separatorItem(), m_contextMenu.get());
     867#endif
     868#if PLATFORM(GTK) || PLATFORM(QT)
    865869        appendItem(SelectAllItem, m_contextMenu.get());
    866870#endif
  • trunk/WebCore/platform/ContextMenuItem.h

    r74208 r74941  
    7777#if PLATFORM(GTK)
    7878        ContextMenuItemTagDelete,
     79#endif
     80#if PLATFORM(GTK) || PLATFORM(QT)
    7981        ContextMenuItemTagSelectAll,
     82#endif
     83#if PLATFORM(GTK)
    8084        ContextMenuItemTagInputMethods,
    8185        ContextMenuItemTagUnicode,
  • trunk/WebCore/platform/LocalizationStrategy.h

    r67928 r74941  
    6666#if PLATFORM(GTK)
    6767    virtual String contextMenuItemTagDelete() = 0;
    68     virtual String contextMenuItemTagSelectAll() = 0;
    6968    virtual String contextMenuItemTagInputMethods() = 0;
    7069    virtual String contextMenuItemTagUnicode() = 0;
     70#endif
     71#if PLATFORM(GTK) || PLATFORM(QT)
     72    virtual String contextMenuItemTagSelectAll() = 0;
    7173#endif
    7274    virtual String contextMenuItemTagNoGuessesFound() = 0;
  • trunk/WebCore/platform/LocalizedStrings.cpp

    r72363 r74941  
    145145}
    146146
     147#if PLATFORM(QT)
     148String contextMenuItemTagSelectAll()
     149{
     150    return platformStrategies()->localizationStrategy()->contextMenuItemTagSelectAll();
     151}
     152#endif
     153
    147154String contextMenuItemTagNoGuessesFound()
    148155{
  • trunk/WebCore/platform/LocalizedStrings.h

    r72363 r74941  
    6262#if PLATFORM(GTK)
    6363    String contextMenuItemTagDelete();
    64     String contextMenuItemTagSelectAll();
    6564    String contextMenuItemTagInputMethods();
    6665    String contextMenuItemTagUnicode();
     66#endif
     67#if PLATFORM(GTK) || PLATFORM(QT)
     68    String contextMenuItemTagSelectAll();
    6769#endif
    6870    String contextMenuItemTagNoGuessesFound();
  • trunk/WebKit/qt/Api/qwebpage.cpp

    r74605 r74941  
    419419        case WebCore::ContextMenuItemTagItalic: return QWebPage::ToggleItalic;
    420420        case WebCore::ContextMenuItemTagUnderline: return QWebPage::ToggleUnderline;
     421        case WebCore::ContextMenuItemTagSelectAll: return QWebPage::SelectAll;
    421422#if ENABLE(INSPECTOR)
    422423        case WebCore::ContextMenuItemTagInspectElement: return QWebPage::InspectElement;
     
    27352736            text = contextMenuItemTagPaste();
    27362737            break;
     2738        case SelectAll:
     2739            text = contextMenuItemTagSelectAll();
     2740            break;
    27372741#ifndef QT_NO_UNDOSTACK
    27382742        case Undo: {
     
    27822786        case MoveToEndOfDocument:
    27832787            text = tr("Move the cursor to the end of the document");
    2784             break;
    2785         case SelectAll:
    2786             text = tr("Select all");
    27872788            break;
    27882789        case SelectNextChar:
  • trunk/WebKit/qt/ChangeLog

    r74932 r74941  
     12011-01-03  Yi Shen  <yi.4.shen@nokia.com>
     2
     3        Reviewed by Adam Barth.
     4
     5        [Qt] Add SelectAll option to the context menu for the editor
     6        https://bugs.webkit.org/show_bug.cgi?id=50049
     7
     8        Enable SelectAll for the Qt context menu.
     9
     10        * Api/qwebpage.cpp:
     11        (webActionForContextMenuAction):
     12        (QWebPage::action):
     13        * WebCoreSupport/WebPlatformStrategies.cpp:
     14        (WebPlatformStrategies::contextMenuItemTagSelectAll):
     15        * WebCoreSupport/WebPlatformStrategies.h:
     16
    1172011-01-03  Antonio Gomes  <agomes@rim.com>
    218
  • trunk/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp

    r68039 r74941  
    289289{
    290290    return QCoreApplication::translate("QWebPage", "Paste", "Paste context menu item");
     291}
     292
     293String WebPlatformStrategies::contextMenuItemTagSelectAll()
     294{
     295    return QCoreApplication::translate("QWebPage", "Select All", "Select All context menu item");
    291296}
    292297
  • trunk/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h

    r68039 r74941  
    7575    virtual WTF::String contextMenuItemTagCut();
    7676    virtual WTF::String contextMenuItemTagPaste();
     77    virtual WTF::String contextMenuItemTagSelectAll();
    7778    virtual WTF::String contextMenuItemTagNoGuessesFound();
    7879    virtual WTF::String contextMenuItemTagIgnoreSpelling();
  • trunk/WebKit2/ChangeLog

    r74893 r74941  
     12011-01-03  Yi Shen  <yi.4.shen@nokia.com>
     2
     3        Reviewed by Adam Barth.
     4
     5        [Qt] Add SelectAll option to the context menu for the editor
     6        https://bugs.webkit.org/show_bug.cgi?id=50049
     7
     8        Add WebPlatformStrategies::contextMenuItemTagSelectAll for Qt.
     9
     10        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
     11        (WebKit::WebPlatformStrategies::contextMenuItemTagSelectAll):
     12        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
     13
    1142011-01-03  Sam Weinig  <sam@webkit.org>
    215
  • trunk/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp

    r74654 r74941  
    303303}
    304304
     305String WebPlatformStrategies::contextMenuItemTagInputMethods()
     306{
     307    notImplemented();
     308    return "Input Methods";
     309}
     310
     311String WebPlatformStrategies::contextMenuItemTagUnicode()
     312{
     313    notImplemented();
     314    return "Unicode";
     315}
     316
     317#endif
     318
     319#if PLATFORM(GTK) || PLATFORM(QT)
     320
    305321String WebPlatformStrategies::contextMenuItemTagSelectAll()
    306322{
    307323    notImplemented();
    308324    return "Select All";
    309 }
    310 
    311 String WebPlatformStrategies::contextMenuItemTagInputMethods()
    312 {
    313     notImplemented();
    314     return "Input Methods";
    315 }
    316 
    317 String WebPlatformStrategies::contextMenuItemTagUnicode()
    318 {
    319     notImplemented();
    320     return "Unicode";
    321325}
    322326
  • trunk/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h

    r68038 r74941  
    7979#if PLATFORM(GTK)
    8080    virtual String contextMenuItemTagDelete();
    81     virtual String contextMenuItemTagSelectAll();
    8281    virtual String contextMenuItemTagInputMethods();
    8382    virtual String contextMenuItemTagUnicode();
     83#endif
     84#if PLATFORM(GTK) || PLATFORM(QT)
     85    virtual String contextMenuItemTagSelectAll();
    8486#endif
    8587    virtual String contextMenuItemTagNoGuessesFound();
Note: See TracChangeset for help on using the changeset viewer.