2011-02-01 Alexander Pavlov <apavlov@chromium.org>
authorapavlov@chromium.org <apavlov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Feb 2011 14:53:15 +0000 (14:53 +0000)
committerapavlov@chromium.org <apavlov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Feb 2011 14:53:15 +0000 (14:53 +0000)
        Reviewed by Yury Semikhatsky.

        Web Inspector: [Chromium] Wrongly labelled context-menu item for links in Web Inspector's side-pane
        https://bugs.webkit.org/show_bug.cgi?id=53482

        * English.lproj/localizedStrings.js:
        * inspector/front-end/ElementsPanel.js:
        (WebInspector.ElementsPanel.prototype.populateHrefContextMenu):
        * inspector/front-end/inspector.js:
        (WebInspector.resourceForURL):
        (WebInspector.openLinkExternallyLabel):
2011-02-01  Alexander Pavlov  <apavlov@chromium.org>

        Reviewed by Yury Semikhatsky.

        Web Inspector: [Chromium] Wrongly labelled context-menu item for links in Web Inspector's side-pane
        https://bugs.webkit.org/show_bug.cgi?id=53482

        * src/js/DevTools.js:
        (WebInspector.openLinkExternallyLabel): Override to customize a context menu item label

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

Source/WebCore/ChangeLog
Source/WebCore/English.lproj/localizedStrings.js
Source/WebCore/inspector/front-end/ElementsPanel.js
Source/WebCore/inspector/front-end/inspector.js
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/js/DevTools.js

index a96d1ed..003f397 100644 (file)
@@ -1,3 +1,17 @@
+2011-02-01  Alexander Pavlov  <apavlov@chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: [Chromium] Wrongly labelled context-menu item for links in Web Inspector's side-pane
+        https://bugs.webkit.org/show_bug.cgi?id=53482
+
+        * English.lproj/localizedStrings.js:
+        * inspector/front-end/ElementsPanel.js:
+        (WebInspector.ElementsPanel.prototype.populateHrefContextMenu):
+        * inspector/front-end/inspector.js:
+        (WebInspector.resourceForURL):
+        (WebInspector.openLinkExternallyLabel):
+
 2011-02-01  Anton Muhin  <antonm@chromium.org>
 
         Reviewed by Adam Barth.
index 7aecbb6..fde9dcb 100644 (file)
Binary files a/Source/WebCore/English.lproj/localizedStrings.js and b/Source/WebCore/English.lproj/localizedStrings.js differ
index 9299479..094f209 100644 (file)
@@ -255,8 +255,7 @@ WebInspector.ElementsPanel.prototype = {
             return false;
 
         // Add resource-related actions.
-        // Keep these consistent with those added in WebInspector.StylesSidebarPane.prototype._populateHrefContextMenu().
-        contextMenu.appendItem(WebInspector.UIString("Open Link in New Window"), WebInspector.openResource.bind(null, resourceURL, false));
+        contextMenu.appendItem(WebInspector.openLinkExternallyLabel(), WebInspector.openResource.bind(null, resourceURL, false));
         if (WebInspector.resourceForURL(resourceURL))
             contextMenu.appendItem(WebInspector.UIString("Open Link in Resources Panel"), WebInspector.openResource.bind(null, resourceURL, true));
         return true;
index 14437be..f4b868b 100644 (file)
@@ -449,6 +449,11 @@ var WebInspector = {
     resourceForURL: function(url)
     {
         return this.resourceTreeModel.resourceForURL(url);
+    },
+
+    openLinkExternallyLabel: function()
+    {
+        return WebInspector.UIString("Open Link in New Window");
     }
 }
 
index 6633433..29314d6 100644 (file)
@@ -1,3 +1,13 @@
+2011-02-01  Alexander Pavlov  <apavlov@chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: [Chromium] Wrongly labelled context-menu item for links in Web Inspector's side-pane
+        https://bugs.webkit.org/show_bug.cgi?id=53482
+
+        * src/js/DevTools.js:
+        (WebInspector.openLinkExternallyLabel): Override to customize a context menu item label
+
 2011-02-01  Darin Fisher  <darin@chromium.org>
 
         Reviewed by Eric Seidel.
index 637fd1f..3d61be7 100644 (file)
@@ -89,6 +89,18 @@ WebInspector.UIString = function(string)
 };
 
 
+/*
+ * This label must be kept consistent with that in English.lproj/localizedStrings.js
+ *
+ * http://code.google.com/p/chromium/issues/detail?id=61302 requires a custom label for Chromium,
+ * since its behavior is different.
+ */
+WebInspector.openLinkExternallyLabel = function()
+{
+    return WebInspector.UIString("Open Link in New Tab");
+};
+
+
 /** Pending WebKit upstream by apavlov). Fixes iframe vs drag problem. */
 (function()
 {