From 986a8ae47f45bb12b673a4f9e3c1cdb30a457771 Mon Sep 17 00:00:00 2001 From: Chris Manchester Date: Fri, 24 Aug 2018 18:13:20 +0000 Subject: [PATCH 01/14] Bug 1485174 - Prevent using an objdir to build with tup that was previously used to build with make. r=firefox-build-system-reviewers,froydnj Differential Revision: https://phabricator.services.mozilla.com/D4154 --HG-- extra : moz-landing-system : lando --- python/mozbuild/mozbuild/controller/building.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/python/mozbuild/mozbuild/controller/building.py b/python/mozbuild/mozbuild/controller/building.py index b192546980d4..3b98f56f0a41 100644 --- a/python/mozbuild/mozbuild/controller/building.py +++ b/python/mozbuild/mozbuild/controller/building.py @@ -6,6 +6,7 @@ from __future__ import absolute_import, unicode_literals import errno import getpass +import glob import io import json import logging @@ -1047,6 +1048,16 @@ class BuildDriver(MozbuildObject): status = None active_backend = config.substs.get('BUILD_BACKENDS', [None])[0] if active_backend and 'Make' not in active_backend: + for backend_file in glob.iglob(mozpath.join(self.topobjdir, + 'backend.*Backend')): + if 'Make' in backend_file: + self.log(logging.ERROR, 'backend', + {'objdir': self.topobjdir}, + "The active objdir, {objdir}, was previously " + "used to build with a Make-based backend. " + "Change objdirs (by setting MOZ_OBJDIR in " + "your mozconfig) to continue.\n") + return 1 # Record whether a clobber was requested so we can print # a special message later if the build fails. clobber_requested = False From 0309960145cee86086dc6b769029d20edfc66682 Mon Sep 17 00:00:00 2001 From: Johann Hofmann Date: Fri, 24 Aug 2018 19:46:07 +0000 Subject: [PATCH 02/14] Bug 1485743 - Don't show the Content Blocking tour in private windows. r=francois Differential Revision: https://phabricator.services.mozilla.com/D4197 --HG-- extra : moz-landing-system : lando --- .../base/content/browser-contentblocking.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/browser/base/content/browser-contentblocking.js b/browser/base/content/browser-contentblocking.js index 69b74c3b309d..fc4ae965d06c 100644 --- a/browser/base/content/browser-contentblocking.js +++ b/browser/base/content/browser-contentblocking.js @@ -445,10 +445,10 @@ var ContentBlocking = { blocker.categoryItem.hidden = !blocker.visible; } + let isBrowserPrivate = PrivateBrowsingUtils.isBrowserPrivate(gBrowser.selectedBrowser); + // Check whether the user has added an exception for this site. - let type = PrivateBrowsingUtils.isBrowserPrivate(gBrowser.selectedBrowser) ? - "trackingprotection-pb" : - "trackingprotection"; + let type = isBrowserPrivate ? "trackingprotection-pb" : "trackingprotection"; let hasException = Services.perms.testExactPermission(baseURI, type) == Services.perms.ALLOW_ACTION; @@ -463,11 +463,13 @@ var ContentBlocking = { } else if (active && webProgress.isTopLevel) { this.iconBox.setAttribute("animate", "true"); - let introCount = Services.prefs.getIntPref(this.prefIntroCount); - if (introCount < this.MAX_INTROS) { - Services.prefs.setIntPref(this.prefIntroCount, ++introCount); - Services.prefs.savePrefFile(null); - this.showIntroPanel(); + if (!isBrowserPrivate) { + let introCount = Services.prefs.getIntPref(this.prefIntroCount); + if (introCount < this.MAX_INTROS) { + Services.prefs.setIntPref(this.prefIntroCount, ++introCount); + Services.prefs.savePrefFile(null); + this.showIntroPanel(); + } } } From 2188a68716214b1489658af08f3a57bb8b531208 Mon Sep 17 00:00:00 2001 From: Brian Grinstead Date: Fri, 24 Aug 2018 19:43:39 +0000 Subject: [PATCH 03/14] Bug 1482448 - Part 1 - Move window listeners for browser.xul into one place;r=Gijs This is an extension of the work in Bug 1473160 to make clear in what environments various gBrowserInit functions are run. Since we currently use these in an `if` block in browser.js for "navigator:browser" window types, and browser.xul is the only navigator:browser window that loads browser.js, this moves the event listeners directly into browser.xul so it's extra clear that they don't run in non-browser top level windows on OSX. Also move a few on-event handlers from the tag into this block so they all happen in one place. Differential Revision: https://phabricator.services.mozilla.com/D4137 --HG-- extra : moz-landing-system : lando --- browser/base/content/browser.js | 13 ------------- browser/base/content/browser.xul | 13 ++++++++++++- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 5a5b0f8466d8..d160780d4cd5 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -1141,19 +1141,6 @@ function RedirectLoad({ target: browser, data }) { } } -if (document.documentElement.getAttribute("windowtype") == "navigator:browser") { - window.addEventListener("MozBeforeInitialXULLayout", () => { - gBrowserInit.onBeforeInitialXULLayout(); - }, { once: true }); - // The listener of DOMContentLoaded must be set on window, rather than - // document, because the window can go away before the event is fired. - // In that case, we don't want to initialize anything, otherwise we - // may be leaking things because they will never be destroyed after. - window.addEventListener("DOMContentLoaded", () => { - gBrowserInit.onDOMContentLoaded(); - }, { once: true }); -} - let _resolveDelayedStartup; var delayedStartupPromise = new Promise(resolve => { _resolveDelayedStartup = resolve; diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index 42ff6aa91384..c4ff982a3f00 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -37,7 +37,6 @@ xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" - onload="gBrowserInit.onLoad()" onunload="gBrowserInit.onUnload()" onclose="return WindowIsClosing();" title="&mainWindow.title;" title_normal="&mainWindow.title;" #ifdef XP_MACOSX @@ -79,6 +78,18 @@ xmlns="http://www.w3.org/1999/xhtml" > Services.scriptloader.loadSubScript("chrome://global/content/contentAreaUtils.js", this); Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser.js", this); + + window.onload = gBrowserInit.onLoad.bind(gBrowserInit); + window.onunload = gBrowserInit.onUnload.bind(gBrowserInit); + window.onclose = WindowIsClosing; + window.addEventListener("MozBeforeInitialXULLayout", + gBrowserInit.onBeforeInitialXULLayout.bind(gBrowserInit), { once: true }); + // The listener of DOMContentLoaded must be set on window, rather than + // document, because the window can go away before the event is fired. + // In that case, we don't want to initialize anything, otherwise we + // may be leaking things because they will never be destroyed after. + window.addEventListener("DOMContentLoaded", + gBrowserInit.onDOMContentLoaded.bind(gBrowserInit), { once: true }); # All sets except for popupsets (commands, keys, and stringbundles) From 45a1491c027b71d0690a4ff23def54990bf333c9 Mon Sep 17 00:00:00 2001 From: Brian Grinstead Date: Fri, 24 Aug 2018 19:43:42 +0000 Subject: [PATCH 04/14] Bug 1482448 - Part 2 - Run gBrowserInit.onBeforeInitialXULLayout in browser.xhtml;r=Gijs MozBeforeInitialXULLayout doesn't fire in HTML docs. Even if we change it to start firing for all top-level docs, it ends up firing _before_ the inline script runs inside of browser.xul. For now, run that logic in DOMContentLoaded to at least get a more functional browser window. Differential Revision: https://phabricator.services.mozilla.com/D4138 --HG-- extra : moz-landing-system : lando --- browser/base/content/browser.xul | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index c4ff982a3f00..b731217a7ac0 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -82,8 +82,13 @@ xmlns="http://www.w3.org/1999/xhtml" window.onload = gBrowserInit.onLoad.bind(gBrowserInit); window.onunload = gBrowserInit.onUnload.bind(gBrowserInit); window.onclose = WindowIsClosing; +#ifdef BROWSER_XHTML + window.addEventListener("DOMContentLoaded", + gBrowserInit.onBeforeInitialXULLayout.bind(gBrowserInit), { once: true }); +#else window.addEventListener("MozBeforeInitialXULLayout", gBrowserInit.onBeforeInitialXULLayout.bind(gBrowserInit), { once: true }); +#endif // The listener of DOMContentLoaded must be set on window, rather than // document, because the window can go away before the event is fired. // In that case, we don't want to initialize anything, otherwise we From c9437b2c8e650a4cf52f4d56a633085c98969adc Mon Sep 17 00:00:00 2001 From: James Willcox Date: Fri, 24 Aug 2018 15:30:30 +0000 Subject: [PATCH 05/14] Bug 1485980 - Downgrade test runner packages to match support library r=jchen Differential Revision: https://phabricator.services.mozilla.com/D4221 --HG-- extra : moz-landing-system : lando --- mobile/android/geckoview/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mobile/android/geckoview/build.gradle b/mobile/android/geckoview/build.gradle index 08965e054299..fd4fb2f05af2 100644 --- a/mobile/android/geckoview/build.gradle +++ b/mobile/android/geckoview/build.gradle @@ -200,9 +200,9 @@ dependencies { testImplementation 'org.mockito:mockito-core:1.10.19' androidTestImplementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test:rules:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + androidTestImplementation 'com.android.support.test:runner:1.0.1' + androidTestImplementation 'com.android.support.test:rules:1.0.1' + androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' androidTestImplementation "com.android.support:support-annotations:$support_library_version" } From 987c1af77fab10f15bf5cc1d3c3c96b8c15c1ce6 Mon Sep 17 00:00:00 2001 From: Ting-Yu Lin Date: Fri, 24 Aug 2018 19:05:18 +0000 Subject: [PATCH 06/14] Bug 1486074 - Move logic for copying aliased properties' fields to the bottom of property_database.js. r=emilio Differential Revision: https://phabricator.services.mozilla.com/D4247 --HG-- extra : moz-landing-system : lando --- layout/style/test/property_database.js | 59 ++++++++++++++------------ 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index e38f81cf8e9a..eba7883cc5ca 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -7949,34 +7949,6 @@ if (IsCSSPropertyPrefEnabled("layout.css.text-align-unsafe-value.enabled")) { gCSSProperties["display"].other_values.push("flow-root"); -// Copy aliased properties' fields from their alias targets. -for (var prop in gCSSProperties) { - var entry = gCSSProperties[prop]; - if (entry.alias_for) { - var aliasTargetEntry = gCSSProperties[entry.alias_for]; - if (!aliasTargetEntry) { - ok(false, - "Alias '" + prop + "' alias_for field, '" + entry.alias_for + "', " + - "must be set to a recognized CSS property in gCSSProperties"); - } else { - // Copy 'values' fields & 'prerequisites' field from aliasTargetEntry: - var fieldsToCopy = - ["initial_values", "other_values", "invalid_values", - "quirks_values", "unbalanced_values", - "prerequisites"]; - - fieldsToCopy.forEach(function(fieldName) { - // (Don't copy the field if the alias already has something there, - // or if the aliased property doesn't have anything to copy.) - if (!(fieldName in entry) && - fieldName in aliasTargetEntry) { - entry[fieldName] = aliasTargetEntry[fieldName] - } - }); - } - } -} - if (IsCSSPropertyPrefEnabled("layout.css.column-span.enabled")) { gCSSProperties["column-span"] = { domProp: "columnSpan", @@ -8205,3 +8177,34 @@ if (IsCSSPropertyPrefEnabled("layout.css.overflow.moz-scrollbars.enabled")) { } else { gCSSProperties["overflow"].invalid_values.push(...OVERFLOW_MOZKWS); } + +// Copy aliased properties' fields from their alias targets. Keep this logic +// at the bottom of this file to ensure all the aliased properties are +// processed. +for (var prop in gCSSProperties) { + var entry = gCSSProperties[prop]; + if (entry.alias_for) { + var aliasTargetEntry = gCSSProperties[entry.alias_for]; + if (!aliasTargetEntry) { + ok(false, + "Alias '" + prop + "' alias_for field, '" + entry.alias_for + "', " + + "must be set to a recognized CSS property in gCSSProperties"); + } else { + // Copy 'values' fields & 'prerequisites' field from aliasTargetEntry: + var fieldsToCopy = + ["initial_values", "other_values", "invalid_values", + "quirks_values", "unbalanced_values", + "prerequisites"]; + + fieldsToCopy.forEach(function(fieldName) { + // (Don't copy the field if the alias already has something there, + // or if the aliased property doesn't have anything to copy.) + if (!(fieldName in entry) && + fieldName in aliasTargetEntry) { + entry[fieldName] = aliasTargetEntry[fieldName] + } + }); + } + } +} + From 4e4875fdd6df594ebdb8e72af2b7f2ce66e6c1bc Mon Sep 17 00:00:00 2001 From: anthony Date: Fri, 24 Aug 2018 21:48:24 +0000 Subject: [PATCH 07/14] Bug 1486119 - Pocket: Replace getSystemPrincipal opening new tab with createNullPrincipal r=jkt Opening a new tab with a hardcoded link with the system utility openWebLinkI was erroring when passing in getSystemPrincipal. Updating code to pass in a createNullPrincipal. Differential Revision: https://phabricator.services.mozilla.com/D4262 --HG-- extra : moz-landing-system : lando --- browser/extensions/pocket/content/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser/extensions/pocket/content/main.js b/browser/extensions/pocket/content/main.js index 040c823066e7..d780f66c6d8a 100644 --- a/browser/extensions/pocket/content/main.js +++ b/browser/extensions/pocket/content/main.js @@ -150,7 +150,7 @@ var pktUI = (function() { if (pktApi.getSignupPanelTabTestVariant() == "v2") { let site = Services.prefs.getCharPref("extensions.pocket.site"); openTabWithUrl("https://" + site + "/firefox_learnmore?s=ffi&t=autoredirect&tv=page_learnmore&src=ff_ext", - Services.scriptSecurityManager.getSystemPrincipal()); + Services.scriptSecurityManager.createNullPrincipal({})); // force the panel closed before it opens getPanel().hidePopup(); From 9daee9a3a5fee15f13ae418cba2cd10e8840dff1 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Fri, 24 Aug 2018 07:40:07 +0000 Subject: [PATCH 08/14] Bug 1464723 - Implement custom scrollbar support for GTK widget. r=karlt,dholbert When any scrollbar color is specified, or scrollbar-width is thin, we switch to use the fallback rendering. The change to xulscrollbars.css is for ensuring that the scrollbar is displayed for scrollbar-width: thin when there is no scrollbar color specified. It wouldn't affect cases where -moz-appearance takes effect. This also changes the fallback width of the scrollbars. Since the two widths was picked rather randomly, I think it should be fine to change it if a value looks better than the old one, especially on Linux which is the main usecase for this fallback rendering. Differential Revision: https://phabricator.services.mozilla.com/D3952 --HG-- extra : moz-landing-system : lando --- layout/xul/nsBox.cpp | 4 ++-- toolkit/themes/windows/global/xulscrollbars.css | 5 +++++ widget/gtk/nsNativeThemeGTK.cpp | 9 +++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/layout/xul/nsBox.cpp b/layout/xul/nsBox.cpp index c2abe2ab6176..15d1b07c4cf8 100644 --- a/layout/xul/nsBox.cpp +++ b/layout/xul/nsBox.cpp @@ -532,9 +532,9 @@ GetScrollbarWidthNoTheme(nsIFrame* aBox) switch (scrollbarStyle->StyleUIReset()->mScrollbarWidth) { default: case StyleScrollbarWidth::Auto: - return 16 * AppUnitsPerCSSPixel(); + return 12 * AppUnitsPerCSSPixel(); case StyleScrollbarWidth::Thin: - return 8 * AppUnitsPerCSSPixel(); + return 6 * AppUnitsPerCSSPixel(); case StyleScrollbarWidth::None: return 0; } diff --git a/toolkit/themes/windows/global/xulscrollbars.css b/toolkit/themes/windows/global/xulscrollbars.css index 318fadc9c8ed..dad8234be280 100644 --- a/toolkit/themes/windows/global/xulscrollbars.css +++ b/toolkit/themes/windows/global/xulscrollbars.css @@ -14,6 +14,7 @@ scrollbar { -moz-appearance: scrollbar-horizontal; cursor: default; + background-color: #f0f0f0; } @media all and (-moz-overlay-scrollbars) { @@ -43,6 +44,10 @@ slider[orient="vertical"] { /* ::::: thumb (horizontal) ::::: */ +thumb { + background-color: #cdcdcd; +} + thumb[orient="vertical"] { -moz-appearance: scrollbarthumb-vertical; min-height: 8px; diff --git a/widget/gtk/nsNativeThemeGTK.cpp b/widget/gtk/nsNativeThemeGTK.cpp index 9d304db4b3b7..e0ce4f2b6fa8 100644 --- a/widget/gtk/nsNativeThemeGTK.cpp +++ b/widget/gtk/nsNativeThemeGTK.cpp @@ -1866,6 +1866,15 @@ nsNativeThemeGTK::ThemeSupportsWidget(nsPresContext* aPresContext, if (IsWidgetTypeDisabled(mDisabledWidgetTypes, aWidgetType)) return false; + if (IsWidgetScrollbarPart(aWidgetType)) { + ComputedStyle* cs = nsLayoutUtils::StyleForScrollbar(aFrame); + if (cs->StyleUI()->HasCustomScrollbars() || + // We cannot handle thin scrollbar on GTK+ widget directly as well. + cs->StyleUIReset()->mScrollbarWidth == StyleScrollbarWidth::Thin) { + return false; + } + } + if (aWidgetType == StyleAppearance::MenulistButton && StaticPrefs::layout_css_webkit_appearance_enabled()) { aWidgetType = StyleAppearance::Menulist; From 487d770cc344ca637329bbab090a58e9ba270231 Mon Sep 17 00:00:00 2001 From: Matthew Noorenberghe Date: Fri, 24 Aug 2018 23:21:30 +0000 Subject: [PATCH 09/14] Bug 1485473 - Combine the borders of the name fields on the address form. r=sfoster Differential Revision: https://phabricator.services.mozilla.com/D4031 --HG-- extra : moz-landing-system : lando --- .../payments/res/containers/address-form.css | 6 +- .../test/mochitest/test_address_form.html | 1 + .../formautofill/content/editAddress.xhtml | 26 +++--- .../formautofill/content/editCreditCard.xhtml | 14 +-- .../formautofill/skin/shared/editAddress.css | 66 ++++++++++++++ .../skin/shared/editDialog-shared.css | 13 +-- .../test/browser/browser_editAddressDialog.js | 86 +++++++++++++++++++ .../themes/shared/in-content/common.inc.css | 9 ++ 8 files changed, 196 insertions(+), 25 deletions(-) diff --git a/browser/components/payments/res/containers/address-form.css b/browser/components/payments/res/containers/address-form.css index 1c537b948525..3d59f94c9b55 100644 --- a/browser/components/payments/res/containers/address-form.css +++ b/browser/components/payments/res/containers/address-form.css @@ -26,7 +26,7 @@ body[dir="rtl"] .error-text { right: 3px; } -:-moz-any(input, textarea, select):focus + .error-text:not(:empty)::before { +:-moz-any(input, textarea, select):focus ~ .error-text:not(:empty)::before { background-color: #d70022; top: -7px; content: '.'; @@ -47,8 +47,8 @@ body[dir=rtl] .error-text::before { right: 12px } -:-moz-any(input, textarea, select):not(:focus) + .error-text, -:-moz-any(input, textarea, select):valid + .error-text { +:-moz-any(input, textarea, select):not(:focus) ~ .error-text, +:-moz-any(input, textarea, select):valid ~ .error-text { display: none; } diff --git a/browser/components/payments/test/mochitest/test_address_form.html b/browser/components/payments/test/mochitest/test_address_form.html index ea58e3c1f00a..d1f09ca45320 100644 --- a/browser/components/payments/test/mochitest/test_address_form.html +++ b/browser/components/payments/test/mochitest/test_address_form.html @@ -297,6 +297,7 @@ add_task(async function test_restricted_address_fields() { "tel should be visible"); fillField(form.form.querySelector("#given-name"), "John"); + fillField(form.form.querySelector("#family-name"), "Smith"); ok(form.saveButton.disabled, "Save button should be disabled due to empty fields"); fillField(form.form.querySelector("#email"), "john@example.com"); todo(form.saveButton.disabled, diff --git a/browser/extensions/formautofill/content/editAddress.xhtml b/browser/extensions/formautofill/content/editAddress.xhtml index dbdca2e4e23a..c67bedc5a66d 100644 --- a/browser/extensions/formautofill/content/editAddress.xhtml +++ b/browser/extensions/formautofill/content/editAddress.xhtml @@ -18,57 +18,61 @@
+