diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index f2eca5728a06..90b76fa5b6ae 100755
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1604,6 +1604,8 @@ var gBrowserInit = {
}
});
+ gPageActionButton.init();
+
this.delayedStartupFinished = true;
Services.obs.notifyObservers(window, "browser-delayed-startup-finished");
@@ -7756,6 +7758,38 @@ var gIdentityHandler = {
}
};
+
+var gPageActionButton = {
+ get button() {
+ delete this.button;
+ return this.button = document.getElementById("urlbar-page-action-button");
+ },
+
+ get panel() {
+ delete this.panel;
+ return this.panel = document.getElementById("page-action-panel");
+ },
+
+ init() {
+ if (getBoolPref("browser.photon.structure.enabled")) {
+ this.button.hidden = false;
+ }
+ },
+
+ onEvent(event) {
+ event.stopPropagation();
+
+ if ((event.type == "click" && event.button != 0) ||
+ (event.type == "keypress" && event.charCode != KeyEvent.DOM_VK_SPACE &&
+ event.keyCode != KeyEvent.DOM_VK_RETURN)) {
+ return; // Left click, space or enter only
+ }
+
+ this.panel.hidden = false;
+ this.panel.openPopup(this.button, "bottomcenter topright");
+ },
+};
+
function getNotificationBox(aWindow) {
var foundBrowser = gBrowser.getBrowserForDocument(aWindow.document);
if (foundBrowser)
diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul
index 077e64c49f5a..711418e0d86f 100644
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -405,6 +405,16 @@
+
+ This space intentionally left blank.
+
+
@@ -802,6 +812,11 @@
class="chromeclass-toolbar-additional"
command="Browser:Stop"
tooltip="dynamic-shortcut-tooltip"/>
+
diff --git a/browser/locales/en-US/chrome/browser/browser.dtd b/browser/locales/en-US/chrome/browser/browser.dtd
index 269987a4ad30..0a6c9de4b1b9 100644
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -926,3 +926,5 @@ you can use these alternative items. Otherwise, their values should be empty. -
+
+
diff --git a/browser/themes/shared/browser.inc.css b/browser/themes/shared/browser.inc.css
index 56b5e825b441..66654e9abd0f 100644
--- a/browser/themes/shared/browser.inc.css
+++ b/browser/themes/shared/browser.inc.css
@@ -31,4 +31,18 @@
#urlbar-zoom-button > .toolbarbutton-icon {
display: none;
-}
\ No newline at end of file
+}
+
+/* Page action button */
+#urlbar-page-action-button {
+ -moz-appearance: none;
+ border-style: none;
+ list-style-image: url("chrome://browser/skin/page-action.svg");
+ margin: 0;
+ padding: 0 6px;
+ fill: currentColor;
+}
+
+#urlbar-page-action-button > .toolbarbutton-icon {
+ width: 16px;
+}
diff --git a/browser/themes/shared/jar.inc.mn b/browser/themes/shared/jar.inc.mn
index 7ef6edd8124f..728bf4b7e224 100644
--- a/browser/themes/shared/jar.inc.mn
+++ b/browser/themes/shared/jar.inc.mn
@@ -143,6 +143,7 @@
skin/classic/browser/compacttheme/urlbar-history-dropmarker.svg (../shared/compacttheme/urlbar-history-dropmarker.svg)
skin/classic/browser/urlbar-star.svg (../shared/urlbar-star.svg)
skin/classic/browser/urlbar-tab.svg (../shared/urlbar-tab.svg)
+ skin/classic/browser/page-action.svg (../shared/page-action.svg)
skin/classic/browser/menu-icons/new-window.svg (../shared/menu-icons/new-window.svg)
skin/classic/browser/menu-icons/print.svg (../shared/menu-icons/print.svg)
skin/classic/browser/menu-icons/private-window.svg (../shared/menu-icons/private-window.svg)
diff --git a/browser/themes/shared/page-action.svg b/browser/themes/shared/page-action.svg
new file mode 100644
index 000000000000..8bbf596b0911
--- /dev/null
+++ b/browser/themes/shared/page-action.svg
@@ -0,0 +1,7 @@
+
+
+