diff --git a/browser/base/content/browser-context.inc b/browser/base/content/browser-context.inc index 051415af712..095a5dc0a6d 100644 --- a/browser/base/content/browser-context.inc +++ b/browser/base/content/browser-context.inc @@ -219,30 +219,37 @@ accesskey="&hidePluginCmd.accesskey;" oncommand="gContextMenu.hidePlugin();"/> - - - - - - + + + + + + + + .menuitem-iconic > .menu-iconic-text, +#context-navigation > .menuitem-iconic > .menu-accel-container { + display: none; +} diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js index 5f6df310c73..3f64ffa422e 100644 --- a/browser/base/content/nsContextMenu.js +++ b/browser/base/content/nsContextMenu.js @@ -151,8 +151,8 @@ nsContextMenu.prototype = { var shouldShow = !(this.isContentSelected || this.onLink || this.onImage || this.onCanvas || this.onVideo || this.onAudio || this.onTextInput || this.onSocial); - this.showItem("context-back", shouldShow); - this.showItem("context-forward", shouldShow); + this.showItem("context-navigation", shouldShow); + this.showItem("context-sep-navigation", shouldShow); let stopped = XULBrowserWindow.stopCommand.getAttribute("disabled") == "true"; @@ -163,7 +163,6 @@ nsContextMenu.prototype = { this.showItem("context-reload", stopReloadItem == "reload"); this.showItem("context-stop", stopReloadItem == "stop"); - this.showItem("context-sep-stop", !!stopReloadItem); // XXX: Stop is determined in browser.js; the canStop broadcaster is broken //this.setItemAttrFromNode( "context-stop", "disabled", "canStop" ); diff --git a/browser/locales/en-US/chrome/browser/browser.dtd b/browser/locales/en-US/chrome/browser/browser.dtd index 75851410a2b..3808c29be56 100644 --- a/browser/locales/en-US/chrome/browser/browser.dtd +++ b/browser/locales/en-US/chrome/browser/browser.dtd @@ -153,18 +153,14 @@ These should match what Safari and other Apple applications use on OS X Lion. -- - - - - @@ -443,7 +439,6 @@ These should match what Safari and other Apple applications use on OS X Lion. -- - diff --git a/browser/themes/linux/browser.css b/browser/themes/linux/browser.css index 7b260e2e8a5..ff17b6f3e6f 100644 --- a/browser/themes/linux/browser.css +++ b/browser/themes/linux/browser.css @@ -437,24 +437,11 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) { list-style-image: url("moz-icon://stock/gtk-preferences?size=menu"); } -#context-stop { - list-style-image: url("moz-icon://stock/gtk-stop?size=menu"); -} - -#context-stop[disabled] { - list-style-image: url("moz-icon://stock/gtk-stop?size=menu&state=disabled"); -} - #placesContext_reload, -#context-reload, #context-reloadframe { list-style-image: url("moz-icon://stock/gtk-refresh?size=menu"); } -#context-reload[disabled] { - list-style-image: url("moz-icon://stock/gtk-refresh?size=menu&state=disabled"); -} - #menu_zoomEnlarge { list-style-image: url("moz-icon://stock/gtk-zoom-in?size=menu"); } @@ -467,38 +454,6 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) { list-style-image: url("moz-icon://stock/gtk-zoom-100?size=menu"); } -#context-back { - list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=menu"); -} - -#context-back[disabled] { - list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=menu&state=disabled"); -} - -#context-back:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=menu"); -} - -#context-back[disabled]:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=menu&state=disabled"); -} - -#context-forward { - list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=menu"); -} - -#context-forward[disabled] { - list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=menu&state=disabled"); -} - -#context-forward:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=menu"); -} - -#context-forward[disabled]:-moz-locale-dir(rtl) { - list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=menu&state=disabled"); -} - #menu_showAllHistory { list-style-image: url("chrome://browser/skin/Toolbar-small.png"); -moz-image-region: rect(0px 32px 16px 16px); @@ -2289,3 +2244,23 @@ chatbox { #UITourTooltipButtons { margin-bottom: -10px; } + +%include ../shared/contextmenu.inc.css + +#context-navigation { + background-color: -moz-dialog; + padding-bottom: 2px; + margin-bottom: 2px; + -moz-appearance: menuitem; +} + +#context-navigation > .menuitem-iconic > .menu-iconic-left { + visibility: visible; + /* override toolkit/themes/linux/global/menu.css */ + -moz-padding-end: 0 !important; + -moz-margin-end: 0 !important; +} + +#context-sep-navigation { + margin-top: -4px; +} diff --git a/browser/themes/osx/browser.css b/browser/themes/osx/browser.css index f5aadf143c8..2fc9fdf1ce6 100644 --- a/browser/themes/osx/browser.css +++ b/browser/themes/osx/browser.css @@ -4430,3 +4430,10 @@ window > chatbox { width: 16px; } } + +%include ../shared/contextmenu.inc.css + +#context-navigation > .menuitem-iconic { + padding-left: 0; + padding-right: 0; +} diff --git a/browser/themes/shared/contextmenu.inc.css b/browser/themes/shared/contextmenu.inc.css new file mode 100644 index 00000000000..ef4dea66b67 --- /dev/null +++ b/browser/themes/shared/contextmenu.inc.css @@ -0,0 +1,51 @@ + +menugroup > .menuitem-iconic[disabled="true"] > .menu-iconic-left { + opacity: .3; +} + +#context-navigation > .menuitem-iconic { + -moz-box-flex: 1; + -moz-box-pack: center; + -moz-box-align: center; +} + +#context-navigation > .menuitem-iconic > .menu-iconic-left { + -moz-appearance: none; +} + +#context-navigation > #context-back > .menu-iconic-left { + list-style-image: url("chrome://browser/skin/Toolbar.png"); + -moz-image-region: rect(0, 36px, 18px, 18px); +} + +#context-navigation > #context-forward > .menu-iconic-left { + list-style-image: url("chrome://browser/skin/Toolbar.png"); + -moz-image-region: rect(0, 72px, 18px, 54px); +} + +#context-navigation > #context-reload > .menu-iconic-left { + list-style-image: url("chrome://browser/skin/reload-stop-go.png"); + -moz-image-region: rect(0, 14px, 14px, 0); +} + +#context-navigation > #context-stop > .menu-iconic-left { + list-style-image: url("chrome://browser/skin/reload-stop-go.png"); + -moz-image-region: rect(0, 28px, 14px, 14px); +} + +#context-navigation > #context-bookmarkpage > .menu-iconic-left { + list-style-image: url("chrome://browser/skin/Toolbar.png"); + -moz-image-region: rect(0, 144px, 18px, 126px); +} + +#context-back:-moz-locale-dir(rtl), +#context-forward:-moz-locale-dir(rtl), +#context-reload:-moz-locale-dir(rtl) { + transform: scaleX(-1); +} + +#context-navigation > .menuitem-iconic > .menu-iconic-left > .menu-iconic-icon { + width: 18px; + height: 18px; + margin: 7px; +} diff --git a/browser/themes/windows/browser.css b/browser/themes/windows/browser.css index e6107aa004d..af6c620dfce 100644 --- a/browser/themes/windows/browser.css +++ b/browser/themes/windows/browser.css @@ -2935,3 +2935,16 @@ chatbox { #UITourTooltipButtons { margin: 24px -4px -4px; } + +%include ../shared/contextmenu.inc.css + +#context-navigation { + background-color: -moz-dialog; + padding-bottom: 2px; + margin-bottom: 2px; +} + +#context-sep-navigation { + -moz-margin-start: -28px; + margin-top: -4px; +}