[Webkit-unassigned] [Bug 74451] Part of page incorrectly aligned when inserting an empty beforeLoad listener

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 14 00:01:51 PST 2011


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





--- Comment #1 from Wladimir Palant <trev at adblockplus.org>  2011-12-14 00:01:51 PST ---
Created an attachment (id=119168)
 --> (https://bugs.webkit.org/attachment.cgi?id=119168&action=review)
Minimized test case

I can confirm the bug, minimized test case (no longer requiring an extension) is attached. Took me a while to figure this out but what this site does apparently:

* It preloads thumbnail images.
* When the user clicks an image it fills the thumbnail row with new images using the same src as for preloaded images.
* It expects the offsetWidth for the thumbnail row to be correct immediately after inserting the images.

It's that last step that fails - if a beforeload event handler is present the width is reported as if the width of all images were zero. That's what the testcase demonstrate: if you create a copy of a preloaded image and insert it into a table then the reported offsetWidth of the image container is usually immediately correct, not if you have a beforeload event listener however.

The strange thing is: if you test img2.width you will get the correct value before offsetWidth of the container is accessed and zero afterwards. I guess that accessing offsetWidth triggers a reflow and something goes wrong there.

-- 
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