[Webkit-unassigned] [Bug 28832] <img>.complete should return false for invalid images

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 20 02:48:26 PDT 2012


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


Jussi Kukkonen <jussi.kukkonen at intel.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #159380|review?                     |
               Flag|                            |




--- Comment #10 from Jussi Kukkonen <jussi.kukkonen at intel.com>  2012-08-20 02:49:01 PST ---
(From update of attachment 159380)
Removing r?, this is not complete. Patch is still a work in progress, but if I could get a confirmation from someone more experienced (that this is a good direction to go and has a chance of being accepted) that would be awesome...

The patch does this:
 - Return true if no src or it is empty string
 - Return false if image is not loaded yet or is not decodable
 - Otherwise return true (image is loaded and decoded _or_
   image is loaded but no decode has been attempted)

The gotcha is that the completeness state now changes more over the lifetime of the image. So the worst case scenario would be an image that is first assigned a source url with a borken image and is then set visible.
1. image has no src -> complete=true
2. script sets src, but is not fetched yet -> complete=false
3. image is loaded (but is still not visible) -> complete=true
4. script sets image visible, decoding fails ->
 complete = false

Some things I already know to be missing:
* missing support for some graphics ports
* tests need to be updated

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