summaryrefslogtreecommitdiffstats
path: root/application/basilisk/base/content/tabbrowser.xml
diff options
context:
space:
mode:
Diffstat (limited to 'application/basilisk/base/content/tabbrowser.xml')
-rw-r--r--application/basilisk/base/content/tabbrowser.xml63
1 files changed, 12 insertions, 51 deletions
diff --git a/application/basilisk/base/content/tabbrowser.xml b/application/basilisk/base/content/tabbrowser.xml
index f8dbcf364..043838020 100644
--- a/application/basilisk/base/content/tabbrowser.xml
+++ b/application/basilisk/base/content/tabbrowser.xml
@@ -1042,11 +1042,6 @@
</body>
</method>
- <!-- Holds a unique ID for the tab change that's currently being timed.
- Used to make sure that multiple, rapid tab switches do not try to
- create overlapping timers. -->
- <field name="_tabSwitchID">null</field>
-
<method name="updateCurrentBrowser">
<parameter name="aForceUpdate"/>
<body>
@@ -1055,33 +1050,6 @@
if (this.mCurrentBrowser == newBrowser && !aForceUpdate)
return;
- if (!aForceUpdate) {
- TelemetryStopwatch.start("FX_TAB_SWITCH_UPDATE_MS");
- if (!gMultiProcessBrowser) {
- // old way of measuring tab paint which is not valid with e10s.
- // Waiting until the next MozAfterPaint ensures that we capture
- // the time it takes to paint, upload the textures to the compositor,
- // and then composite.
- if (this._tabSwitchID) {
- TelemetryStopwatch.cancel("FX_TAB_SWITCH_TOTAL_MS");
- }
-
- let tabSwitchID = Symbol();
-
- TelemetryStopwatch.start("FX_TAB_SWITCH_TOTAL_MS");
- this._tabSwitchID = tabSwitchID;
-
- let onMozAfterPaint = () => {
- if (this._tabSwitchID === tabSwitchID) {
- TelemetryStopwatch.finish("FX_TAB_SWITCH_TOTAL_MS");
- this._tabSwitchID = null;
- }
- window.removeEventListener("MozAfterPaint", onMozAfterPaint);
- }
- window.addEventListener("MozAfterPaint", onMozAfterPaint);
- }
- }
-
var oldTab = this.mCurrentTab;
// Preview mode should not reset the owner
@@ -1274,9 +1242,6 @@
});
this.dispatchEvent(event);
}
-
- if (!aForceUpdate)
- TelemetryStopwatch.finish("FX_TAB_SWITCH_UPDATE_MS");
]]>
</body>
</method>
@@ -2136,6 +2101,7 @@
var aRelatedBrowser;
var aOriginPrincipal;
var aOpener;
+ var aSkipBackgroundNotify;
if (arguments.length == 2 &&
typeof arguments[1] == "object" &&
!(arguments[1] instanceof Ci.nsIURI)) {
@@ -2158,6 +2124,7 @@
aRelatedBrowser = params.relatedBrowser;
aOriginPrincipal = params.originPrincipal;
aOpener = params.opener;
+ aSkipBackgroundNotify = params.skipBackgroundNotify;
}
// if we're adding tabs, we're past interrupt mode, ditch the owner
@@ -2186,6 +2153,11 @@
t.setAttribute("crop", "end");
t.setAttribute("onerror", "this.removeAttribute('image');");
+
+ if (aSkipBackgroundNotify) {
+ t.setAttribute("skipbackgroundnotify", true);
+ }
+
t.className = "tabbrowser-tab";
this.tabContainer._unlockTabSizing();
@@ -4145,8 +4117,6 @@
*/
startTabSwitch: function () {
- TelemetryStopwatch.cancel("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
- TelemetryStopwatch.start("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
this.addMarker("AsyncTabSwitch:Start");
this.switchInProgress = true;
},
@@ -4162,31 +4132,18 @@
this.getTabState(this.requestedTab) == this.STATE_LOADED) {
// After this point the tab has switched from the content thread's point of view.
// The changes will be visible after the next refresh driver tick + composite.
- let time = TelemetryStopwatch.timeElapsed("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
- if (time != -1) {
- TelemetryStopwatch.finish("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
- this.log("DEBUG: tab switch time = " + time);
this.addMarker("AsyncTabSwitch:Finish");
- }
this.switchInProgress = false;
}
},
spinnerDisplayed: function () {
this.assert(!this.spinnerTab);
- TelemetryStopwatch.start("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", window);
- // We have a second, similar probe for capturing recordings of
- // when the spinner is displayed for very long periods.
- TelemetryStopwatch.start("FX_TAB_SWITCH_SPINNER_VISIBLE_LONG_MS", window);
this.addMarker("AsyncTabSwitch:SpinnerShown");
},
spinnerHidden: function () {
this.assert(this.spinnerTab);
- this.log("DEBUG: spinner time = " +
- TelemetryStopwatch.timeElapsed("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", window));
- TelemetryStopwatch.finish("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", window);
- TelemetryStopwatch.finish("FX_TAB_SWITCH_SPINNER_VISIBLE_LONG_MS", window);
this.addMarker("AsyncTabSwitch:SpinnerHidden");
// we do not get a onPaint after displaying the spinner
this.maybeFinishTabSwitch();
@@ -5982,7 +5939,11 @@
this._fillTrailingGap();
this._handleTabSelect();
} else {
- this._notifyBackgroundTab(tab);
+ if (tab.hasAttribute("skipbackgroundnotify")) {
+ tab.removeAttribute("skipbackgroundnotify");
+ } else {
+ this._notifyBackgroundTab(tab);
+ }
}
// XXXmano: this is a temporary workaround for bug 345399