mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
Bug 1110110 - 1 - Remove various inspector-related exception logs during dt test runs; r=bgrins
This commit is contained in:
parent
2159784385
commit
c993303a3d
@ -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.
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user