diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
index b5b727c6bf3..030dd91772d 100644
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1439,6 +1439,7 @@ pref("devtools.timeline.enabled", true);
#else
pref("devtools.timeline.enabled", false);
#endif
+pref("devtools.timeline.hiddenMarkers", "[]");
// Enable perftools via build command
#ifdef MOZ_DEVTOOLS_PERFTOOLS
diff --git a/browser/components/migration/FirefoxProfileMigrator.js b/browser/components/migration/FirefoxProfileMigrator.js
index 6e9966b21f5..daf0ff8601f 100644
--- a/browser/components/migration/FirefoxProfileMigrator.js
+++ b/browser/components/migration/FirefoxProfileMigrator.js
@@ -96,7 +96,8 @@ FirefoxProfileMigrator.prototype._getResourcesInternal = function(sourceProfileD
let places = getFileResource(types.HISTORY, ["places.sqlite"]);
let cookies = getFileResource(types.COOKIES, ["cookies.sqlite"]);
let passwords = getFileResource(types.PASSWORDS,
- ["signons.sqlite", "logins.json", "key3.db"]);
+ ["signons.sqlite", "logins.json", "key3.db",
+ "signedInUser.json"]);
let formData = getFileResource(types.FORMDATA, ["formhistory.sqlite"]);
let bookmarksBackups = getFileResource(types.OTHERDATA,
[PlacesBackups.profileRelativeFolderPath]);
diff --git a/browser/devtools/shared/widgets/Graphs.jsm b/browser/devtools/shared/widgets/Graphs.jsm
index ec80948677c..826ab553630 100644
--- a/browser/devtools/shared/widgets/Graphs.jsm
+++ b/browser/devtools/shared/widgets/Graphs.jsm
@@ -616,14 +616,19 @@ AbstractCanvasGraph.prototype = {
/**
* Updates this graph to reflect the new dimensions of the parent node.
+ *
+ * @param boolean options.force
+ * Force redrawing everything
*/
- refresh: function() {
+ refresh: function(options={}) {
let bounds = this._parent.getBoundingClientRect();
let newWidth = this.fixedWidth || bounds.width;
let newHeight = this.fixedHeight || bounds.height;
- // Prevent redrawing everything if the graph's width & height won't change.
- if (this._width == newWidth * this._pixelRatio &&
+ // Prevent redrawing everything if the graph's width & height won't change,
+ // except if force=true.
+ if (!options.force &&
+ this._width == newWidth * this._pixelRatio &&
this._height == newHeight * this._pixelRatio) {
this.emit("refresh-cancelled");
return;
diff --git a/browser/devtools/timeline/test/browser.ini b/browser/devtools/timeline/test/browser.ini
index 691cc330408..baf7dfd1058 100644
--- a/browser/devtools/timeline/test/browser.ini
+++ b/browser/devtools/timeline/test/browser.ini
@@ -6,6 +6,7 @@ support-files =
[browser_timeline_aaa_run_first_leaktest.js]
[browser_timeline_blueprint.js]
+[browser_timeline_filters.js]
[browser_timeline_overview-initial-selection-01.js]
[browser_timeline_overview-initial-selection-02.js]
[browser_timeline_overview-update.js]
diff --git a/browser/devtools/timeline/test/browser_timeline_filters.js b/browser/devtools/timeline/test/browser_timeline_filters.js
new file mode 100644
index 00000000000..933c7e9dd38
--- /dev/null
+++ b/browser/devtools/timeline/test/browser_timeline_filters.js
@@ -0,0 +1,93 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+/**
+ * Tests markers filtering mechanism.
+ */
+
+add_task(function*() {
+ let { target, panel } = yield initTimelinePanel(SIMPLE_URL);
+ let { $, $$, TimelineController, TimelineView } = panel.panelWin;
+
+ yield TimelineController.toggleRecording();
+ ok(true, "Recording has started.");
+
+ yield waitUntil(() => {
+ // Wait until we get 3 different markers.
+ let markers = TimelineController.getMarkers();
+ return markers.some(m => m.name == "Styles") &&
+ markers.some(m => m.name == "Reflow") &&
+ markers.some(m => m.name == "Paint");
+ });
+
+ yield TimelineController.toggleRecording();
+
+ let overview = TimelineView.markersOverview;
+ let waterfall = TimelineView.waterfall;
+
+ // Select everything
+ overview.setSelection({ start: 0, end: overview.width })
+
+ $("#filter-button").click();
+
+ yield waitUntil(() => !waterfall._outstandingMarkers.length);
+
+ let menuItem1 = $("menuitem[marker-type=Styles]");
+ let menuItem2 = $("menuitem[marker-type=Reflow]");
+ let menuItem3 = $("menuitem[marker-type=Paint]");
+
+ let originalHeight = overview.fixedHeight;
+
+ ok($(".waterfall-marker-bar[type=Styles]"), "Found at least one 'Styles' marker (1)");
+ ok($(".waterfall-marker-bar[type=Reflow]"), "Found at least one 'Reflow' marker (1)");
+ ok($(".waterfall-marker-bar[type=Paint]"), "Found at least one 'Paint' marker (1)");
+
+ let heightBefore = overview.fixedHeight;
+ EventUtils.synthesizeMouseAtCenter(menuItem1, {type: "mouseup"}, panel.panelWin);
+ yield once(menuItem1, "command");
+
+ yield waitUntil(() => !waterfall._outstandingMarkers.length);
+
+ // A row is 11px. See markers-overview.js
+ is(overview.fixedHeight, heightBefore - 11, "Overview is smaller");
+ ok(!$(".waterfall-marker-bar[type=Styles]"), "No 'Styles' marker (2)");
+ ok($(".waterfall-marker-bar[type=Reflow]"), "Found at least one 'Reflow' marker (2)");
+ ok($(".waterfall-marker-bar[type=Paint]"), "Found at least one 'Paint' marker (2)");
+
+ heightBefore = overview.fixedHeight;
+ EventUtils.synthesizeMouseAtCenter(menuItem2, {type: "mouseup"}, panel.panelWin);
+ yield once(menuItem2, "command");
+
+ yield waitUntil(() => !waterfall._outstandingMarkers.length);
+
+ is(overview.fixedHeight, heightBefore - 11, "Overview is smaller");
+ ok(!$(".waterfall-marker-bar[type=Styles]"), "No 'Styles' marker (3)");
+ ok(!$(".waterfall-marker-bar[type=Reflow]"), "No 'Reflow' marker (3)");
+ ok($(".waterfall-marker-bar[type=Paint]"), "Found at least one 'Paint' marker (3)");
+
+ heightBefore = overview.fixedHeight;
+ EventUtils.synthesizeMouseAtCenter(menuItem3, {type: "mouseup"}, panel.panelWin);
+ yield once(menuItem3, "command");
+
+ yield waitUntil(() => !waterfall._outstandingMarkers.length);
+
+ is(overview.fixedHeight, heightBefore - 11, "Overview is smaller");
+ ok(!$(".waterfall-marker-bar[type=Styles]"), "No 'Styles' marker (4)");
+ ok(!$(".waterfall-marker-bar[type=Reflow]"), "No 'Reflow' marker (4)");
+ ok(!$(".waterfall-marker-bar[type=Paint]"), "No 'Paint' marker (4)");
+
+ for (let item of [menuItem1, menuItem2, menuItem3]) {
+ EventUtils.synthesizeMouseAtCenter(item, {type: "mouseup"}, panel.panelWin);
+ yield once(item, "command");
+ }
+
+ yield waitUntil(() => !waterfall._outstandingMarkers.length);
+
+ ok($(".waterfall-marker-bar[type=Styles]"), "Found at least one 'Styles' marker (5)");
+ ok($(".waterfall-marker-bar[type=Reflow]"), "Found at least one 'Reflow' marker (5)");
+ ok($(".waterfall-marker-bar[type=Paint]"), "Found at least one 'Paint' marker (5)");
+
+ is(overview.fixedHeight, originalHeight, "Overview restored");
+
+ $(".waterfall-marker-bar[type=Styles]");
+});
diff --git a/browser/devtools/timeline/test/head.js b/browser/devtools/timeline/test/head.js
index 3ac9624e26b..74b185aa361 100644
--- a/browser/devtools/timeline/test/head.js
+++ b/browser/devtools/timeline/test/head.js
@@ -104,4 +104,45 @@ function waitUntil(predicate, interval = 10) {
waitUntil(predicate).then(() => deferred.resolve(true));
}, interval);
return deferred.promise;
+
+}
+
+/**
+ * Wait until next tick.
+ */
+function nextTick() {
+ let def = promise.defer();
+ executeSoon(() => def.resolve())
+ return def.promise;
+}
+
+/**
+ * Wait for eventName on target.
+ * @param {Object} target An observable object that either supports on/off or
+ * addEventListener/removeEventListener
+ * @param {String} eventName
+ * @param {Boolean} useCapture Optional, for addEventListener/removeEventListener
+ * @return A promise that resolves when the event has been handled
+ */
+function once(target, eventName, useCapture=false) {
+ info("Waiting for event: '" + eventName + "' on " + target + ".");
+
+ let deferred = promise.defer();
+
+ for (let [add, remove] of [
+ ["addEventListener", "removeEventListener"],
+ ["addListener", "removeListener"],
+ ["on", "off"]
+ ]) {
+ if ((add in target) && (remove in target)) {
+ target[add](eventName, function onEvent(...aArgs) {
+ info("Got event: '" + eventName + "' on " + target + ".");
+ target[remove](eventName, onEvent, useCapture);
+ deferred.resolve.apply(deferred, aArgs);
+ }, useCapture);
+ break;
+ }
+ }
+
+ return deferred.promise;
}
diff --git a/browser/devtools/timeline/timeline.js b/browser/devtools/timeline/timeline.js
index ea94dac0c44..68fc4e7fb95 100644
--- a/browser/devtools/timeline/timeline.js
+++ b/browser/devtools/timeline/timeline.js
@@ -7,6 +7,7 @@ const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
Cu.import("resource://gre/modules/Task.jsm");
Cu.import("resource://gre/modules/devtools/Loader.jsm");
+Cu.import("resource:///modules/devtools/ViewHelpers.jsm");
devtools.lazyRequireGetter(this, "promise");
devtools.lazyRequireGetter(this, "EventEmitter",
@@ -20,6 +21,8 @@ devtools.lazyRequireGetter(this, "Waterfall",
"devtools/timeline/waterfall", true);
devtools.lazyRequireGetter(this, "MarkerDetails",
"devtools/timeline/marker-details", true);
+devtools.lazyRequireGetter(this, "TIMELINE_BLUEPRINT",
+ "devtools/timeline/global", true);
devtools.lazyImporter(this, "CanvasGraphUtils",
"resource:///modules/devtools/Graphs.jsm");
@@ -30,6 +33,14 @@ devtools.lazyImporter(this, "PluralForm",
const OVERVIEW_UPDATE_INTERVAL = 200;
const OVERVIEW_INITIAL_SELECTION_RATIO = 0.15;
+/**
+ * Preference for devtools.timeline.hiddenMarkers.
+ * Stores which markers should be hidden.
+ */
+const Prefs = new ViewHelpers.Prefs("devtools.timeline", {
+ hiddenMarkers: ["Json", "hiddenMarkers"]
+});
+
// The panel's window global is an EventEmitter firing the following events:
const EVENTS = {
// When a recording is started or stopped, via the `stopwatch` button.
@@ -277,8 +288,9 @@ let TimelineView = {
* Initialization function, called when the tool is started.
*/
initialize: Task.async(function*() {
- this.markersOverview = new MarkersOverview($("#markers-overview"));
- this.waterfall = new Waterfall($("#timeline-waterfall"), $("#timeline-pane"));
+ let blueprint = this._getFilteredBluePrint();
+ this.markersOverview = new MarkersOverview($("#markers-overview"), blueprint);
+ this.waterfall = new Waterfall($("#timeline-waterfall"), $("#timeline-pane"), blueprint);
this.markerDetails = new MarkerDetails($("#timeline-waterfall-details"), $("#timeline-waterfall-container > splitter"));
this._onSelecting = this._onSelecting.bind(this);
@@ -292,7 +304,10 @@ let TimelineView = {
this.waterfall.on("unselected", this._onMarkerSelected);
yield this.markersOverview.ready();
+
yield this.waterfall.recalculateBounds();
+
+ this._buildFilterPopup();
}),
/**
@@ -465,7 +480,101 @@ let TimelineView = {
_onRefresh: function() {
this.waterfall.recalculateBounds();
this.updateWaterfall();
- }
+ },
+
+ /**
+ * Rebuild a blueprint without hidden markers.
+ */
+ _getFilteredBluePrint: function() {
+ let hiddenMarkers = Prefs.hiddenMarkers;
+ let filteredBlueprint = Cu.cloneInto(TIMELINE_BLUEPRINT, {});
+ let maybeRemovedGroups = new Set();
+ let removedGroups = new Set();
+
+ // 1. Remove hidden markers from the blueprint.
+
+ for (let hiddenMarkerName of hiddenMarkers) {
+ maybeRemovedGroups.add(filteredBlueprint[hiddenMarkerName].group);
+ delete filteredBlueprint[hiddenMarkerName];
+ }
+
+ // 2. Get a list of all the groups that will be removed.
+
+ for (let removedGroup of maybeRemovedGroups) {
+ let markerNames = Object.keys(filteredBlueprint);
+ let allGroupsRemoved = markerNames.every(e => filteredBlueprint[e].group != removedGroup);
+ if (allGroupsRemoved) {
+ removedGroups.add(removedGroup);
+ }
+ }
+
+ // 3. Offset groups.
+
+ for (let removedGroup of removedGroups) {
+ for (let [, markerDetails] of Iterator(filteredBlueprint)) {
+ if (markerDetails.group > removedGroup) {
+ markerDetails.group--;
+ }
+ }
+ }
+
+ return filteredBlueprint;
+
+ },
+
+ /**
+ * When the list of hidden markers changes, update waterfall
+ * and overview.
+ */
+ _onHiddenMarkersChanged: function(e) {
+ let menuItems = $$("#timelineFilterPopup menuitem[marker-type]:not([checked])");
+ let hiddenMarkers = Array.map(menuItems, e => e.getAttribute("marker-type"));
+
+ Prefs.hiddenMarkers = hiddenMarkers;
+ let blueprint = this._getFilteredBluePrint();
+
+ this.waterfall.setBlueprint(blueprint);
+ this.updateWaterfall();
+
+ this.markersOverview.setBlueprint(blueprint);
+ this.markersOverview.refresh({ force: true });
+ },
+
+ /**
+ * Creates the filter popup.
+ */
+ _buildFilterPopup: function() {
+ let popup = $("#timelineFilterPopup");
+ let button = $("#filter-button");
+
+ popup.addEventListener("popupshowing", () => button.setAttribute("open", "true"));
+ popup.addEventListener("popuphiding", () => button.removeAttribute("open"));
+
+ this._onHiddenMarkersChanged = this._onHiddenMarkersChanged.bind(this);
+
+ for (let [markerName, markerDetails] of Iterator(TIMELINE_BLUEPRINT)) {
+ let menuitem = document.createElement("menuitem");
+ menuitem.setAttribute("closemenu", "none");
+ menuitem.setAttribute("type", "checkbox");
+ menuitem.setAttribute("marker-type", markerName);
+ menuitem.setAttribute("label", markerDetails.label);
+ menuitem.setAttribute("flex", "1");
+ menuitem.setAttribute("align", "center");
+
+ menuitem.addEventListener("command", this._onHiddenMarkersChanged);
+
+ if (Prefs.hiddenMarkers.indexOf(markerName) == -1) {
+ menuitem.setAttribute("checked", "true");
+ }
+
+ // Style used by pseudo element ::before in timeline.css.in
+ let bulletStyle = `--bullet-bg: ${markerDetails.fill};`
+ bulletStyle += `--bullet-border: ${markerDetails.stroke}`;
+ menuitem.setAttribute("style", bulletStyle);
+
+ popup.appendChild(menuitem);
+ }
+ },
};
/**
diff --git a/browser/devtools/timeline/timeline.xul b/browser/devtools/timeline/timeline.xul
index 56df912b0a3..2d4b8e1939e 100644
--- a/browser/devtools/timeline/timeline.xul
+++ b/browser/devtools/timeline/timeline.xul
@@ -17,6 +17,10 @@
+
+
@@ -27,6 +31,10 @@
class="devtools-toolbarbutton"
oncommand="TimelineController.toggleRecording()"
tooltiptext="&timelineUI.recordButton.tooltip;"/>
+
{
- // Set the list of names, properties and colors used to paint this overview.
- this.setBlueprint(TIMELINE_BLUEPRINT);
+ // Set the list of names, properties and colors used to paint this overview.
+ this.setBlueprint(blueprint);
+
+ this.once("ready", () => {
// Populate this overview with some dummy initial data.
this.setData({ interval: { startTime: 0, endTime: 1000 }, markers: [] });
});
@@ -68,14 +69,14 @@ MarkersOverview.prototype = Heritage.extend(AbstractCanvasGraph.prototype, {
selectionBackgroundColor: OVERVIEW_SELECTION_BACKGROUND_COLOR,
selectionStripesColor: OVERVIEW_SELECTION_STRIPES_COLOR,
headerHeight: OVERVIEW_HEADER_HEIGHT,
- bodyHeight: OVERVIEW_BODY_HEIGHT,
+ rowHeight: OVERVIEW_ROW_HEIGHT,
groupPadding: OVERVIEW_GROUP_VERTICAL_PADDING,
/**
* Compute the height of the overview.
*/
get fixedHeight() {
- return this.headerHeight + this.bodyHeight;
+ return this.headerHeight + this.rowHeight * (this._lastGroup + 1);
},
/**
@@ -119,14 +120,17 @@ MarkersOverview.prototype = Heritage.extend(AbstractCanvasGraph.prototype, {
// draw all markers sharing the same style at once.
for (let marker of markers) {
- this._paintBatches.get(marker.name).batch.push(marker);
+ let markerType = this._paintBatches.get(marker.name);
+ if (markerType) {
+ markerType.batch.push(marker);
+ }
}
// Calculate each group's height, and the time-based scaling.
let totalGroups = this._lastGroup + 1;
let headerHeight = this.headerHeight * this._pixelRatio;
- let groupHeight = this.bodyHeight * this._pixelRatio / totalGroups;
+ let groupHeight = this.rowHeight * this._pixelRatio;
let groupPadding = this.groupPadding * this._pixelRatio;
let totalTime = (endTime - startTime) || 0;
diff --git a/browser/devtools/timeline/widgets/waterfall.js b/browser/devtools/timeline/widgets/waterfall.js
index 90e3e38b33c..afdf080f841 100644
--- a/browser/devtools/timeline/widgets/waterfall.js
+++ b/browser/devtools/timeline/widgets/waterfall.js
@@ -12,8 +12,6 @@ const {Ci, Cu} = require("chrome");
loader.lazyRequireGetter(this, "L10N",
"devtools/timeline/global", true);
-loader.lazyRequireGetter(this, "TIMELINE_BLUEPRINT",
- "devtools/timeline/global", true);
loader.lazyImporter(this, "setNamedTimeout",
"resource:///modules/devtools/ViewHelpers.jsm");
@@ -50,8 +48,10 @@ const WATERFALL_ROWCOUNT_ONPAGEUPDOWN = 10;
* The parent node holding the waterfall.
* @param nsIDOMNode container
* The container node that key events should be bound to.
+ * @param Object blueprint
+ * List of names and colors defining markers.
*/
-function Waterfall(parent, container) {
+function Waterfall(parent, container, blueprint) {
EventEmitter.decorate(this);
this._parent = parent;
@@ -75,7 +75,7 @@ function Waterfall(parent, container) {
// Lazy require is a bit slow, and these are hot objects.
this._l10n = L10N;
- this._blueprint = TIMELINE_BLUEPRINT;
+ this._blueprint = blueprint
this._setNamedTimeout = setNamedTimeout;
this._clearNamedTimeout = clearNamedTimeout;
@@ -120,6 +120,14 @@ Waterfall.prototype = {
this.selectRow(this._selectedRowIdx);
},
+ /**
+ * List of names and colors used to paint markers.
+ * @see TIMELINE_BLUEPRINT in timeline/widgets/global.js
+ */
+ setBlueprint: function(blueprint) {
+ this._blueprint = blueprint;
+ },
+
/**
* Keybindings.
*/
@@ -251,6 +259,10 @@ Waterfall.prototype = {
if (!isMarkerInRange(marker, startTime, endTime)) {
continue;
}
+ if (!(marker.name in this._blueprint)) {
+ continue;
+ }
+
// Only build and display a finite number of markers initially, to
// preserve a snappy UI. After a certain delay, continue building the
// outstanding markers while there's (hopefully) no user interaction.
diff --git a/browser/locales/en-US/chrome/browser/devtools/timeline.dtd b/browser/locales/en-US/chrome/browser/devtools/timeline.dtd
index ddecd87e376..ebb90e18cc8 100644
--- a/browser/locales/en-US/chrome/browser/devtools/timeline.dtd
+++ b/browser/locales/en-US/chrome/browser/devtools/timeline.dtd
@@ -19,15 +19,19 @@
- as a label to signal that a recording is in progress. -->
-
-
+
+
+
diff --git a/browser/themes/linux/jar.mn b/browser/themes/linux/jar.mn
index 2266e463783..13dd7b3d4ce 100644
--- a/browser/themes/linux/jar.mn
+++ b/browser/themes/linux/jar.mn
@@ -274,6 +274,7 @@ browser.jar:
* skin/classic/browser/devtools/profiler.css (devtools/profiler.css)
* skin/classic/browser/devtools/performance.css (devtools/performance.css)
* skin/classic/browser/devtools/timeline.css (devtools/timeline.css)
+ skin/classic/browser/devtools/timeline-filter.svg (../shared/devtools/images/timeline-filter.svg)
* skin/classic/browser/devtools/scratchpad.css (devtools/scratchpad.css)
* skin/classic/browser/devtools/shadereditor.css (devtools/shadereditor.css)
* skin/classic/browser/devtools/splitview.css (../shared/devtools/splitview.css)
diff --git a/browser/themes/osx/jar.mn b/browser/themes/osx/jar.mn
index 5c6a538014a..7ea5f9beeaf 100644
--- a/browser/themes/osx/jar.mn
+++ b/browser/themes/osx/jar.mn
@@ -405,6 +405,7 @@ browser.jar:
* skin/classic/browser/devtools/profiler.css (devtools/profiler.css)
* skin/classic/browser/devtools/performance.css (devtools/performance.css)
* skin/classic/browser/devtools/timeline.css (devtools/timeline.css)
+ skin/classic/browser/devtools/timeline-filter.svg (../shared/devtools/images/timeline-filter.svg)
* skin/classic/browser/devtools/scratchpad.css (devtools/scratchpad.css)
* skin/classic/browser/devtools/shadereditor.css (devtools/shadereditor.css)
* skin/classic/browser/devtools/splitview.css (../shared/devtools/splitview.css)
diff --git a/browser/themes/shared/aboutNetError_info.svg b/browser/themes/shared/aboutNetError_info.svg
index 5b586334345..20010c16671 100644
--- a/browser/themes/shared/aboutNetError_info.svg
+++ b/browser/themes/shared/aboutNetError_info.svg
@@ -1,7 +1,5 @@
-
diff --git a/browser/themes/shared/devtools/images/timeline-filter.svg b/browser/themes/shared/devtools/images/timeline-filter.svg
new file mode 100644
index 00000000000..60ebf9a3c12
--- /dev/null
+++ b/browser/themes/shared/devtools/images/timeline-filter.svg
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/browser/themes/shared/devtools/timeline.inc.css b/browser/themes/shared/devtools/timeline.inc.css
index 09532cd022e..99c2e668b81 100644
--- a/browser/themes/shared/devtools/timeline.inc.css
+++ b/browser/themes/shared/devtools/timeline.inc.css
@@ -5,6 +5,7 @@
#record-button {
list-style-image: url(profiler-stopwatch.svg);
+ min-width: 24px;
}
#record-button[checked] {
@@ -15,6 +16,35 @@
visibility: hidden;
}
+#memory-checkbox .checkbox-label {
+ line-height: 100%;
+}
+
+#filter-button {
+ list-style-image: url(timeline-filter.svg#filter);
+ min-width: 24px;
+}
+
+#filter-button[disabled] {
+ list-style-image: url(timeline-filter.svg#filter-disabled);
+}
+
+#filter-button[open] {
+ list-style-image: url(timeline-filter.svg#filter-open);
+}
+
+#timelineFilterPopup > menuitem:before {
+ content: "";
+ display: block;
+ width: 8px;
+ height: 8px;
+ margin: 0 8px;
+ border: 1px solid;
+ border-radius: 1px;
+ background-color: var(--bullet-bg);
+ border-color: var(--bullet-border);
+}
+
.notice-container {
font-size: 120%;
padding-bottom: 35vh;
@@ -194,7 +224,6 @@
.marker-details-bullet {
width: 8px;
height: 8px;
- margin: 0 8px;
border: 1px solid;
border-radius: 1px;
}
diff --git a/browser/themes/shared/devtools/toolbars.inc.css b/browser/themes/shared/devtools/toolbars.inc.css
index 4f9cfa01b3f..48826038a4c 100644
--- a/browser/themes/shared/devtools/toolbars.inc.css
+++ b/browser/themes/shared/devtools/toolbars.inc.css
@@ -161,25 +161,25 @@
}
/* Button States */
-.theme-dark .devtools-toolbarbutton:hover,
-.theme-dark #toolbox-buttons .devtools-toolbarbutton[text-as-image]:hover,
-.theme-dark .devtools-toolbarbutton[label]:not([text-as-image]):not([type=menu-button]):hover {
+.theme-dark .devtools-toolbarbutton:not([disabled]):hover,
+.theme-dark #toolbox-buttons .devtools-toolbarbutton:not([disabled])[text-as-image]:hover,
+.theme-dark .devtools-toolbarbutton:not([disabled])[label]:not([text-as-image]):not([type=menu-button]):hover {
background: rgba(0, 0, 0, .3); /* Splitters */
}
-.theme-light .devtools-toolbarbutton:hover,
-.theme-light #toolbox-buttons .devtools-toolbarbutton[text-as-image]:hover,
-.theme-light .devtools-toolbarbutton[label]:not([text-as-image]):not([type=menu-button]):hover {
+.theme-light .devtools-toolbarbutton:not([disabled]):hover,
+.theme-light #toolbox-buttons .devtools-toolbarbutton:not([disabled])[text-as-image]:hover,
+.theme-light .devtools-toolbarbutton:not([disabled])[label]:not([text-as-image]):not([type=menu-button]):hover {
background: rgba(170, 170, 170, .3); /* Splitters */
}
-.theme-dark .devtools-toolbarbutton:hover:active,
-.theme-dark #toolbox-buttons .devtools-toolbarbutton[text-as-image]:hover:active,
-.theme-dark .devtools-toolbarbutton[label]:not([text-as-image]):not([type=menu-button]):hover:active {
+.theme-dark .devtools-toolbarbutton:not([disabled]):hover:active,
+.theme-dark #toolbox-buttons .devtools-toolbarbutton:not([disabled])[text-as-image]:hover:active,
+.theme-dark .devtools-toolbarbutton:not([disabled])[label]:not([text-as-image]):not([type=menu-button]):hover:active {
background: rgba(0, 0, 0, .4); /* Splitters */
}
-.theme-light .devtools-toolbarbutton:hover:active,
-.theme-light #toolbox-buttons .devtools-toolbarbutton[text-as-image]:hover:active,
-.theme-light .devtools-toolbarbutton[label]:not([text-as-image]):not([type=menu-button]):hover:active {
+.theme-light .devtools-toolbarbutton:not([disabled]):hover:active,
+.theme-light #toolbox-buttons .devtools-toolbarbutton:not([disabled])[text-as-image]:hover:active,
+.theme-light .devtools-toolbarbutton:not([disabled])[label]:not([text-as-image]):not([type=menu-button]):hover:active {
background: rgba(170, 170, 170, .4); /* Splitters */
}
diff --git a/browser/themes/windows/jar.mn b/browser/themes/windows/jar.mn
index 074b8e8c484..18fd03eb3c7 100644
--- a/browser/themes/windows/jar.mn
+++ b/browser/themes/windows/jar.mn
@@ -312,6 +312,7 @@ browser.jar:
* skin/classic/browser/devtools/profiler.css (devtools/profiler.css)
* skin/classic/browser/devtools/performance.css (devtools/performance.css)
* skin/classic/browser/devtools/timeline.css (devtools/timeline.css)
+ skin/classic/browser/devtools/timeline-filter.svg (../shared/devtools/images/timeline-filter.svg)
* skin/classic/browser/devtools/scratchpad.css (devtools/scratchpad.css)
* skin/classic/browser/devtools/shadereditor.css (devtools/shadereditor.css)
skin/classic/browser/devtools/storage.css (../shared/devtools/storage.css)
@@ -771,6 +772,7 @@ browser.jar:
* skin/classic/aero/browser/devtools/profiler.css (devtools/profiler.css)
* skin/classic/aero/browser/devtools/performance.css (devtools/performance.css)
* skin/classic/aero/browser/devtools/timeline.css (devtools/timeline.css)
+ skin/classic/aero/browser/devtools/timeline-filter.svg (../shared/devtools/images/timeline-filter.svg)
* skin/classic/aero/browser/devtools/scratchpad.css (devtools/scratchpad.css)
* skin/classic/aero/browser/devtools/shadereditor.css (devtools/shadereditor.css)
* skin/classic/aero/browser/devtools/splitview.css (../shared/devtools/splitview.css)
diff --git a/dom/base/EventSource.cpp b/dom/base/EventSource.cpp
index 3a4dc5c06aa..a910ed21f18 100644
--- a/dom/base/EventSource.cpp
+++ b/dom/base/EventSource.cpp
@@ -31,7 +31,7 @@
#include "nsContentUtils.h"
#include "mozilla/Preferences.h"
#include "xpcpublic.h"
-#include "nsCrossSiteListenerProxy.h"
+#include "nsCORSListenerProxy.h"
#include "nsWrapperCacheInlines.h"
#include "mozilla/Attributes.h"
#include "nsError.h"
diff --git a/dom/base/ImportManager.cpp b/dom/base/ImportManager.cpp
index 7c0db43fe50..f8e48008ff2 100644
--- a/dom/base/ImportManager.cpp
+++ b/dom/base/ImportManager.cpp
@@ -10,7 +10,7 @@
#include "HTMLLinkElement.h"
#include "nsContentPolicyUtils.h"
#include "nsContentUtils.h"
-#include "nsCrossSiteListenerProxy.h"
+#include "nsCORSListenerProxy.h"
#include "nsIChannel.h"
#include "nsIContentPolicy.h"
#include "nsIContentSecurityPolicy.h"
diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp
index bafb53ba05f..8ece24377d6 100644
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -20,7 +20,7 @@
#include "nsIContentPolicy.h"
#include "nsIContentSecurityPolicy.h"
#include "nsContentPolicyUtils.h"
-#include "nsCrossSiteListenerProxy.h"
+#include "nsCORSListenerProxy.h"
#include "nsISupportsPriority.h"
#include "nsICachingChannel.h"
#include "nsIWebContentHandlerRegistrar.h"
diff --git a/dom/base/moz.build b/dom/base/moz.build
index 5a8c803d452..4b2485611cb 100644
--- a/dom/base/moz.build
+++ b/dom/base/moz.build
@@ -61,7 +61,6 @@ EXPORTS += [
'nsContentTypeParser.h',
'nsContentUtils.h',
'nsCopySupport.h',
- 'nsCrossSiteListenerProxy.h',
'nsDeprecatedOperationList.h',
'nsDocElementCreatedNotificationRunner.h',
'nsDocumentWarningList.h',
@@ -245,7 +244,6 @@ UNIFIED_SOURCES += [
'nsContentPolicy.cpp',
'nsContentSink.cpp',
'nsCopySupport.cpp',
- 'nsCrossSiteListenerProxy.cpp',
'nsDataDocumentContentPolicy.cpp',
'nsDocument.cpp',
'nsDocumentEncoder.cpp',
diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp
index fdd5a37ba25..fa422ff8708 100644
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -2334,86 +2334,104 @@ DOMGCSliceCallback(JSRuntime *aRt, JS::GCProgress aProgress, const JS::GCDescrip
{
NS_ASSERTION(NS_IsMainThread(), "GCs must run on the main thread");
- if (aProgress == JS::GC_CYCLE_END) {
- PRTime delta = GetCollectionTimeDelta();
+ switch (aProgress) {
+ case JS::GC_CYCLE_BEGIN: {
+ // Prevent cycle collections and shrinking during incremental GC.
+ sCCLockedOut = true;
- if (sPostGCEventsToConsole) {
- NS_NAMED_LITERAL_STRING(kFmt, "GC(T+%.1f) ");
- nsString prefix, gcstats;
- gcstats.Adopt(aDesc.formatMessage(aRt));
- prefix.Adopt(nsTextFormatter::smprintf(kFmt.get(),
+ nsJSContext::KillShrinkGCBuffersTimer();
+
+ break;
+ }
+
+ case JS::GC_CYCLE_END: {
+ PRTime delta = GetCollectionTimeDelta();
+
+ if (sPostGCEventsToConsole) {
+ NS_NAMED_LITERAL_STRING(kFmt, "GC(T+%.1f) ");
+ nsString prefix, gcstats;
+ gcstats.Adopt(aDesc.formatMessage(aRt));
+ prefix.Adopt(nsTextFormatter::smprintf(kFmt.get(),
double(delta) / PR_USEC_PER_SEC));
- nsString msg = prefix + gcstats;
- nsCOMPtr cs = do_GetService(NS_CONSOLESERVICE_CONTRACTID);
- if (cs) {
- cs->LogStringMessage(msg.get());
+ nsString msg = prefix + gcstats;
+ nsCOMPtr cs = do_GetService(NS_CONSOLESERVICE_CONTRACTID);
+ if (cs) {
+ cs->LogStringMessage(msg.get());
+ }
}
- }
- if (sPostGCEventsToObserver) {
- nsString json;
- json.Adopt(aDesc.formatJSON(aRt, PR_Now()));
- nsRefPtr notify = new NotifyGCEndRunnable(json);
- NS_DispatchToMainThread(notify);
- }
- }
-
- // Prevent cycle collections and shrinking during incremental GC.
- if (aProgress == JS::GC_CYCLE_BEGIN) {
- sCCLockedOut = true;
- nsJSContext::KillShrinkGCBuffersTimer();
- } else if (aProgress == JS::GC_CYCLE_END) {
- sCCLockedOut = false;
- }
-
- // The GC has more work to do, so schedule another GC slice.
- if (aProgress == JS::GC_SLICE_END) {
- nsJSContext::KillInterSliceGCTimer();
- if (!sShuttingDown) {
- CallCreateInstance("@mozilla.org/timer;1", &sInterSliceGCTimer);
- sInterSliceGCTimer->InitWithFuncCallback(InterSliceGCTimerFired,
- nullptr,
- NS_INTERSLICE_GC_DELAY,
- nsITimer::TYPE_ONE_SHOT);
- }
- }
-
- if (aProgress == JS::GC_CYCLE_END) {
- // May need to kill the inter-slice GC timer
- nsJSContext::KillInterSliceGCTimer();
-
- sCCollectedWaitingForGC = 0;
- sCCollectedZonesWaitingForGC = 0;
- sLikelyShortLivingObjectsNeedingGC = 0;
- sCleanupsSinceLastGC = 0;
- sNeedsFullCC = true;
- sHasRunGC = true;
- nsJSContext::MaybePokeCC();
-
- if (aDesc.isCompartment_) {
- if (!sFullGCTimer && !sShuttingDown) {
- CallCreateInstance("@mozilla.org/timer;1", &sFullGCTimer);
- sFullGCTimer->InitWithFuncCallback(FullGCTimerFired,
- nullptr,
- NS_FULL_GC_DELAY,
- nsITimer::TYPE_ONE_SHOT);
+ if (sPostGCEventsToObserver) {
+ nsString json;
+ json.Adopt(aDesc.formatJSON(aRt, PR_Now()));
+ nsRefPtr notify = new NotifyGCEndRunnable(json);
+ NS_DispatchToMainThread(notify);
}
- } else {
- nsJSContext::KillFullGCTimer();
- // Avoid shrinking during heavy activity, which is suggested by
- // compartment GC.
- nsJSContext::PokeShrinkGCBuffers();
+ sCCLockedOut = false;
+
+ // May need to kill the inter-slice GC timer
+ nsJSContext::KillInterSliceGCTimer();
+
+ sCCollectedWaitingForGC = 0;
+ sCCollectedZonesWaitingForGC = 0;
+ sLikelyShortLivingObjectsNeedingGC = 0;
+ sCleanupsSinceLastGC = 0;
+ sNeedsFullCC = true;
+ sHasRunGC = true;
+ nsJSContext::MaybePokeCC();
+
+ if (aDesc.isCompartment_) {
+ if (!sFullGCTimer && !sShuttingDown) {
+ CallCreateInstance("@mozilla.org/timer;1", &sFullGCTimer);
+ sFullGCTimer->InitWithFuncCallback(FullGCTimerFired,
+ nullptr,
+ NS_FULL_GC_DELAY,
+ nsITimer::TYPE_ONE_SHOT);
+ }
+ } else {
+ nsJSContext::KillFullGCTimer();
+
+ // Avoid shrinking during heavy activity, which is suggested by
+ // compartment GC.
+ nsJSContext::PokeShrinkGCBuffers();
+ }
+
+ if (ShouldTriggerCC(nsCycleCollector_suspectedCount())) {
+ nsCycleCollector_dispatchDeferredDeletion();
+ }
+
+ break;
}
+
+ case JS::GC_SLICE_BEGIN:
+ break;
+
+ case JS::GC_SLICE_END:
+
+ // The GC has more work to do, so schedule another GC slice.
+ nsJSContext::KillInterSliceGCTimer();
+ if (!sShuttingDown) {
+ CallCreateInstance("@mozilla.org/timer;1", &sInterSliceGCTimer);
+ sInterSliceGCTimer->InitWithFuncCallback(InterSliceGCTimerFired,
+ nullptr,
+ NS_INTERSLICE_GC_DELAY,
+ nsITimer::TYPE_ONE_SHOT);
+ }
+
+ if (ShouldTriggerCC(nsCycleCollector_suspectedCount())) {
+ nsCycleCollector_dispatchDeferredDeletion();
+ }
+
+ break;
+
+ default:
+ MOZ_CRASH("Unexpected GCProgress value");
}
- if ((aProgress == JS::GC_SLICE_END || aProgress == JS::GC_CYCLE_END) &&
- ShouldTriggerCC(nsCycleCollector_suspectedCount())) {
- nsCycleCollector_dispatchDeferredDeletion();
- }
-
- if (sPrevGCSliceCallback)
+ if (sPrevGCSliceCallback) {
(*sPrevGCSliceCallback)(aRt, aProgress, aDesc);
+ }
+
}
void
diff --git a/dom/base/nsScriptLoader.cpp b/dom/base/nsScriptLoader.cpp
index f1f66db2f04..93c9d4c2fa2 100644
--- a/dom/base/nsScriptLoader.cpp
+++ b/dom/base/nsScriptLoader.cpp
@@ -43,7 +43,7 @@
#include "prlog.h"
#include "nsCRT.h"
#include "nsContentCreatorFunctions.h"
-#include "nsCrossSiteListenerProxy.h"
+#include "nsCORSListenerProxy.h"
#include "nsSandboxFlags.h"
#include "nsContentTypeParser.h"
#include "nsINetworkPredictor.h"
diff --git a/dom/base/nsSyncLoadService.cpp b/dom/base/nsSyncLoadService.cpp
index 42094f9de37..f1749a3a6d6 100644
--- a/dom/base/nsSyncLoadService.cpp
+++ b/dom/base/nsSyncLoadService.cpp
@@ -23,7 +23,7 @@
#include "nsNetUtil.h"
#include "nsAutoPtr.h"
#include "nsStreamUtils.h"
-#include "nsCrossSiteListenerProxy.h"
+#include "nsCORSListenerProxy.h"
#include
using mozilla::net::ReferrerPolicy;
diff --git a/dom/base/nsXMLHttpRequest.cpp b/dom/base/nsXMLHttpRequest.cpp
index 92f20ed8ebb..d9883419ff7 100644
--- a/dom/base/nsXMLHttpRequest.cpp
+++ b/dom/base/nsXMLHttpRequest.cpp
@@ -46,7 +46,7 @@
#include "nsIContentPolicy.h"
#include "nsContentPolicyUtils.h"
#include "nsError.h"
-#include "nsCrossSiteListenerProxy.h"
+#include "nsCORSListenerProxy.h"
#include "nsIHTMLDocument.h"
#include "nsIStorageStream.h"
#include "nsIPromptFactory.h"
diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp
index cdf4c46e2cc..13499e293e7 100644
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -52,7 +52,7 @@
#include "nsIContentPolicy.h"
#include "nsContentPolicyUtils.h"
-#include "nsCrossSiteListenerProxy.h"
+#include "nsCORSListenerProxy.h"
#include "nsCycleCollectionParticipant.h"
#include "nsICachingChannel.h"
#include "nsLayoutUtils.h"
diff --git a/dom/media/MediaResource.cpp b/dom/media/MediaResource.cpp
index f8aba90b2ed..8028420b388 100644
--- a/dom/media/MediaResource.cpp
+++ b/dom/media/MediaResource.cpp
@@ -22,7 +22,7 @@
#include "nsIRequestObserver.h"
#include "nsIStreamListener.h"
#include "nsIScriptSecurityManager.h"
-#include "nsCrossSiteListenerProxy.h"
+#include "nsCORSListenerProxy.h"
#include "mozilla/dom/HTMLMediaElement.h"
#include "nsError.h"
#include "nsICachingChannel.h"
diff --git a/dom/security/moz.build b/dom/security/moz.build
index b471e3033ea..92e3c28af4e 100644
--- a/dom/security/moz.build
+++ b/dom/security/moz.build
@@ -11,7 +11,12 @@ EXPORTS.mozilla.dom += [
'nsMixedContentBlocker.h',
]
+EXPORTS += [
+ 'nsCORSListenerProxy.h'
+]
+
UNIFIED_SOURCES += [
+ 'nsCORSListenerProxy.cpp',
'nsCSPContext.cpp',
'nsCSPParser.cpp',
'nsCSPService.cpp',
diff --git a/dom/base/nsCrossSiteListenerProxy.cpp b/dom/security/nsCORSListenerProxy.cpp
similarity index 99%
rename from dom/base/nsCrossSiteListenerProxy.cpp
rename to dom/security/nsCORSListenerProxy.cpp
index 5a983199c00..9738183a5f7 100644
--- a/dom/base/nsCrossSiteListenerProxy.cpp
+++ b/dom/security/nsCORSListenerProxy.cpp
@@ -6,7 +6,7 @@
#include "mozilla/Assertions.h"
#include "mozilla/LinkedList.h"
-#include "nsCrossSiteListenerProxy.h"
+#include "nsCORSListenerProxy.h"
#include "nsIChannel.h"
#include "nsIHttpChannel.h"
#include "nsError.h"
diff --git a/dom/base/nsCrossSiteListenerProxy.h b/dom/security/nsCORSListenerProxy.h
similarity index 100%
rename from dom/base/nsCrossSiteListenerProxy.h
rename to dom/security/nsCORSListenerProxy.h
diff --git a/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp b/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
index a929282accf..822f6f71101 100644
--- a/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
+++ b/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
@@ -34,7 +34,7 @@
#include "nsAttrName.h"
#include "nsIScriptError.h"
#include "nsIURL.h"
-#include "nsCrossSiteListenerProxy.h"
+#include "nsCORSListenerProxy.h"
#include "nsError.h"
#include "mozilla/Attributes.h"
#include "mozilla/dom/Element.h"
diff --git a/image/src/imgLoader.cpp b/image/src/imgLoader.cpp
index 901d6bc7e12..666c0c19b5b 100644
--- a/image/src/imgLoader.cpp
+++ b/image/src/imgLoader.cpp
@@ -16,7 +16,7 @@
#include "nsCOMPtr.h"
#include "nsContentUtils.h"
-#include "nsCrossSiteListenerProxy.h"
+#include "nsCORSListenerProxy.h"
#include "nsNetUtil.h"
#include "nsMimeTypes.h"
#include "nsStreamUtils.h"
diff --git a/layout/base/nsDisplayList.h b/layout/base/nsDisplayList.h
index 040383a8ac8..c57304e00f2 100644
--- a/layout/base/nsDisplayList.h
+++ b/layout/base/nsDisplayList.h
@@ -1959,14 +1959,6 @@ public:
}
NS_DISPLAY_DECL_NAME(mName, mType)
- virtual nsRect GetComponentAlphaBounds(nsDisplayListBuilder* aBuilder) MOZ_OVERRIDE {
- if (mType == nsDisplayItem::TYPE_HEADER_FOOTER) {
- bool snap;
- return GetBounds(aBuilder, &snap);
- }
- return nsRect();
- }
-
protected:
PaintCallback mPaint;
const char* mName;
diff --git a/layout/build/nsLayoutStatics.cpp b/layout/build/nsLayoutStatics.cpp
index 67c421559d3..3103644b237 100644
--- a/layout/build/nsLayoutStatics.cpp
+++ b/layout/build/nsLayoutStatics.cpp
@@ -46,7 +46,7 @@
#include "nsCCUncollectableMarker.h"
#include "nsTextFragment.h"
#include "nsCSSRuleProcessor.h"
-#include "nsCrossSiteListenerProxy.h"
+#include "nsCORSListenerProxy.h"
#include "nsHTMLDNSPrefetch.h"
#include "nsHtml5Module.h"
#include "mozilla/dom/FallbackEncoding.h"
diff --git a/layout/generic/nsPageFrame.cpp b/layout/generic/nsPageFrame.cpp
index 525a5172a09..132f10ec378 100644
--- a/layout/generic/nsPageFrame.cpp
+++ b/layout/generic/nsPageFrame.cpp
@@ -470,18 +470,45 @@ GetNextPage(nsIFrame* aPageContentFrame)
return f;
}
-static void PaintHeaderFooter(nsIFrame* aFrame, nsRenderingContext* aCtx,
- const nsRect& aDirtyRect, nsPoint aPt)
-{
- static_cast(aFrame)->PaintHeaderFooter(*aCtx, aPt);
-}
-
static gfx::Matrix4x4 ComputePageTransform(nsIFrame* aFrame, float aAppUnitsPerPixel)
{
float scale = aFrame->PresContext()->GetPageScale();
return gfx::Matrix4x4::Scaling(scale, scale, 1);
}
+class nsDisplayHeaderFooter : public nsDisplayItem {
+public:
+ nsDisplayHeaderFooter(nsDisplayListBuilder* aBuilder, nsPageFrame *aFrame)
+ : nsDisplayItem(aBuilder, aFrame), mFrame(aFrame)
+ , mDisableSubpixelAA(false)
+ {
+ MOZ_COUNT_CTOR(nsDisplayHeaderFooter);
+ }
+#ifdef NS_BUILD_REFCNT_LOGGING
+ virtual ~nsDisplayHeaderFooter() {
+ MOZ_COUNT_DTOR(nsDisplayHeaderFooter);
+ }
+#endif
+
+ virtual void Paint(nsDisplayListBuilder* aBuilder,
+ nsRenderingContext* aCtx) MOZ_OVERRIDE {
+ mFrame->PaintHeaderFooter(*aCtx, ToReferenceFrame(), mDisableSubpixelAA);
+ }
+ NS_DISPLAY_DECL_NAME("HeaderFooter", nsDisplayItem::TYPE_HEADER_FOOTER)
+
+ virtual nsRect GetComponentAlphaBounds(nsDisplayListBuilder* aBuilder) MOZ_OVERRIDE {
+ bool snap;
+ return GetBounds(aBuilder, &snap);
+ }
+
+ virtual void DisableComponentAlpha() MOZ_OVERRIDE {
+ mDisableSubpixelAA = true;
+ }
+protected:
+ nsPageFrame* mFrame;
+ bool mDisableSubpixelAA;
+};
+
//------------------------------------------------------------------------------
void
nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
@@ -563,9 +590,7 @@ nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (PresContext()->IsRootPaginatedDocument()) {
set.Content()->AppendNewToTop(new (aBuilder)
- nsDisplayGeneric(aBuilder, this, ::PaintHeaderFooter,
- "HeaderFooter",
- nsDisplayItem::TYPE_HEADER_FOOTER));
+ nsDisplayHeaderFooter(aBuilder, this));
}
set.MoveTo(aLists);
@@ -582,7 +607,7 @@ nsPageFrame::SetPageNumInfo(int32_t aPageNumber, int32_t aTotalPages)
void
nsPageFrame::PaintHeaderFooter(nsRenderingContext& aRenderingContext,
- nsPoint aPt)
+ nsPoint aPt, bool aDisableSubpixelAA)
{
nsPresContext* pc = PresContext();
@@ -596,6 +621,8 @@ nsPageFrame::PaintHeaderFooter(nsRenderingContext& aRenderingContext,
nsRect rect(aPt, mRect.Size());
aRenderingContext.ThebesContext()->SetColor(NS_RGB(0,0,0));
+ gfxContextAutoDisableSubpixelAntialiasing disable(aRenderingContext.ThebesContext(), aDisableSubpixelAA);
+
// Get the FontMetrics to determine width.height of strings
nsRefPtr fontMet;
pc->DeviceContext()->GetMetricsFor(mPD->mHeadFootFont, nullptr, false,
diff --git a/layout/generic/nsPageFrame.h b/layout/generic/nsPageFrame.h
index 73b058d5fb8..9d578ec65d7 100644
--- a/layout/generic/nsPageFrame.h
+++ b/layout/generic/nsPageFrame.h
@@ -55,7 +55,7 @@ public:
virtual bool HonorPrintBackgroundSettings() MOZ_OVERRIDE { return false; }
void PaintHeaderFooter(nsRenderingContext& aRenderingContext,
- nsPoint aPt);
+ nsPoint aPt, bool aSubpixelAA);
protected:
explicit nsPageFrame(nsStyleContext* aContext);
diff --git a/layout/style/FontFaceSet.cpp b/layout/style/FontFaceSet.cpp
index 385b9c7e9f3..d344f9888cb 100644
--- a/layout/style/FontFaceSet.cpp
+++ b/layout/style/FontFaceSet.cpp
@@ -15,7 +15,7 @@
#include "mozilla/dom/Promise.h"
#include "mozilla/AsyncEventDispatcher.h"
#include "mozilla/Preferences.h"
-#include "nsCrossSiteListenerProxy.h"
+#include "nsCORSListenerProxy.h"
#include "nsFontFaceLoader.h"
#include "nsIConsoleService.h"
#include "nsIContentPolicy.h"
diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp
index acf6db2675b..357f9d5ca5b 100644
--- a/layout/style/Loader.cpp
+++ b/layout/style/Loader.cpp
@@ -47,7 +47,7 @@
#include "nsThreadUtils.h"
#include "nsGkAtoms.h"
#include "nsIThreadInternal.h"
-#include "nsCrossSiteListenerProxy.h"
+#include "nsCORSListenerProxy.h"
#include "nsINetworkPredictor.h"
#include "mozilla/dom/ShadowRoot.h"
#include "mozilla/dom/URL.h"
diff --git a/netwerk/test/mochitests/test_user_agent_overrides.html b/netwerk/test/mochitests/test_user_agent_overrides.html
index 0541b64b89e..5944022c530 100644
--- a/netwerk/test/mochitests/test_user_agent_overrides.html
+++ b/netwerk/test/mochitests/test_user_agent_overrides.html
@@ -239,6 +239,9 @@ SpecialPowers.Cu.import('resource://gre/modules/UserAgentOverrides.jsm', window)
SpecialPowers.wrap(UserAgentOverrides).init();
SimpleTest.waitForExplicitFinish();
+SimpleTest.requestCompleteLog();
+
+info(SpecialPowers.Cc["@mozilla.org/dom/site-specific-user-agent;1"].number);
testOverrides(function ()
testInactive(function ()