diff --git a/browser/base/content/sanitize.js b/browser/base/content/sanitize.js index 8107906b985..cf603d5aa24 100644 --- a/browser/base/content/sanitize.js +++ b/browser/base/content/sanitize.js @@ -524,6 +524,20 @@ Sanitizer.prototype = { let features = "chrome,all,dialog=no," + this.privateStateForNewWindow; let newWindow = existingWindow.openDialog("chrome://browser/content/", "_blank", features, defaultArgs); +#ifdef XP_MACOSX + function onFullScreen(e) { + newWindow.removeEventListener("fullscreen", onFullScreen); + let docEl = newWindow.document.documentElement; + let sizemode = docEl.getAttribute("sizemode"); + if (!newWindow.fullScreen && sizemode == "fullscreen") { + docEl.setAttribute("sizemode", "normal"); + e.preventDefault(); + e.stopPropagation(); + return false; + } + } + newWindow.addEventListener("fullscreen", onFullScreen); +#endif // Window creation and destruction is asynchronous. We need to wait // until all existing windows are fully closed, and the new window is @@ -537,6 +551,9 @@ Sanitizer.prototype = { return; Services.obs.removeObserver(onWindowOpened, "browser-delayed-startup-finished"); +#ifdef XP_MACOSX + newWindow.removeEventListener("fullscreen", onFullScreen); +#endif newWindowOpened = true; // If we're the last thing to happen, invoke callback. if (numWindowsClosing == 0) diff --git a/browser/components/customizableui/test/browser.ini b/browser/components/customizableui/test/browser.ini index 00a09c2d538..98a4f9e9cc7 100644 --- a/browser/components/customizableui/test/browser.ini +++ b/browser/components/customizableui/test/browser.ini @@ -1,5 +1,5 @@ [DEFAULT] -skip-if = buildapp == "mulet" || e10s +skip-if = buildapp == "mulet" support-files = head.js support/test_967000_charEncoding_page.html @@ -34,6 +34,7 @@ skip-if = os == "mac" skip-if = os == "linux" [browser_901207_searchbar_in_panel.js] +skip-if = e10s # bug 1090656 [browser_913972_currentset_overflow.js] skip-if = os == "linux" @@ -54,7 +55,6 @@ skip-if = os == "mac" skip-if = os == "linux" [browser_934951_zoom_in_toolbar.js] -skip-if = e10s # Bug ?????? - test uses promiseTabLoadEvent() which isn't e10s friendly. [browser_938980_navbar_collapsed.js] [browser_938995_indefaultstate_nonremovable.js] [browser_940013_registerToolbarNode_calls_registerArea.js] @@ -83,7 +83,7 @@ skip-if = os == "linux" # Intermittent failures [browser_947914_button_paste.js] skip-if = os == "linux" # Intermittent failures [browser_947914_button_print.js] -skip-if = os == "linux" # Intermittent failures +skip-if = os == "linux" || (os == "win" && e10s) # Intermittent failures on Linux, e10s issues on Windows (bug 1088714) [browser_947914_button_savePage.js] skip-if = os == "linux" # Intermittent failures [browser_947914_button_zoomIn.js] @@ -100,11 +100,9 @@ skip-if = os == "linux" # Intermittent failures [browser_962884_opt_in_disable_hyphens.js] [browser_963639_customizing_attribute_non_customizable_toolbar.js] [browser_967000_button_charEncoding.js] -skip-if = e10s # Bug ?????? - test uses promiseTabLoadEvent() which isn't e10s friendly. +skip-if = e10s # Bug 1088710 [browser_967000_button_feeds.js] -skip-if = buildapp == 'mulet' || e10s # Bug ?????? - test uses promiseTabLoadEvent() which isn't e10s friendly. [browser_967000_button_sync.js] -skip-if = e10s # Bug ?????? - test uses promiseTabLoadEvent() which isn't e10s friendly. [browser_967000_button_tabView.js] [browser_968447_bookmarks_toolbar_items_in_panel.js] skip-if = os == "linux" # Intemittent failures - bug 979207 @@ -129,6 +127,7 @@ skip-if = os == "linux" skip-if = os == "linux" [browser_985815_propagate_setToolbarVisibility.js] +skip-if = e10s # bug 1090635 [browser_981305_separator_insertion.js] [browser_988072_sidebar_events.js] [browser_989338_saved_placements_not_resaved.js] @@ -138,6 +137,7 @@ skip-if = os == "linux" [browser_987185_syncButton.js] [browser_987492_window_api.js] [browser_987640_charEncoding.js] +skip-if = e10s # Bug 1088710 [browser_992747_toggle_noncustomizable_toolbar.js] [browser_993322_widget_notoolbar.js] [browser_995164_registerArea_during_customize_mode.js] diff --git a/browser/components/loop/content/shared/js/mixins.js b/browser/components/loop/content/shared/js/mixins.js index 0480387c64c..008b5547fd6 100644 --- a/browser/components/loop/content/shared/js/mixins.js +++ b/browser/components/loop/content/shared/js/mixins.js @@ -26,6 +26,37 @@ loop.shared.mixins = (function() { rootObject = obj; } + /** + * window.location mixin. Handles changes in the call url. + * Forces a reload of the page to ensure proper state of the webapp + * + * @type {Object} + */ + var UrlHashChangeMixin = { + propTypes: { + onUrlHashChange: React.PropTypes.func.isRequired + }, + + componentDidMount: function() { + rootObject.addEventListener("hashchange", this.onUrlHashChange, false); + }, + + componentWillUnmount: function() { + rootObject.removeEventListener("hashchange", this.onUrlHashChange, false); + } + }; + + /** + * Document location mixin. + * + * @type {Object} + */ + var DocumentLocationMixin = { + locationReload: function() { + rootObject.location.reload(); + } + }; + /** * Dropdown menu mixin. * @type {Object} @@ -151,6 +182,8 @@ loop.shared.mixins = (function() { AudioMixin: AudioMixin, setRootObject: setRootObject, DropdownMenuMixin: DropdownMenuMixin, - DocumentVisibilityMixin: DocumentVisibilityMixin + DocumentVisibilityMixin: DocumentVisibilityMixin, + DocumentLocationMixin: DocumentLocationMixin, + UrlHashChangeMixin: UrlHashChangeMixin }; })(); diff --git a/browser/components/loop/standalone/content/js/webapp.js b/browser/components/loop/standalone/content/js/webapp.js index 1751ed9fd94..fc5a40aac3b 100644 --- a/browser/components/loop/standalone/content/js/webapp.js +++ b/browser/components/loop/standalone/content/js/webapp.js @@ -859,6 +859,10 @@ loop.webapp = (function($, _, OT, mozL10n) { * of the webapp page. */ var WebappRootView = React.createClass({displayName: 'WebappRootView', + + mixins: [sharedMixins.UrlHashChangeMixin, + sharedMixins.DocumentLocationMixin], + propTypes: { client: React.PropTypes.instanceOf(loop.StandaloneClient).isRequired, conversation: React.PropTypes.oneOfType([ @@ -879,6 +883,10 @@ loop.webapp = (function($, _, OT, mozL10n) { }; }, + onUrlHashChange: function() { + this.locationReload(); + }, + render: function() { if (this.state.unsupportedDevice) { return UnsupportedDeviceView(null); diff --git a/browser/components/loop/standalone/content/js/webapp.jsx b/browser/components/loop/standalone/content/js/webapp.jsx index 1c4b302d313..6184f3ba82a 100644 --- a/browser/components/loop/standalone/content/js/webapp.jsx +++ b/browser/components/loop/standalone/content/js/webapp.jsx @@ -859,6 +859,10 @@ loop.webapp = (function($, _, OT, mozL10n) { * of the webapp page. */ var WebappRootView = React.createClass({ + + mixins: [sharedMixins.UrlHashChangeMixin, + sharedMixins.DocumentLocationMixin], + propTypes: { client: React.PropTypes.instanceOf(loop.StandaloneClient).isRequired, conversation: React.PropTypes.oneOfType([ @@ -879,6 +883,10 @@ loop.webapp = (function($, _, OT, mozL10n) { }; }, + onUrlHashChange: function() { + this.locationReload(); + }, + render: function() { if (this.state.unsupportedDevice) { return ; diff --git a/browser/components/loop/test/shared/mixins_test.js b/browser/components/loop/test/shared/mixins_test.js index 3e98eef53bb..dc2872571b8 100644 --- a/browser/components/loop/test/shared/mixins_test.js +++ b/browser/components/loop/test/shared/mixins_test.js @@ -21,6 +21,75 @@ describe("loop.shared.mixins", function() { sandbox.restore(); }); + describe("loop.webapp.UrlHashChangeMixin", function() { + function createTestComponent(onUrlHashChange) { + var TestComp = React.createClass({ + mixins: [loop.shared.mixins.UrlHashChangeMixin], + onUrlHashChange: onUrlHashChange || function(){}, + render: function() { + return React.DOM.div(); + } + }); + return new TestComp(); + } + + it("should watch for hashchange event", function() { + var addEventListener = sandbox.spy(); + sharedMixins.setRootObject({ + addEventListener: addEventListener + }); + + TestUtils.renderIntoDocument(createTestComponent()); + + sinon.assert.calledOnce(addEventListener); + sinon.assert.calledWith(addEventListener, "hashchange"); + }); + + it("should call onUrlHashChange when the url is updated", function() { + sharedMixins.setRootObject({ + addEventListener: function(name, cb) { + if (name === "hashchange") { + cb(); + } + } + }); + var onUrlHashChange = sandbox.stub(); + + TestUtils.renderIntoDocument(createTestComponent(onUrlHashChange)); + + sinon.assert.calledOnce(onUrlHashChange); + }); + }); + + describe("loop.webapp.DocumentLocationMixin", function() { + var reloadStub, TestComp; + + beforeEach(function() { + reloadStub = sandbox.stub(); + + sharedMixins.setRootObject({ + location: { + reload: reloadStub + } + }); + + TestComp = React.createClass({ + mixins: [loop.shared.mixins.DocumentLocationMixin], + render: function() { + return React.DOM.div(); + } + }); + }); + + it("should call window.location.reload", function() { + var comp = TestUtils.renderIntoDocument(TestComp()); + + comp.locationReload(); + + sinon.assert.calledOnce(reloadStub); + }); + }); + describe("loop.panel.DocumentVisibilityMixin", function() { var comp, TestComp, onDocumentVisibleStub, onDocumentHiddenStub; diff --git a/browser/components/loop/test/standalone/webapp_test.js b/browser/components/loop/test/standalone/webapp_test.js index 60b0f9a3eb6..2daf948bc49 100644 --- a/browser/components/loop/test/standalone/webapp_test.js +++ b/browser/components/loop/test/standalone/webapp_test.js @@ -514,7 +514,8 @@ describe("loop.webapp", function() { notifications: notifications, sdk: sdk, conversation: conversationModel, - feedbackApiClient: feedbackApiClient + feedbackApiClient: feedbackApiClient, + onUrlHashChange: sandbox.stub() })); } diff --git a/browser/modules/UITour.jsm b/browser/modules/UITour.jsm index 0680551d97e..7c457237f1f 100644 --- a/browser/modules/UITour.jsm +++ b/browser/modules/UITour.jsm @@ -838,7 +838,17 @@ this.UITour = { highlighter.parentElement.setAttribute("targetName", aTarget.targetName); highlighter.parentElement.hidden = false; - let targetRect = aTarget.node.getBoundingClientRect(); + let highlightAnchor; + // If the target is in the overflow panel, just highlight the overflow button. + if (aTarget.node.getAttribute("overflowedItem")) { + let doc = aTarget.node.ownerDocument; + let placement = CustomizableUI.getPlacementOfWidget(aTarget.widgetName || aTarget.node.id); + let areaNode = doc.getElementById(placement.area); + highlightAnchor = areaNode.overflowable._chevron; + } else { + highlightAnchor = aTarget.node; + } + let targetRect = highlightAnchor.getBoundingClientRect(); let highlightHeight = targetRect.height; let highlightWidth = targetRect.width; let minDimension = Math.min(highlightHeight, highlightWidth); @@ -874,7 +884,7 @@ this.UITour = { let offsetY = paddingLeftPx - (Math.max(0, highlightHeightWithMin - targetRect.height) / 2); this._addAnnotationPanelMutationObserver(highlighter.parentElement); - highlighter.parentElement.openPopup(aTarget.node, "overlap", offsetX, offsetY); + highlighter.parentElement.openPopup(highlightAnchor, "overlap", offsetX, offsetY); } // Prevent showing a panel at an undefined position. diff --git a/browser/themes/linux/browser.css b/browser/themes/linux/browser.css index 7cb769845f2..83ce7c1e11e 100644 --- a/browser/themes/linux/browser.css +++ b/browser/themes/linux/browser.css @@ -18,6 +18,23 @@ %define conditionalForwardWithUrlbar window:not([chromehidden~="toolbar"]) #urlbar-wrapper %define conditionalForwardWithUrlbarWidth 30 +:root { + --toolbarbutton-hover-background: hsla(0,0%,100%,.3) linear-gradient(hsla(0,0%,100%,.7), hsla(0,0%,100%,.2)); + --toolbarbutton-hover-boxshadow: 0 1px 0 hsla(0,0%,100%,.3) inset, 0 0 0 1px hsla(0,0%,100%,.2) inset, 0 1px 0 hsla(0,0%,0%,.03); + --toolbarbutton-hover-bordercolor: rgb(154,154,154); + + --toolbarbutton-active-boxshadow: 0 1px 1px hsla(0,0%,0%,.1) inset, 0 0 1px hsla(0,0%,0%,.3) inset; + --toolbarbutton-active-bordercolor: rgb(154,154,154); + --toolbarbutton-active-background: rgba(154,154,154,.5) linear-gradient(hsla(0,0%,100%,.7), hsla(0,0%,100%,.4)); + + --toolbarbutton-checkedhover-backgroundcolor: rgba(90%,90%,90%,.4); + + --toolbarbutton-combined-boxshadow: 0 0 0 1px hsla(0,0%,100%,.2); + --toolbarbutton-combined-backgroundimage: linear-gradient(hsla(210,54%,20%,.2) 0, hsla(210,54%,20%,.2) 18px); + + --verified-identity-box-backgroundcolor: #fff; +} + #menubar-items { -moz-box-orient: vertical; /* for flex hack */ } @@ -590,12 +607,11 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon { :-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1:not([disabled=true]):not([open]):hover > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon, :-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1:not([disabled=true]):hover > .toolbarbutton-badge-container > .toolbarbutton-icon, :-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1:not([disabled=true]):hover > .toolbarbutton-icon { - background-color: hsla(0,0%,100%,.3); - background-image: linear-gradient(hsla(0,0%,100%,.7), hsla(0,0%,100%,.2)); - border: 1px solid rgb(154,154,154); - box-shadow: 0 1px 0 hsla(0,0%,100%,.3) inset, - 0 0 0 1px hsla(0,0%,100%,.2) inset, - 0 1px 0 hsla(0,0%,0%,.03); + background: var(--toolbarbutton-hover-background); + border-width: 1px; + border-style: solid; + border-color: var(--toolbarbutton-hover-bordercolor); + box-shadow: var(--toolbarbutton-hover-boxshadow); } :-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1:hover > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon, @@ -608,16 +624,16 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon { :-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1[open="true"] > .toolbarbutton-menubutton-dropmarker:not([disabled=true]) > .dropmarker-icon, :-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1:not([disabled=true]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-badge-container > .toolbarbutton-icon, :-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1:not([disabled=true]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-icon { - background-color: rgba(154,154,154,.5); - background-image: linear-gradient(hsla(0,0%,100%,.7), hsla(0,0%,100%,.4)); - border: 1px solid rgb(154,154,154); - box-shadow: 0 1px 1px hsla(0,0%,0%,.1) inset, - 0 0 1px hsla(0,0%,0%,.3) inset; + background: var(--toolbarbutton-active-background); + box-shadow: var(--toolbarbutton-active-boxshadow); + border-width: 1px; + border-style: solid; + border-color: var(--toolbarbutton-active-bordercolor); transition-duration: 10ms; } :-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1[checked]:not(:active):hover > .toolbarbutton-icon { - background-color: rgba(90%,90%,90%,.4); + background-color: var(--toolbarbutton-checkedhover-backgroundcolor); transition: background-color 150ms; } @@ -633,12 +649,12 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon { width: 1px; height: 18px; -moz-margin-end: -1px; - background-image: linear-gradient(hsla(210,54%,20%,.2) 0, hsla(210,54%,20%,.2) 18px); + background-image: var(--toolbarbutton-combined-backgroundimage); background-clip: padding-box; background-position: center; background-repeat: no-repeat; background-size: 1px 18px; - box-shadow: 0 0 0 1px hsla(0,0%,100%,.2); + box-shadow: var(--toolbarbutton-combined-boxshadow); } :-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker { @@ -971,7 +987,7 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon { } #identity-box.verifiedIdentity:not(:-moz-lwtheme) { - background-color: #fff; + background-color: var(--verified-identity-box-backgroundcolor); } #identity-box:-moz-focusring { diff --git a/browser/themes/windows/browser.css b/browser/themes/windows/browser.css index f394de0572e..b6ded4bfd5f 100644 --- a/browser/themes/windows/browser.css +++ b/browser/themes/windows/browser.css @@ -17,6 +17,28 @@ %define conditionalForwardWithUrlbar window:not([chromehidden~="toolbar"]) #urlbar-wrapper %define conditionalForwardWithUrlbarWidth 30 +:root { + --toolbarbutton-hover-background: hsla(210,4%,10%,.08); + --toolbarbutton-hover-bordercolor: hsla(210,4%,10%,.1); + --toolbarbutton-hover-boxshadow: none; + + --toolbarbutton-active-background: hsla(210,4%,10%,.12); + --toolbarbutton-active-bordercolor: hsla(210,4%,10%,.2) transparent transparent; + --toolbarbutton-active-boxshadow: 0 1px 0 0 hsla(210,4%,10%,.1) inset; + + --toolbarbutton-checkedhover-backgroundcolor: hsla(210,4%,10%,.12); + + --toolbarbutton-combined-boxshadow: none; + --toolbarbutton-combined-backgroundimage: linear-gradient(hsla(210,54%,20%,.2) 0, hsla(210,54%,20%,.2) 16px); + + --verified-identity-box-backgroundcolor: #FFF; + + --urlbar-dropmarker-url: url("chrome://browser/skin/urlbar-history-dropmarker.png"); + --urlbar-dropmarker-region: rect(0px, 11px, 14px, 0px); + --urlbar-dropmarker-hover-region: rect(0px, 22px, 14px, 11px); + --urlbar-dropmarker-active-region: rect(0px, 33px, 14px, 22px); +} + #menubar-items { -moz-box-orient: vertical; /* for flex hack */ } @@ -663,6 +685,27 @@ toolbar[brighttext] .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker { (-moz-os-version: windows-win7) { %endif /* < Win8 */ + :root { + --toolbarbutton-hover-background: linear-gradient(hsla(0,0%,100%,.6), hsla(0,0%,100%,.1)); + --toolbarbutton-hover-bordercolor: hsla(210,54%,20%,.15) hsla(210,54%,20%,.2) hsla(210,54%,20%,.25); + --toolbarbutton-hover-boxshadow: 0 1px hsla(0,0%,100%,.3) inset, + 0 1px hsla(210,54%,20%,.03), + 0 0 2px hsla(210,54%,20%,.1); + + --toolbarbutton-active-background: hsla(210,54%,20%,.15) linear-gradient(hsla(0,0%,100%,.6), hsla(0,0%,100%,.1)); + --toolbarbutton-active-bordercolor: hsla(210,54%,20%,.3) hsla(210,54%,20%,.35) hsla(210,54%,20%,.4); + --toolbarbutton-active-boxshadow: 0 1px 1px hsla(210,54%,20%,.1) inset, + 0 0 1px hsla(210,54%,20%,.2) inset, +/* allows keyhole-forward-clip-path to be used for non-hover as well as hover: */ + 0 1px 0 hsla(210,54%,20%,0), + 0 0 2px hsla(210,54%,20%,0); + + --toolbarbutton-checkedhover-backgroundcolor: rgba(90%,90%,90%,.4); + + --toolbarbutton-combined-backgroundimage: linear-gradient(hsla(210,54%,20%,.2) 0, hsla(210,54%,20%,.2) 18px); + --toolbarbutton-combined-boxshadow: 0 0 0 1px hsla(0,0%,100%,.2); + } + #nav-bar .toolbarbutton-1 > .toolbarbutton-icon, #nav-bar .toolbarbutton-1 > .toolbarbutton-text, #nav-bar .toolbarbutton-1 > .toolbarbutton-badge-container, @@ -732,7 +775,8 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon { width: 1px; height: 16px; -moz-margin-end: -1px; - background-image: linear-gradient(hsla(210,54%,20%,.2) 0, hsla(210,54%,20%,.2) 16px); + background-image: var(--toolbarbutton-combined-backgroundimage); + box-shadow: var(--toolbarbutton-combined-boxshadow); background-clip: padding-box; background-position: center; background-repeat: no-repeat; @@ -751,8 +795,9 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon { #nav-bar .toolbarbutton-1:not([disabled=true]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-badge-container, @conditionalForwardWithUrlbar@ > #forward-button:not([open]):not(:active):not([disabled]):hover > .toolbarbutton-icon, #nav-bar .toolbarbutton-1:not([buttonover]):not([open]):not(:active):hover > .toolbarbutton-menubutton-dropmarker:not([disabled]) > .dropmarker-icon { - background-color: hsla(210,4%,10%,.08); - border-color: hsla(210,4%,10%,.1); + background: var(--toolbarbutton-hover-background); + border-color: var(--toolbarbutton-hover-bordercolor); + box-shadow: var(--toolbarbutton-hover-boxshadow); } %ifdef WINDOWS_AERO @@ -762,17 +807,8 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon { /* < Win8 */ #nav-bar .toolbarbutton-1:not(:hover):not(:active):not([open]) > .toolbarbutton-menubutton-dropmarker::before, #nav-bar .toolbaritem-combined-buttons > .toolbarbutton-1:-moz-any(:not(:hover):not([open]),[disabled]) + .toolbarbutton-1:-moz-any(:not(:hover):not([open]),[disabled])::before { - content: ""; - display: -moz-box; - width: 1px; height: 18px; - -moz-margin-end: -1px; - background-image: linear-gradient(hsla(210,54%,20%,.2) 0, hsla(210,54%,20%,.2) 18px); - background-clip: padding-box; - background-position: center; - background-repeat: no-repeat; background-size: 1px 18px; - box-shadow: 0 0 0 1px hsla(0,0%,100%,.2); } #nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon:-moz-locale-dir(ltr), @@ -787,21 +823,6 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon { border-bottom-left-radius: 0; } - #nav-bar .toolbarbutton-1:not([disabled=true]) > .toolbarbutton-menubutton-button[open] + .toolbarbutton-menubutton-dropmarker > .dropmarker-icon, - #nav-bar .toolbarbutton-1:not([disabled]):-moz-any(:hover,[open]) > .toolbarbutton-menubutton-button > .toolbarbutton-icon, - #nav-bar .toolbarbutton-1:not([disabled]):hover > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon, - #nav-bar .toolbarbutton-1:not([disabled]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-icon, - #nav-bar .toolbarbutton-1:not([disabled]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-text, - #nav-bar .toolbarbutton-1:not([disabled]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-badge-container, - @conditionalForwardWithUrlbar@ > .toolbarbutton-1:-moz-any([disabled],:not([open]):not([disabled]):not(:active)) > .toolbarbutton-icon { - background-image: linear-gradient(hsla(0,0%,100%,.6), hsla(0,0%,100%,.1)); - background-color: transparent; - border-color: hsla(210,54%,20%,.15) hsla(210,54%,20%,.2) hsla(210,54%,20%,.25); - box-shadow: 0 1px hsla(0,0%,100%,.3) inset, - 0 1px hsla(210,54%,20%,.03), - 0 0 2px hsla(210,54%,20%,.1); - } - #nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled]):not([open]):not(:active):hover > .toolbarbutton-icon, #nav-bar .toolbarbutton-1:not([buttonover]):not([open]):not(:active):hover > .toolbarbutton-menubutton-dropmarker:not([disabled]) > .dropmarker-icon, @conditionalForwardWithUrlbar@ > #forward-button:not([open]):not(:active):not([disabled]):hover > .toolbarbutton-icon { @@ -819,9 +840,9 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon { #nav-bar .toolbarbutton-1:not([disabled=true]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-icon, #nav-bar .toolbarbutton-1:not([disabled=true]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-text, #nav-bar .toolbarbutton-1:not([disabled=true]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-badge-container { - background-color: hsla(210,4%,10%,.12); - border-top-color: hsla(210,4%,10%,.2); - box-shadow: 0 1px 0 0 hsla(210,4%,10%,.1) inset; + background: var(--toolbarbutton-active-background); + border-color: var(--toolbarbutton-active-bordercolor); + box-shadow: var(--toolbarbutton-active-boxshadow); transition-duration: 10ms; } @@ -835,14 +856,6 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon { #nav-bar .toolbarbutton-1:not([disabled]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-icon, #nav-bar .toolbarbutton-1:not([disabled]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-text, #nav-bar .toolbarbutton-1:not([disabled]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-badge-container { - background-image: linear-gradient(hsla(0,0%,100%,.6), hsla(0,0%,100%,.1)); - background-color: hsla(210,54%,20%,.15); - border-color: hsla(210,54%,20%,.3) hsla(210,54%,20%,.35) hsla(210,54%,20%,.4); - box-shadow: 0 1px 1px hsla(210,54%,20%,.1) inset, - 0 0 1px hsla(210,54%,20%,.2) inset, - /* allows keyhole-forward-clip-path to be used for non-hover as well as hover: */ - 0 1px 0 hsla(210,54%,20%,0), - 0 0 2px hsla(210,54%,20%,0); text-shadow: none; transition: none; } @@ -852,7 +865,7 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon { } #nav-bar .toolbarbutton-1[checked]:not(:active):hover > .toolbarbutton-icon { - background-color: rgba(90%,90%,90%,.4); + background-color: var(--toolbarbutton-checkedhover-backgroundcolor); transition: background-color .4s; } %ifdef WINDOWS_AERO @@ -1317,7 +1330,7 @@ html|*.urlbar-input:-moz-lwtheme::-moz-placeholder, } #identity-box.verifiedIdentity:not(:-moz-lwtheme) { - background-color: #fff; + background-color: var(--verified-identity-box-backgroundcolor); } #identity-box:-moz-focusring { @@ -1338,19 +1351,19 @@ html|*.urlbar-input:-moz-lwtheme::-moz-placeholder, background-color: transparent; border: none; width: auto; - list-style-image: url("chrome://browser/skin/urlbar-history-dropmarker.png"); - -moz-image-region: rect(0px, 11px, 14px, 0px); + list-style-image: var(--urlbar-dropmarker-url); + -moz-image-region: var(--urlbar-dropmarker-region); } .urlbar-history-dropmarker:hover { background-image: radial-gradient(circle closest-side, hsla(205,100%,70%,.3), transparent); - -moz-image-region: rect(0px, 22px, 14px, 11px); + -moz-image-region: var(--urlbar-dropmarker-hover-region); } .urlbar-history-dropmarker:hover:active, .urlbar-history-dropmarker[open="true"] { background-image: radial-gradient(circle closest-side, hsla(205,100%,70%,.1), transparent); - -moz-image-region: rect(0px, 33px, 14px, 22px); + -moz-image-region: var(--urlbar-dropmarker-active-region); } /* page proxy icon */ diff --git a/browser/themes/windows/customizableui/panelUIOverlay.css b/browser/themes/windows/customizableui/panelUIOverlay.css index 1e5f376d8d0..1c5343fff29 100644 --- a/browser/themes/windows/customizableui/panelUIOverlay.css +++ b/browser/themes/windows/customizableui/panelUIOverlay.css @@ -30,8 +30,8 @@ #BMB_bookmarksPopup menupopup[placespopup=true] > hbox { /* emulating chrome://browser/content/places/menu.xml#places-popup-arrow but without the arrow */ box-shadow: 0 0 4px rgba(0,0,0,0.2); - background: #FFF; - border: 1px solid rgba(0,0,0,0.25); + background: var(--panel-arrowcontent-background); + border: var(--panel-arrowcontent-border); border-radius: 3.5px; margin-top: -4px; } diff --git a/browser/themes/windows/searchbar.css b/browser/themes/windows/searchbar.css index c7eca8cf5f1..eaddc708630 100644 --- a/browser/themes/windows/searchbar.css +++ b/browser/themes/windows/searchbar.css @@ -2,6 +2,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +.searchbar-dropmarker-image { + --searchbar-dropmarker-url: url("chrome://browser/skin/searchbar-dropdown-arrow.png"); +} + .autocomplete-textbox-container { -moz-box-align: stretch; } @@ -38,7 +42,7 @@ } .searchbar-dropmarker-image { - list-style-image: url("chrome://browser/skin/searchbar-dropdown-arrow.png"); + list-style-image: var(--searchbar-dropmarker-url); -moz-image-region: rect(0, 13px, 11px, 0); } diff --git a/toolkit/themes/windows/global/popup.css b/toolkit/themes/windows/global/popup.css index f3183e08e96..1993c9ea19c 100644 --- a/toolkit/themes/windows/global/popup.css +++ b/toolkit/themes/windows/global/popup.css @@ -4,6 +4,13 @@ @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); +/* ::::: Variables ::::: */ +.panel-arrowcontent { + --panel-arrowcontent-background: -moz-field; + --panel-arrowcontent-color: -moz-FieldText; + --panel-arrowcontent-border: 1px solid ThreeDShadow; +} + /* ::::: menupopup ::::: */ menupopup, @@ -49,10 +56,10 @@ panel[type="arrow"][side="right"] { .panel-arrowcontent { padding: 10px; - color: -moz-FieldText; - background: -moz-field; + color: var(--panel-arrowcontent-color); + background: var(--panel-arrowcontent-background); background-clip: padding-box; - border: 1px solid ThreeDShadow; + border: var(--panel-arrowcontent-border); margin: 4px; } @@ -105,7 +112,7 @@ panel[type="arrow"][side="right"] { %ifdef XP_WIN @media (-moz-windows-default-theme) { .panel-arrowcontent { - border-color: hsla(210,4%,10%,.2); + --panel-arrowcontent-border: 1px solid hsla(210,4%,10%,.2); box-shadow: 0 0 4px hsla(210,4%,10%,.2); } diff --git a/toolkit/xre/nsSigHandlers.cpp b/toolkit/xre/nsSigHandlers.cpp index bc4250c07bf..cb4b4e68082 100644 --- a/toolkit/xre/nsSigHandlers.cpp +++ b/toolkit/xre/nsSigHandlers.cpp @@ -26,6 +26,7 @@ #include #include #include // atoi +#include #ifndef ANDROID // no Android impl # include #endif @@ -44,6 +45,13 @@ static unsigned int _gdb_sleep_duration = 300; #define CRAWL_STACK_ON_SIGSEGV #endif +#ifndef PR_SET_PTRACER +#define PR_SET_PTRACER 0x59616d61 +#endif +#ifndef PR_SET_PTRACER_ANY +#define PR_SET_PTRACER_ANY ((unsigned long)-1) +#endif + #if defined(CRAWL_STACK_ON_SIGSEGV) #include @@ -87,6 +95,9 @@ ah_crap_handler(int signum) _progname, getpid()); + // Allow us to be ptraced by gdb on Linux with Yama restrictions enabled. + prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY); + sleep(_gdb_sleep_duration); printf("Done sleeping...\n");