Skip to content

Commit

Permalink
Merge m-c to autoland, a=merge
Browse files Browse the repository at this point in the history
  • Loading branch information
KWierso committed May 9, 2017
2 parents 87efd9f + 1ff4a39 commit 9161724
Show file tree
Hide file tree
Showing 235 changed files with 20,973 additions and 19,866 deletions.
8 changes: 4 additions & 4 deletions browser/base/content/aboutaccounts/aboutaccounts.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</header>

<section>
<img class="graphic graphic-sync-intro" src="chrome://browser/skin/fxa/sync-illustration.svg#blueFill"/>
<img class="graphic graphic-sync-intro" src="chrome://browser/skin/fxa/sync-illustration.svg"/>

<div class="button-row">
<button id="buttonOpenPrefs" class="button" href="#" tabindex="0">&aboutAccountsConfig.syncPreferences.label;</button>
Expand All @@ -56,7 +56,7 @@
</header>

<section>
<img class="graphic graphic-sync-intro" src="chrome://browser/skin/fxa/sync-illustration.svg#blueFill"/>
<img class="graphic graphic-sync-intro" src="chrome://browser/skin/fxa/sync-illustration.svg"/>
<div class="description">&aboutAccountsConfig.description;</div>

<div class="button-row">
Expand All @@ -71,7 +71,7 @@
</header>

<section>
<img class="graphic graphic-sync-intro" src="chrome://browser/skin/fxa/sync-illustration.svg#blueFill"/>
<img class="graphic graphic-sync-intro" src="chrome://browser/skin/fxa/sync-illustration.svg"/>
<div class="description">&aboutAccounts.noConnection.description;</div>

<div class="button-row">
Expand All @@ -86,7 +86,7 @@
</header>

<section>
<img class="graphic graphic-sync-intro" src="chrome://browser/skin/fxa/sync-illustration.svg#blueFill"/>
<img class="graphic graphic-sync-intro" src="chrome://browser/skin/fxa/sync-illustration.svg"/>
<div class="description">&aboutAccounts.badConfig.description;</div>

</section>
Expand Down
2 changes: 2 additions & 0 deletions browser/base/content/aboutaccounts/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ header h1
overflow: hidden;
text-indent: 100%;
white-space: nowrap;
-moz-context-properties: fill;
fill: #bfcbd3;
}

.description,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ const EXPECTED_REFLOWS = [

// Focusing the content area causes a reflow.
"_delayedStartup@chrome://browser/content/browser.js|",

// Sometimes sessionstore collects data during this test, which causes a sync reflow
// (https://bugzilla.mozilla.org/show_bug.cgi?id=892154 will fix this)
"ssi_getWindowDimension@resource:///modules/sessionstore/SessionStore.jsm",
];

if (Services.appinfo.OS == "WINNT" || Services.appinfo.OS == "Darwin") {
Expand Down
21 changes: 11 additions & 10 deletions browser/base/content/urlbarBindings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
}
}
} else {
let originalUrl = ReaderMode.getOriginalUrl(aValue);
let originalUrl = ReaderMode.getOriginalUrlObjectForDisplay(aValue);
if (originalUrl) {
returnValue = originalUrl;
returnValue = originalUrl.spec;
}
}

Expand Down Expand Up @@ -825,16 +825,17 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
}

// Avoid copying 'about:reader?url=', and always provide the original URI:
let readerOriginalURL = ReaderMode.getOriginalUrl(uri.spec);
if (readerOriginalURL) {
uri = uriFixup.createFixupURI(readerOriginalURL, Ci.nsIURIFixup.FIXUP_FLAG_NONE);
// Reader mode ensures we call createExposableURI itself.
let readerStrippedURI = ReaderMode.getOriginalUrlObjectForDisplay(uri.spec);
if (readerStrippedURI) {
uri = readerStrippedURI;
} else {
// Only copy exposable URIs
try {
uri = uriFixup.createExposableURI(uri);
} catch (ex) {}
}

// Only copy exposable URIs
try {
uri = uriFixup.createExposableURI(uri);
} catch (ex) {}

// If the entire URL is selected, just use the actual loaded URI,
// unless we want a decoded URI, or it's a data: or javascript: URI,
// since those are hard to read when encoded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ support-files =
[browser_favicon.js]
[browser_forgetaboutsite.js]
[browser_forgetAPI_cookie_getCookiesWithOriginAttributes.js]
[browser_restore_getCookiesWithOriginAttributes.js]
[browser_forgetAPI_EME_forgetThisSite.js]
[browser_forgetAPI_quota_clearStoragesForPrincipal.js]
[browser_newtabButton.js]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
/*
* Bug 1334587 - A Test case for checking whether forgetting APIs are working for cookies.
*/

const { classes: Cc, Constructor: CC, interfaces: Ci, utils: Cu } = Components;

const TEST_HOST = "example.com";
const TEST_URL = "http://" + TEST_HOST + "/browser/browser/components/contextualidentity/test/browser/";

const USER_CONTEXTS = [
"default",
"personal",
"work"
];

const DELETE_CONTEXT = 1;
const COOKIE_NAME = "userContextId";

//
// Support functions.
//

function* openTabInUserContext(uri, userContextId) {
// Open the tab in the correct userContextId.
let tab = gBrowser.addTab(uri, {userContextId});

// Select tab and make sure its browser is focused.
gBrowser.selectedTab = tab;
tab.ownerGlobal.focus();

let browser = gBrowser.getBrowserForTab(tab);
yield BrowserTestUtils.browserLoaded(browser);
return {tab, browser};
}

function getCookiesForOA(host, userContextId) {
return Services.cookies.getCookiesFromHost(host, {userContextId});
}

//
// Test functions.
//

add_task(function* setup() {
// Make sure userContext is enabled.
yield SpecialPowers.pushPrefEnv({"set": [
[ "privacy.userContext.enabled", true ],
]});
});

function checkCookies(ignoreContext = null) {
for (let userContextId of Object.keys(USER_CONTEXTS)) {
if (ignoreContext && userContextId === String(ignoreContext)) {
continue;
}
let enumerator = getCookiesForOA(TEST_HOST, userContextId);
ok(enumerator.hasMoreElements(), "Cookies available");

let foundCookie = enumerator.getNext().QueryInterface(Ci.nsICookie2);
is(foundCookie["name"], COOKIE_NAME, "Check cookie name");
is(foundCookie["value"], USER_CONTEXTS[userContextId], "Check cookie value");
}
}

function deleteCookies(onlyContext = null) {
// Using getCookiesWithOriginAttributes() to get all cookies for a certain
// domain by using the originAttributes pattern, and clear all these cookies.
let enumerator = Services.cookies.getCookiesWithOriginAttributes(JSON.stringify({}), TEST_HOST);
while (enumerator.hasMoreElements()) {
let cookie = enumerator.getNext().QueryInterface(Ci.nsICookie);
if (!onlyContext || cookie.originAttributes.userContextId == onlyContext) {
Services.cookies.remove(cookie.host, cookie.name, cookie.path, false, cookie.originAttributes);
}
}
}

add_task(function* test_cookie_getCookiesWithOriginAttributes() {
let tabs = [];

for (let userContextId of Object.keys(USER_CONTEXTS)) {
// Load the page in different contexts and set a cookie
// which should only be visible in that context.
let value = USER_CONTEXTS[userContextId];

// Open our tab in the given user context.
tabs[userContextId] = yield* openTabInUserContext(TEST_URL + "file_reflect_cookie_into_title.html?" + value, userContextId);

// Close this tab.
yield BrowserTestUtils.removeTab(tabs[userContextId].tab);
}

// Check that cookies have been set properly.
for (let userContextId of Object.keys(USER_CONTEXTS)) {
let enumerator = getCookiesForOA(TEST_HOST, userContextId);
ok(enumerator.hasMoreElements(), "Cookies available");

let foundCookie = enumerator.getNext().QueryInterface(Ci.nsICookie2);
is(foundCookie["name"], COOKIE_NAME, "Check cookie name");
is(foundCookie["value"], USER_CONTEXTS[userContextId], "Check cookie value");
}
checkCookies();

deleteCookies(DELETE_CONTEXT);

checkCookies(DELETE_CONTEXT);

deleteCookies();

// Check that whether cookies has been cleared.
for (let userContextId of Object.keys(USER_CONTEXTS)) {
let e = getCookiesForOA(TEST_HOST, userContextId);
ok(!e.hasMoreElements(), "No Cookie should be here");
}
});
4 changes: 2 additions & 2 deletions browser/components/preferences/in-content-old/sync.xul
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</groupbox>
</vbox>
<vbox>
<html:img class="fxaSyncIllustration" src="chrome://browser/skin/fxa/sync-illustration.svg#blueFill"/>
<html:img class="fxaSyncIllustration" src="chrome://browser/skin/fxa/sync-illustration.svg"/>
</vbox>
</hbox>
<label class="fxaMobilePromo">
Expand Down Expand Up @@ -178,7 +178,7 @@
</groupbox>
</vbox>
<vbox>
<html:img class="fxaSyncIllustration" src="chrome://browser/skin/fxa/sync-illustration.svg#blueFill"/>
<html:img class="fxaSyncIllustration" src="chrome://browser/skin/fxa/sync-illustration.svg"/>
</vbox>
</hbox>
<groupbox>
Expand Down
2 changes: 1 addition & 1 deletion browser/components/preferences/in-content/containers.xul
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<hbox hidden="true"
class="container-header-links"
data-category="paneContainers">
<label class="text-link" id="backContainersLink" value="&backLink.label;" />
<label class="text-link" id="backContainersLink">&backLink.label;</label>
</hbox>

<hbox id="header-containers"
Expand Down
4 changes: 4 additions & 0 deletions browser/components/preferences/in-content/findInPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ var gSearchResultsPane = {
valueResult = this.stringMatchesFilters(nodeObject.getAttribute("value"), searchPhrase);
}

if (nodeObject.tagName == "button" && (labelResult || valueResult)) {
nodeObject.setAttribute("highlightable", "true");
}

matchesFound = matchesFound || complexTextNodesResult || labelResult || valueResult;
}

Expand Down
2 changes: 1 addition & 1 deletion browser/components/preferences/in-content/main.xul
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@
<separator class="thin"/>

<hbox id="addEnginesBox" pack="start">
<label id="addEngines" class="text-link" value="&addMoreSearchEngines2.label;"/>
<label id="addEngines" class="text-link">&addMoreSearchEngines2.label;</label>
</hbox>
</groupbox>

Expand Down
21 changes: 10 additions & 11 deletions browser/components/preferences/in-content/privacy.xul
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,7 @@
<vbox flex="1">
<description>
&trackingProtection.description;
<label id="trackingProtectionLearnMore" class="learnMore text-link"
value="&trackingProtectionLearnMore.label;"/>
<label id="trackingProtectionLearnMore" class="learnMore text-link">&trackingProtectionLearnMore.label;</label>
</description>
<description id="trackingProtectionDesc"
control="trackingProtectionRadioGroup">
Expand Down Expand Up @@ -397,8 +396,7 @@
accesskey="&trackingProtectionPBM5.accesskey;"
label="&trackingProtectionPBM5.label;" />
<label id="trackingProtectionPBMLearnMore"
class="learnMore text-link"
value="&trackingProtectionPBMLearnMore.label;"/>
class="learnMore text-link">&trackingProtectionPBMLearnMore.label;</label>
<spacer flex="1" />
<button id="changeBlockListPBM"
label="&changeBlockList.label;" accesskey="&changeBlockList.accesskey;"
Expand Down Expand Up @@ -441,8 +439,7 @@
<hbox flex="1">
<label id="notificationsPolicy">&notificationsPolicyDesc3.label;</label>
<label id="notificationsPolicyLearnMore"
class="learnMore text-link"
value="&notificationsPolicyLearnMore.label;"/>
class="learnMore text-link">&notificationsPolicyLearnMore.label;</label>
</hbox>
<hbox pack="end">
<button id="notificationsPolicyButton"
Expand All @@ -457,8 +454,7 @@
<checkbox id="notificationsDoNotDisturb" label="&notificationsDoNotDisturb.label;"
accesskey="&notificationsDoNotDisturb.accesskey;"/>
<label id="notificationsDoNotDisturbDetails"
class="indent"
value="&notificationsDoNotDisturbDetails.value;"/>
class="indent">&notificationsDoNotDisturbDetails.value;</label>
</vbox>
</groupbox>

Expand Down Expand Up @@ -570,7 +566,9 @@
<hbox align="center">
<checkbox id="playDRMContent" preference="media.eme.enabled"
label="&playDRMContent.label;" accesskey="&playDRMContent.accesskey;"/>
<label id="playDRMContentLink" class="learnMore text-link" value="&playDRMContent.learnMore.label;"/>
<label id="playDRMContentLink" class="learnMore text-link">
&playDRMContent.learnMore.label;
</label>
</hbox>
</row>
</rows>
Expand All @@ -587,8 +585,9 @@
accesskey="&browserContainersEnabled.accesskey;"
preference="privacy.userContext.enabled"
onsyncfrompreference="return gPrivacyPane.readBrowserContainersCheckbox();"/>
<label id="browserContainersLearnMore" class="learnMore text-link"
value="&browserContainersLearnMore.label;"/>
<label id="browserContainersLearnMore" class="learnMore text-link">
&browserContainersLearnMore.label;
</label>
<spacer flex="1"/>
<button id="browserContainersSettings"
class="accessory-button"
Expand Down
4 changes: 2 additions & 2 deletions browser/components/preferences/in-content/sync.xul
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
</groupbox>
</vbox>
<vbox>
<html:img class="fxaSyncIllustration" src="chrome://browser/skin/fxa/sync-illustration.svg#blueFill"/>
<html:img class="fxaSyncIllustration" src="chrome://browser/skin/fxa/sync-illustration.svg"/>
</vbox>
</hbox>
<label class="fxaMobilePromo">
Expand Down Expand Up @@ -178,7 +178,7 @@
</groupbox>
</vbox>
<vbox>
<html:img class="fxaSyncIllustration" src="chrome://browser/skin/fxa/sync-illustration.svg#blueFill"/>
<html:img class="fxaSyncIllustration" src="chrome://browser/skin/fxa/sync-illustration.svg"/>
</vbox>
</hbox>
<groupbox>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
add_task(function*() {
yield SpecialPowers.pushPrefEnv({set: [
["browser.preferences.defaultPerformanceSettings.enabled", true],
["dom.ipc.processCount", 4],
["layers.acceleration.disabled", false],
]});
});
SpecialPowers.pushPrefEnv({set: [
["browser.preferences.defaultPerformanceSettings.enabled", true],
["dom.ipc.processCount", 4],
["layers.acceleration.disabled", false],
]});

add_task(function*() {
let prefs = yield openPreferencesViaOpenPreferencesAPI("paneGeneral", {leaveOpen: true});
Expand Down
13 changes: 13 additions & 0 deletions browser/themes/osx/browser.css
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,19 @@ toolbarpaletteitem[place="palette"] > #personal-bookmarks > #bookmarks-toolbar-p
list-style-image: url("chrome://browser/skin/menu-forward.png") !important;
}

@media (-moz-mac-yosemite-theme) {
#forward-button > .toolbarbutton-icon {
border-top: none !important;
border-bottom: none !important;
box-shadow: 0 .5px 0 0 rgba(0,0,0,0.2) !important;
}
#forward-button:-moz-window-inactive > .toolbarbutton-icon {
box-shadow: 0 1px 0 0 rgba(0,0,0,0.2) inset,
0 -1px 0 0 rgba(0,0,0,0.2) inset !important;
}
}


/* ----- FULLSCREEN WINDOW CONTROLS ----- */

#minimize-button,
Expand Down
2 changes: 2 additions & 0 deletions browser/themes/shared/customizableui/panelUI.inc.css
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,8 @@ toolbarpaletteitem[place="palette"] > toolbaritem > toolbarbutton {
.fxaSyncIllustration {
width: 180px;
height: var(--panel-ui-sync-illustration-height);
-moz-context-properties: fill;
fill: #cdcdcd;
}

.PanelUI-remotetabs-prefs-button > .toolbarbutton-text {
Expand Down
Loading

0 comments on commit 9161724

Please sign in to comment.