Skip to content

Commit

Permalink
Merge mozilla-central to inbound
Browse files Browse the repository at this point in the history
  • Loading branch information
aiakab committed Dec 17, 2018
2 parents a5d4c72 + b70dd7e commit 640c52a
Show file tree
Hide file tree
Showing 105 changed files with 3,063 additions and 2,583 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ dom/security/test/csp/**
dom/security/test/general/**
dom/security/test/mixedcontentblocker/**
dom/security/test/sri/**
dom/security/test/unit/**
dom/serviceworkers/**
dom/smil/**
dom/svg/**
Expand Down
2 changes: 1 addition & 1 deletion browser/app/blocklist.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<blocklist lastupdate="1544544484935" xmlns="http://www.mozilla.org/2006/addons-blocklist">
<blocklist lastupdate="1544811398633" xmlns="http://www.mozilla.org/2006/addons-blocklist">
<emItems>
<emItem blockID="i334" id="{0F827075-B026-42F3-885D-98981EE7B1AE}">
<prefs/>
Expand Down
13 changes: 8 additions & 5 deletions browser/base/content/tabbrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -5084,6 +5084,9 @@ class TabProgressListener {

if (topLevel) {
let isSameDocument = !!(aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT);
let isReload = !!(aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_RELOAD);
let isErrorPage = !!(aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_ERROR_PAGE);

// We need to clear the typed value
// if the document failed to load, to make sure the urlbar reflects the
// failed URI (particularly for SSL errors). However, don't clear the value
Expand All @@ -5094,8 +5097,7 @@ class TabProgressListener {
// Finally, we do insert the URL if this is a same-document navigation
// and the user cleared the URL manually.
if (this.mBrowser.didStartLoadSinceLastUserTyping() ||
((aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_ERROR_PAGE) &&
aLocation.spec != "about:blank") ||
(isErrorPage && aLocation.spec != "about:blank") ||
(isSameDocument && this.mBrowser.inLoadURI) ||
(isSameDocument && !this.mBrowser.userTypedValue)) {
this.mBrowser.userTypedValue = null;
Expand All @@ -5107,8 +5109,7 @@ class TabProgressListener {
// isn't any (STATE_IS_NETWORK & STATE_STOP) state to cause busy
// attribute being removed. In this case we should remove the
// attribute here.
if ((aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_ERROR_PAGE) &&
this.mTab.hasAttribute("busy")) {
if (isErrorPage && this.mTab.hasAttribute("busy")) {
this.mTab.removeAttribute("busy");
gBrowser._tabAttrModified(this.mTab, ["busy"]);
}
Expand All @@ -5135,7 +5136,9 @@ class TabProgressListener {
}
}

gBrowser.setTabTitle(this.mTab);
if (!isReload) {
gBrowser.setTabTitle(this.mTab);
}

// Don't clear the favicon if this tab is in the pending
// state, as SessionStore will have set the icon for us even
Expand Down
1 change: 1 addition & 0 deletions browser/base/content/test/tabs/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ skip-if = (verify && (os == 'win' || os == 'mac'))
[browser_preloadedBrowser_zoom.js]
[browser_reload_deleted_file.js]
skip-if = (debug && os == 'mac') || (debug && os == 'linux' && bits == 64) #Bug 1421183, disabled on Linux/OSX for leaked windows
[browser_tab_label_during_reload.js]
[browser_tabCloseProbes.js]
[browser_tabContextMenu_keyboard.js]
[browser_tabReorder_overflow.js]
Expand Down
30 changes: 30 additions & 0 deletions browser/base/content/test/tabs/browser_tab_label_during_reload.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */

"use strict";

add_task(async function() {
let tab = gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, "about:preferences");
let browser = tab.linkedBrowser;
let labelChanges = 0;
let attrModifiedListener = event => {
if (event.detail.changed.includes("label")) {
labelChanges++;
}
};
tab.addEventListener("TabAttrModified", attrModifiedListener);

await BrowserTestUtils.browserLoaded(browser);
is(labelChanges, 1, "number of label changes during initial load");
isnot(tab.label, "", "about:preferences tab label isn't empty");
isnot(tab.label, "about:preferences", "about:preferences tab label isn't the URI");
is(tab.label, browser.contentTitle, "about:preferences tab label matches browser.contentTitle");

labelChanges = 0;
browser.reload();
await BrowserTestUtils.browserLoaded(browser);
is(labelChanges, 0, "number of label changes during reload");

tab.removeEventListener("TabAttrModified", attrModifiedListener);
gBrowser.removeTab(tab);
});
2 changes: 1 addition & 1 deletion browser/components/urlbar/UrlbarInput.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ class UrlbarInput {
} else {
where = this.window.whereToOpenLink(event, false, false);
}
if (this.openInTab) {
if (UrlbarPrefs.get("openintab")) {
if (where == "current") {
where = "tab";
} else if (where == "tab") {
Expand Down
4 changes: 4 additions & 0 deletions browser/components/urlbar/UrlbarPrefs.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ const PREF_URLBAR_DEFAULTS = new Map([
// The maximum number of results in the urlbar popup.
["maxRichResults", 10],

// Whether addresses and search results typed into the address bar
// should be opened in new tabs by default.
["openintab", false],

// Results will include the user's bookmarks when this is true.
["suggest.bookmark", true],

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,14 @@ class FlexItemSizingOutline extends PureComponent {
flexItemSizing,
} = this.props.flexItem;
const {
mainAxisDirection,
mainBaseSize,
mainDeltaSize,
mainMaxSize,
mainMinSize,
clampState,
} = flexItemSizing;

const isRow = this.props.flexDirection.startsWith("row");

// Calculate the final size. This is base + delta, then clamped by min or max.
let mainFinalSize = mainBaseSize + mainDeltaSize;
mainFinalSize = Math.max(mainFinalSize, mainMinSize);
Expand Down Expand Up @@ -142,9 +141,8 @@ class FlexItemSizingOutline extends PureComponent {
dom.div({ className: "flex-outline-container" },
dom.div(
{
className: "flex-outline" +
(isRow ? " row" : " column") +
(mainDeltaSize > 0 ? " growing" : " shrinking"),
className: `flex-outline ${mainAxisDirection}` +
(mainDeltaSize > 0 ? " growing" : " shrinking"),
style: {
gridTemplateColumns,
},
Expand Down
1 change: 1 addition & 0 deletions devtools/client/inspector/flexbox/test/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ support-files =
[browser_flexbox_item_outline_hidden_when_useless.js]
[browser_flexbox_item_outline_renders_basisfinal_points_correctly.js]
[browser_flexbox_item_outline_rotates_for_column.js]
[browser_flexbox_item_outline_rotates_for_different_writing_modes.js]
[browser_flexbox_non_flex_item_is_not_shown.js]
[browser_flexbox_pseudo_elements_are_listed.js]
[browser_flexbox_sizing_flexibility_not_displayed_when_useless.js]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ add_task(async function() {
await selectNode(".container .item", inspector);
let [flexOutline] = await onFlexItemOutlineRendered;

ok(flexOutline.classList.contains("row"), "The flex outline has the row class");
ok(flexOutline.classList.contains("horizontal-lr"),
"The flex outline has the horizontal-lr class");

// Check that the outline is wider than it is tall in the configuration.
let bounds = flexOutline.getBoxQuads()[0].getBounds();
Expand All @@ -30,10 +31,10 @@ add_task(async function() {
".flex-outline-container .flex-outline");
await selectNode(".container.column .item", inspector);
await waitUntil(() => {
flexOutline = doc.querySelector(".flex-outline-container .flex-outline.column");
flexOutline = doc.querySelector(".flex-outline-container .flex-outline.vertical-tb");
return flexOutline;
});
ok(true, "The flex outline has the column class");
ok(true, "The flex outline has the vertical-tb class");

// Check that the outline is taller than it is wide in the configuration.
bounds = flexOutline.getBoxQuads()[0].getBounds();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */

"use strict";

// Test that the flex item outline is rotated to match its main axis direction.

const TEST_URI = URL_ROOT + "doc_flexbox_writing_modes.html";

add_task(async function() {
await addTab(TEST_URI);
const { inspector, flexboxInspector } = await openLayoutView();
const { document: doc } = flexboxInspector;

info("Check that a vertical row flex item rotates to vertical-tb.");
let onFlexItemOutlineRendered = waitForDOM(doc,
".flex-outline-container .flex-outline");
await selectNode(".row.vertical.item", inspector);
let [flexOutline] = await onFlexItemOutlineRendered;

ok(flexOutline.classList.contains("vertical-tb"),
"Horizontal item outline orientation has been rotated to vertical-tb.");

info("Check that a vertical-rl column flex item rotates to horizontal-rl.");
onFlexItemOutlineRendered = waitForDOM(doc,
".flex-outline-container .flex-outline");
await selectNode(".column.vertical.item", inspector);
await waitUntil(() => {
flexOutline =
doc.querySelector(".flex-outline-container .flex-outline.horizontal-rl");
return flexOutline;
});

ok(true, "Vertical-rl item outline orientation has been rotated to horizontal-rl.");
});
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}

.flex-container.vertical-writing-mode {
writing-mode: vertical-lr;
writing-mode: vertical-rl;
}

.column {
Expand Down
1 change: 1 addition & 0 deletions devtools/client/inspector/rules/test/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ skip-if = (verify && debug && os == 'win')
[browser_rules_edit-property_07.js]
[browser_rules_edit-property_08.js]
[browser_rules_edit-property_09.js]
[browser_rules_edit-property_10.js]
[browser_rules_edit-selector-click.js]
[browser_rules_edit-selector-click-on-scrollbar.js]
skip-if = os == "mac" # Bug 1245996 : click on scrollbar not working on OSX
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */

"use strict";

// Test that CSS property names are case insensitive when validating.

const TEST_URI = `
<style type='text/css'>
div {
color: red;
}
</style>
<div></div>
`;

add_task(async function() {
await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI));
const { inspector, view: ruleView } = await openRuleView();

await selectNode("div", inspector);
const rule = getRuleViewRuleEditor(ruleView, 1).rule;
const prop = rule.textProps[0];
let onRuleViewChanged;

info(`Rename the CSS property name to "Color"`);
onRuleViewChanged = ruleView.once("ruleview-changed");
await renameProperty(ruleView, prop, "Color");
info("Wait for Rule view to update");
await onRuleViewChanged;

is(prop.overridden, false, "Titlecase property is not overriden");
is(prop.enabled, true, "Titlecase property is enabled");
is(prop.isNameValid(), true, "Titlecase property is valid");

info(`Rename the CSS property name to "COLOR"`);
onRuleViewChanged = ruleView.once("ruleview-changed");
await renameProperty(ruleView, prop, "COLOR");
info("Wait for Rule view to update");
await onRuleViewChanged;

is(prop.overridden, false, "Uppercase property is not overriden");
is(prop.enabled, true, "Uppercase property is enabled");
is(prop.isNameValid(), true, "Uppercase property is valid");
});
Loading

0 comments on commit 640c52a

Please sign in to comment.