Bug 1415307 - Stop sampling background colour in DOMContentLoaded. r?rbarker
Bug 1297850 removed the only consumer of the background colour on the Java side,
so this can go as well.
MozReview-Commit-ID: DJwrUVUHZ1t
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -4075,28 +4075,16 @@ Tab.prototype = {
switch (aEvent.type) {
case "DOMContentLoaded": {
let target = aEvent.originalTarget;
// ignore on frames and other documents
if (target != this.browser.contentDocument)
return;
- // Sample the background color of the page and pass it along. (This is used to draw the
- // checkerboard.) Right now we don't detect changes in the background color after this
- // event fires; it's not clear that doing so is worth the effort.
- var backgroundColor = null;
- try {
- let { contentDocument, contentWindow } = this.browser;
- let computedStyle = contentWindow.getComputedStyle(contentDocument.body);
- backgroundColor = computedStyle.backgroundColor;
- } catch (e) {
- // Ignore. Catching and ignoring exceptions here ensures that Talos succeeds.
- }
-
let docURI = target.documentURI;
let errorType = "";
if (docURI.startsWith("about:certerror")) {
errorType = "certerror";
}
else if (docURI.startsWith("about:blocked")) {
errorType = "blocked";
}
@@ -4130,17 +4118,16 @@ Tab.prototype = {
// pages have any privilege themselves.
if (docURI.startsWith("about:neterror")) {
NetErrorHelper.attachToBrowser(this.browser);
}
GlobalEventDispatcher.sendRequest({
type: "Content:DOMContentLoaded",
tabID: this.id,
- bgColor: backgroundColor,
errorType: errorType,
metadata: this.metatags,
});
this.metatags = null;
if (docURI.startsWith("about:certerror") || docURI.startsWith("about:blocked")) {
this.browser.addEventListener("click", ErrorPageEventHandler, true);