Bug 608266 - [Regression] Can't open a link in new tab from the awesome panels [r=mfinkle]
authorVivien Nicolas <21@vingtetun.org>
Wed, 03 Nov 2010 14:48:01 +0100
changeset 66948 98999850ba120f797d49e28dfb3d5062f7fa13ad
parent 66947 1988636edcc1e74e626481b059dbf73205493126
child 66949 14e31eaaae662bcdf78dec9e90c44d9475b459c1
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs608266
Bug 608266 - [Regression] Can't open a link in new tab from the awesome panels [r=mfinkle]
mobile/chrome/content/bindings.xml
mobile/chrome/content/browser.xul
mobile/chrome/content/content.js
mobile/themes/core/browser.css
--- a/mobile/chrome/content/bindings.xml
+++ b/mobile/chrome/content/bindings.xml
@@ -130,17 +130,17 @@
           let url = this.getAttribute("url");
           if (!url)
             return;
 
           let value = this.getAttribute("value");
           let data = {
             target: this,
             json: {
-              types: ["link-shareable"],
+              types: ["link-shareable", "link-openable"],
               label: value,
               linkTitle: value,
               linkURL: url
             }
           };
           ContextHelper.showPopup(data);
         ]]>
       </handler>
@@ -568,17 +568,17 @@
       <handler event="contextmenu" phase="capturing">
         <![CDATA[
           if (!this.uri || this._isEditing)
             return;
 
           let data = {
             target: this,
             json: {
-              types: ["edit-bookmark", "link-shareable"],
+              types: ["edit-bookmark", "link-shareable", "link-openable"],
               label: this.name,
               linkTitle: this.name,
               linkURL: this.spec
            }};
            ContextHelper.showPopup(data);
          ]]>
        </handler>
      </handlers>
--- a/mobile/chrome/content/browser.xul
+++ b/mobile/chrome/content/browser.xul
@@ -550,17 +550,17 @@
       <vbox id="context-popup" class="dialog-dark">
         <hbox id="context-header">
           <label id="context-hint" crop="center" flex="1"/>
         </hbox>
         <richlistbox id="context-commands" onclick="ContextHelper.hide();" flex="1">
           <richlistitem class="context-command" id="context-copy" type="copy" onclick="ContextCommands.copy();">
             <label value="&copy.label;"/>
           </richlistitem>
-          <richlistitem class="context-command" id="context-openinnewtab" type="link-saveable" onclick="ContextCommands.openInNewTab();">
+          <richlistitem class="context-command" id="context-openinnewtab" type="link-openable" onclick="ContextCommands.openInNewTab();">
             <label value="&contextOpenInNewTab.label;"/>
           </richlistitem>
           <richlistitem class="context-command" id="context-savelink" type="link-saveable" onclick="ContextCommands.saveLink();">
             <label value="&contextSaveLink.label;"/>
           </richlistitem>
           <richlistitem class="context-command" id="context-saveimage" type="image-loaded" onclick="ContextCommands.saveImage();">
             <label value="&contextSaveImage.label;"/>
           </richlistitem>
--- a/mobile/chrome/content/content.js
+++ b/mobile/chrome/content/content.js
@@ -815,16 +815,21 @@ ContextHandler.registerType("callto", fu
   return protocol == "tel" || protocol == "callto" || protocol == "sip" || protocol == "voipto";
 });
 
 ContextHandler.registerType("link-saveable", function(aState, aElement) {
   let protocol = aState.linkProtocol;
   return (protocol && protocol != "mailto" && protocol != "javascript" && protocol != "news" && protocol != "snews");
 });
 
+ContextHandler.registerType("link-openable", function(aState, aElement) {
+  let protocol = aState.linkProtocol;
+  return (protocol && protocol != "mailto" && protocol != "javascript" && protocol != "news" && protocol != "snews");
+});
+
 ContextHandler.registerType("link-shareable", function(aState, aElement) {
   return Util.isShareableScheme(aState.linkProtocol);
 });
 
 ["image", "video"].forEach(function(aType) {
   ContextHandler.registerType(aType+"-shareable", function(aState, aElement) {
     if (aState.types.indexOf(aType) == -1)
       return false;
--- a/mobile/themes/core/browser.css
+++ b/mobile/themes/core/browser.css
@@ -633,20 +633,20 @@ placeitem {
   -moz-user-focus: ignore;
   color: black;
   background-color: white;
   padding: 2px 4px;
   border-bottom: 1px solid rgb(207,207,207);
   min-height: 70px; /* row size */
 }
 
-autocompleteresult:hover:active,
+#popup_autocomplete autocompleteresult:hover:active,
 placelist placeitem:hover:active:not([selected="true"]),
-historylist placeitem:hover:active:not([selected="true"]):not([class="history-item-title"]),
-remotetabslist placeitem:hover:active:not([selected="true"]):not([class="remotetabs-item-title"]),
+historylist autocompleteresult:hover:active:not([selected="true"]):not([class="history-item-title"]),
+remotetabslist autocompleteresult:hover:active:not([selected="true"]):not([class="remotetabs-item-title"]),
 .autocompleteresult-selected {
   background-color: #8db8d8;
 }
 
 .autocomplete-item-container,
 .bookmark-item-container {
   margin: 0;
   padding: 0;