[EFL] Add 'Copy Image Address' to context menu.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Jan 2012 14:01:38 +0000 (14:01 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Jan 2012 14:01:38 +0000 (14:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=76153

Patch by Grzegorz Czajkowski <g.czajkowski@samsung.com> on 2012-01-13
Reviewed by Andreas Kling.

Source/WebCore:

Enables 'Copy Image Address' option to context menu in WebKit-EFL as it is enabled in GTK and QT ports.

* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
* platform/ContextMenuItem.h:
* platform/LocalizationStrategy.h:
* platform/LocalizedStrings.cpp:
* platform/LocalizedStrings.h:
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::contextMenuItemTagCopyImageUrlToClipboard):

Source/WebKit/efl:

Adds EWK_CONTEXT_MENU_ITEM_TAG_COPY_IMAGE_URL_TO_CLIPBOARD to Ewk_Context_Menu_Action to synchronize it with ContextMenuItem.h

* ewk/ewk_contextmenu.h:

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

Source/WebCore/ChangeLog
Source/WebCore/page/ContextMenuController.cpp
Source/WebCore/platform/ContextMenuItem.h
Source/WebCore/platform/LocalizationStrategy.h
Source/WebCore/platform/LocalizedStrings.cpp
Source/WebCore/platform/LocalizedStrings.h
Source/WebCore/platform/efl/LocalizedStringsEfl.cpp
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/ewk/ewk_contextmenu.h

index a3a2791..4b79e57 100644 (file)
@@ -1,3 +1,23 @@
+2012-01-13  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
+
+        [EFL] Add 'Copy Image Address' to context menu.
+        https://bugs.webkit.org/show_bug.cgi?id=76153
+
+        Reviewed by Andreas Kling.
+
+        Enables 'Copy Image Address' option to context menu in WebKit-EFL as it is enabled in GTK and QT ports.
+
+        * page/ContextMenuController.cpp:
+        (WebCore::ContextMenuController::contextMenuItemSelected):
+        (WebCore::ContextMenuController::populate):
+        (WebCore::ContextMenuController::checkOrEnableIfNeeded):
+        * platform/ContextMenuItem.h:
+        * platform/LocalizationStrategy.h:
+        * platform/LocalizedStrings.cpp:
+        * platform/LocalizedStrings.h:
+        * platform/efl/LocalizedStringsEfl.cpp:
+        (WebCore::contextMenuItemTagCopyImageUrlToClipboard):
+
 2012-01-13  Pavel Feldman  <pfeldman@google.com>
 
         Not reviewed: 32bit build fix.
index 121d6f7..a214352 100644 (file)
@@ -222,7 +222,7 @@ void ContextMenuController::contextMenuItemSelected(ContextMenuItem* item)
         // For now, call into the client. This is temporary!
         frame->editor()->copyImage(m_hitTestResult);
         break;
-#if PLATFORM(QT) || PLATFORM(GTK)
+#if PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
     case ContextMenuItemTagCopyImageUrlToClipboard:
         frame->editor()->copyURL(m_hitTestResult.absoluteImageURL(), m_hitTestResult.textContent());
         break;
@@ -641,7 +641,7 @@ void ContextMenuController::populate()
         contextMenuItemTagDownloadImageToDisk());
     ContextMenuItem CopyImageItem(ActionType, ContextMenuItemTagCopyImageToClipboard, 
         contextMenuItemTagCopyImageToClipboard());
-#if PLATFORM(QT) || PLATFORM(GTK)
+#if PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
     ContextMenuItem CopyImageUrlItem(ActionType, ContextMenuItemTagCopyImageUrlToClipboard, 
         contextMenuItemTagCopyImageUrlToClipboard());
 #endif
@@ -725,7 +725,7 @@ void ContextMenuController::populate()
             appendItem(DownloadImageItem, m_contextMenu.get());
             if (imageURL.isLocalFile() || m_hitTestResult.image())
                 appendItem(CopyImageItem, m_contextMenu.get());
-#if PLATFORM(QT) || PLATFORM(GTK)
+#if PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
             appendItem(CopyImageUrlItem, m_contextMenu.get());
 #endif
         }
@@ -1189,7 +1189,7 @@ void ContextMenuController::checkOrEnableIfNeeded(ContextMenuItem& item) const
         case ContextMenuItemTagOpenImageInNewWindow:
         case ContextMenuItemTagDownloadImageToDisk:
         case ContextMenuItemTagCopyImageToClipboard:
-#if PLATFORM(QT) || PLATFORM(GTK)
+#if PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
         case ContextMenuItemTagCopyImageUrlToClipboard:
 #endif
             break;
index 98d4be2..c1c1825 100644 (file)
@@ -64,7 +64,7 @@ namespace WebCore {
         ContextMenuItemTagOpenImageInNewWindow,
         ContextMenuItemTagDownloadImageToDisk,
         ContextMenuItemTagCopyImageToClipboard,
-#if PLATFORM(QT) || PLATFORM(GTK)
+#if PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
         ContextMenuItemTagCopyImageUrlToClipboard,
 #endif
         ContextMenuItemTagOpenFrameInNewWindow,
index b00ab13..8fab764 100644 (file)
@@ -58,7 +58,7 @@ public:
     virtual String contextMenuItemTagOpenImageInNewWindow() = 0;
     virtual String contextMenuItemTagDownloadImageToDisk() = 0;
     virtual String contextMenuItemTagCopyImageToClipboard() = 0;
-#if PLATFORM(QT) || PLATFORM(GTK)
+#if PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
     virtual String contextMenuItemTagCopyImageUrlToClipboard() = 0;
 #endif
     virtual String contextMenuItemTagOpenFrameInNewWindow() = 0;
index a6a41ac..1409bbf 100644 (file)
@@ -127,7 +127,7 @@ String contextMenuItemTagCopyImageToClipboard()
     return localizationStrategy()->contextMenuItemTagCopyImageToClipboard();
 }
 
-#if PLATFORM(QT) || PLATFORM(GTK)
+#if PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
 String contextMenuItemTagCopyImageUrlToClipboard()
 {
     return localizationStrategy()->contextMenuItemTagCopyImageUrlToClipboard();
index edceb63..a73c991 100644 (file)
@@ -54,7 +54,7 @@ namespace WebCore {
     String contextMenuItemTagOpenImageInNewWindow();
     String contextMenuItemTagDownloadImageToDisk();
     String contextMenuItemTagCopyImageToClipboard();
-#if PLATFORM(QT) || PLATFORM(GTK)
+#if PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
     String contextMenuItemTagCopyImageUrlToClipboard();
 #endif
     String contextMenuItemTagOpenFrameInNewWindow();
index ae530c1..27240e8 100644 (file)
@@ -113,6 +113,11 @@ String contextMenuItemTagCopyImageToClipboard()
     return String::fromUTF8("Copy Image");
 }
 
+String contextMenuItemTagCopyImageUrlToClipboard()
+{
+    return String::fromUTF8("Copy Image Address");
+}
+
 String contextMenuItemTagOpenVideoInNewWindow()
 {
     return String::fromUTF8("Open Video in New Window");
index 45a4cec..5ca9e71 100644 (file)
@@ -1,3 +1,14 @@
+2012-01-13  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
+
+        [EFL] Add 'Copy Image Address' to context menu.
+        https://bugs.webkit.org/show_bug.cgi?id=76153
+
+        Reviewed by Andreas Kling.
+
+        Adds EWK_CONTEXT_MENU_ITEM_TAG_COPY_IMAGE_URL_TO_CLIPBOARD to Ewk_Context_Menu_Action to synchronize it with ContextMenuItem.h
+
+        * ewk/ewk_contextmenu.h:
+
 2012-01-13  KwangHyuk Kim  <hyuki.kim@samsung.com>
 
         [EFL] Add visible field into ewk_tiled_backing_store's data.
index 4e8ef9e..e781f4d 100644 (file)
@@ -57,6 +57,7 @@ enum _Ewk_Context_Menu_Action {
     EWK_CONTEXT_MENU_ITEM_TAG_OPEN_IMAGE_IN_NEW_WINDOW,
     EWK_CONTEXT_MENU_ITEM_TAG_DOWNLOAD_IMAGE_TO_DISK,
     EWK_CONTEXT_MENU_ITEM_TAG_COPY_IMAGE_TO_CLIPBOARD,
+    EWK_CONTEXT_MENU_ITEM_TAG_COPY_IMAGE_URL_TO_CLIPBOARD,
     EWK_CONTEXT_MENU_ITEM_TAG_OPEN_FRAME_IN_NEW_WINDOW,
     EWK_CONTEXT_MENU_ITEM_TAG_COPY,
     EWK_CONTEXT_MENU_ITEM_TAG_GO_BACK,