Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed removal of "MozAfterPaint" listener (related to issue 5885)

  • Loading branch information...
commit bbb655d397d7cd4e29eff8eeb906e3beb7a33b49 1 parent 94058bf
Sebastian Zartner authored September 03, 2012

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  extension/content/firebug/html/layout.js
6  extension/content/firebug/html/layout.js
@@ -167,6 +167,7 @@ LayoutPanel.prototype = Obj.extend(Firebug.Panel,
167 167
     {
168 168
         this.onMouseOver = Obj.bind(this.onMouseOver, this);
169 169
         this.onMouseOut = Obj.bind(this.onMouseOut, this);
  170
+        this.onAfterPaint = Obj.bind(this.refresh, this);
170 171
 
171 172
         Firebug.Panel.initialize.apply(this, arguments);
172 173
     },
@@ -189,12 +190,12 @@ LayoutPanel.prototype = Obj.extend(Firebug.Panel,
189 190
 
190 191
     show: function(state)
191 192
     {
192  
-        Events.addEventListener(this.context.browser, "MozAfterPaint", Obj.bindFixed(this.refresh, this), true);
  193
+        Events.addEventListener(this.context.browser, "MozAfterPaint", this.onAfterPaint, true);
193 194
     },
194 195
 
195 196
     hide: function()
196 197
     {
197  
-        Events.removeEventListener(this.context.browser, "MozAfterPaint", Obj.bindFixed(this.refresh, this), true);
  198
+        Events.removeEventListener(this.context.browser, "MozAfterPaint", this.onAfterPaint, true);
198 199
     },
199 200
     
200 201
     supportsObject: function(object, type)
@@ -204,6 +205,7 @@ LayoutPanel.prototype = Obj.extend(Firebug.Panel,
204 205
 
205 206
     refresh: function()
206 207
     {
  208
+        FBTrace.sysout("refresh layout");
207 209
         this.updateSelection(this.selection);
208 210
     },
209 211
 

0 notes on commit bbb655d

Simon Lindholm

Um...
Also, I suppose you should use Obj.bindFixed instead of Obj.bind. Wouldn't want to pass truthy arguments to refresh if it at some later point was changed to accept them. (And bindFixed is faster.)

Sebastian Zartner

Um...

The debug log was removed in 81b7721.

Also, I suppose you should use Obj.bindFixed instead of Obj.bind. Wouldn't want to pass truthy arguments to refresh if it at some later point was changed to accept them. (And bindFixed is faster.)

Changed in 87ac7f5.
Please add jsdoc comments to them, so it's clearer what they do and when they are used.

Sebastian

Please sign in to comment.
Something went wrong with that request. Please try again.