[Webkit-unassigned] [Bug 45586] Having an empty listener to beforeload events changes the behavior of other scripts

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 22 08:07:04 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=45586


Marc Hoyois <marc.hoyois at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID




--- Comment #2 from Marc Hoyois <marc.hoyois at gmail.com>  2010-09-22 08:07:04 PST ---
The issue has been resolved by imgZoom 0.2.1. What was going on is that the script was using an image's offsetWidth property in a handler to the image's 'load' event. Somehow the presence of any beforeload event listener delays the setting of offsetWidth to just after the handler is called (as can be seen using a setTimeout of 0 milliseconds), but it is not set within the handler (i.e. equals 0). Since the spec does not require .offsetWidth to be set when the 'load' event is fired (the image's .width property has this purpose and works correctly), this behavior seems legit, although the fact that it happens exclusively with beforeload listeners indicates that it might be the consequence of another bug.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list