From 833d25db0d94649b539dbc58269dfbbb59ca0e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A3o=20Gottwald?= Date: Tue, 25 Dec 2012 01:08:13 +0100 Subject: [PATCH] Bug 824443 - Put the geolocation prompt's "Learn More" link in rather than extending the popup notification's binding. r=gavin --- browser/base/content/browser.css | 4 -- browser/base/content/browser.xul | 7 +++ .../content/test/browser_popupNotification.js | 7 ++- browser/base/content/urlbarBindings.xml | 44 ------------------- browser/components/nsBrowserGlue.js | 4 ++ browser/themes/pinstripe/browser.css | 2 +- 6 files changed, 15 insertions(+), 53 deletions(-) diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css index 665216674817..404b6273eec2 100644 --- a/browser/base/content/browser.css +++ b/browser/base/content/browser.css @@ -476,10 +476,6 @@ window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(.chromeclass-m max-width: 280px; } -#geolocation-notification { - -moz-binding: url("chrome://browser/content/urlbarBindings.xml#geolocation-notification"); -} - #addon-progress-notification { -moz-binding: url("chrome://browser/content/urlbarBindings.xml#addon-progress-notification"); } diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index 25fc0ff3076e..6c3b9692cf79 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -464,6 +464,13 @@ + + #ifdef CAN_DRAW_IN_TITLEBAR diff --git a/browser/base/content/test/browser_popupNotification.js b/browser/base/content/test/browser_popupNotification.js index 7426eeafb065..d6d2b0aa3c43 100644 --- a/browser/base/content/test/browser_popupNotification.js +++ b/browser/base/content/test/browser_popupNotification.js @@ -707,13 +707,12 @@ function checkPopup(popup, notificationObj) { is(notification.getAttribute("buttonlabel"), notificationObj.mainAction.label, "main action label matches"); is(notification.getAttribute("buttonaccesskey"), notificationObj.mainAction.accessKey, "main action accesskey matches"); } - let actualSecondaryActions = notification.childNodes; + let actualSecondaryActions = Array.filter(notification.childNodes, + function (child) child.nodeName == "menuitem"); let secondaryActions = notificationObj.secondaryActions || []; let actualSecondaryActionsCount = actualSecondaryActions.length; if (secondaryActions.length) { - let lastChild = actualSecondaryActions.item(actualSecondaryActions.length - 1); - is(lastChild.tagName, "menuseparator", "menuseparator exists"); - actualSecondaryActionsCount--; + is(notification.lastChild.tagName, "menuseparator", "menuseparator exists"); } is(actualSecondaryActionsCount, secondaryActions.length, actualSecondaryActions.length + " secondary actions"); secondaryActions.forEach(function (a, i) { diff --git a/browser/base/content/urlbarBindings.xml b/browser/base/content/urlbarBindings.xml index e98279f48f49..ff4e24fa9216 100644 --- a/browser/base/content/urlbarBindings.xml +++ b/browser/base/content/urlbarBindings.xml @@ -903,50 +903,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - .toolbarbutton-menu-dropmarker { text-decoration: none; } -.geolocation-text-link { +#geolocation-learnmore-link { -moz-margin-start: 0; /* override default label margin to match description margin */ }