Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Yet one fix related to 5584

  • Loading branch information...
commit ff7c5ad07c33183755f7c61bec84038b2b668f73 1 parent 5d4d9b2
@janodvarko janodvarko authored
View
18 extension/content/firebug/css/cssModule.js
@@ -247,13 +247,11 @@ Firebug.CSSModule = Obj.extend(Obj.extend(Firebug.Module, Firebug.EditorSelector
cleanupSheetHandler: function(event, context)
{
- var target = event.target,
- tagName = (target.tagName || "").toLowerCase();
+ var target = event.target;
+ var tagName = (target.tagName || "").toLowerCase();
if (tagName == "link")
- {
this.cleanupSheets(target.ownerDocument, context);
- }
},
parseCSSValue: function(value, offset)
@@ -460,23 +458,19 @@ Firebug.CSSModule = Obj.extend(Obj.extend(Firebug.Module, Firebug.EditorSelector
watchWindow: function(context, win)
{
- var doc = win.document;
-
if (!context.cleanupSheetListener)
context.cleanupSheetListener = Obj.bind(this.cleanupSheetHandler, this, context);
- context.addEventListener(doc, "DOMAttrModified", context.cleanupSheetListener, false);
- context.addEventListener(doc, "DOMNodeInserted", context.cleanupSheetListener, false);
+ context.addEventListener(win, "DOMAttrModified", context.cleanupSheetListener, false);
+ context.addEventListener(win, "DOMNodeInserted", context.cleanupSheetListener, false);
},
unwatchWindow: function(context, win)
{
- var doc = win.document;
-
if (context.cleanupSheetListener)
{
- context.removeEventListener(doc, "DOMAttrModified", context.cleanupSheetListener, false);
- context.removeEventListener(doc, "DOMNodeInserted", context.cleanupSheetListener, false);
+ context.removeEventListener(win, "DOMAttrModified", context.cleanupSheetListener, false);
+ context.removeEventListener(win, "DOMNodeInserted", context.cleanupSheetListener, false);
}
},
View
13 extension/content/firebug/css/stylePanel.js
@@ -488,22 +488,19 @@ CSSStylePanel.prototype = Obj.extend(CSSStyleSheetPanel.prototype,
{
// Normally these would not be required, but in order to update after the state is set
// using the options menu we need to monitor these global events as well
- var doc = win.document;
- context.addEventListener(doc, "mouseover", this.onHoverChange, false);
- context.addEventListener(doc, "mousedown", this.onActiveChange, false);
+ context.addEventListener(win, "mouseover", this.onHoverChange, false);
+ context.addEventListener(win, "mousedown", this.onActiveChange, false);
}
},
unwatchWindow: function(context, win)
{
- var doc = win.document;
- context.removeEventListener(doc, "mouseover", this.onHoverChange, false);
- context.removeEventListener(doc, "mousedown", this.onActiveChange, false);
+ context.removeEventListener(win, "mouseover", this.onHoverChange, false);
+ context.removeEventListener(win, "mousedown", this.onActiveChange, false);
+ var doc = win.document;
if (Dom.isAncestor(this.stateChangeEl, doc))
- {
this.removeStateChangeHandlers();
- }
},
supportsObject: function(object, type)
Please sign in to comment.
Something went wrong with that request. Please try again.