Bug 1110110 - 1 - Remove various inspector-related exception logs during dt test runs; r=bgrins

This commit is contained in:
Patrick Brosset 2015-01-22 10:42:45 +01:00
parent 2159784385
commit c993303a3d
2 changed files with 17 additions and 4 deletions

View File

@ -124,6 +124,7 @@ function ElementStyle(aElement, aStore, aPageStyle, aShowUserAgentStyles) {
this.store = aStore || {};
this.pageStyle = aPageStyle;
this.showUserAgentStyles = aShowUserAgentStyles;
this.rules = [];
// We don't want to overwrite this.store.userProperties so we only create it
// if it doesn't already exist.

View File

@ -51,6 +51,9 @@ function RuleViewTool(inspector, window, iframe) {
RuleViewTool.prototype = {
isSidebarActive: function() {
if (!this.view) {
return false;
}
return this.inspector.sidebar.getCurrentTabID() == "ruleview";
},
@ -58,9 +61,12 @@ RuleViewTool.prototype = {
// Ignore the event if the view has been destroyed, or if it's inactive.
// But only if the current selection isn't null. If it's been set to null,
// let the update go through as this is needed to empty the view on navigation.
let isDestroyed = !this.view;
if (!this.view) {
return;
}
let isInactive = !this.isSidebarActive() && this.inspector.selection.nodeFront;
if (isDestroyed || isInactive) {
if (isInactive) {
return;
}
@ -178,6 +184,9 @@ function ComputedViewTool(inspector, window, iframe) {
ComputedViewTool.prototype = {
isSidebarActive: function() {
if (!this.view) {
return;
}
return this.inspector.sidebar.getCurrentTabID() == "computedview";
},
@ -185,9 +194,12 @@ ComputedViewTool.prototype = {
// Ignore the event if the view has been destroyed, or if it's inactive.
// But only if the current selection isn't null. If it's been set to null,
// let the update go through as this is needed to empty the view on navigation.
let isDestroyed = !this.view;
if (!this.view) {
return;
}
let isInactive = !this.isSidebarActive() && this.inspector.selection.nodeFront;
if (isDestroyed || isInactive) {
if (isInactive) {
return;
}