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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 13 04:59:55 PDT 2012


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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jussi.kukkonen at intel.com




--- Comment #8 from Jussi Kukkonen <jussi.kukkonen at intel.com>  2012-08-13 05:00:24 PST ---
I tried fixing this (was probably being naive) to fix CanvasRenderingContext2D.createPattern(). Things quickly turned difficult,  without help I probably won't get this done.

For reference for anyone else, currently the spec says this:
complete must return true if any of the following conditions is true:
   * The src attribute is omitted.
   * The src attribute's value is the empty string.
   * The final task that is queued by the networking task source once the 
     resource has been fetched has been queued, but has not yet been run,
     and the img element is not in the broken state.
   * The img element is completely available. 

We fail first three cases currently. First two are easy fixes and fixes don't seem to break anything but the rest seems difficult... My first idea was to do this:
    Image* imageForRenderer = cachedImage()->imageForRenderer(renderer());
    return imageForRenderer && imageForRenderer->decodedSize();

This will fail at least for "visibility:hidden" images: I assume those aren't decoded until they're shown so decodedSize isn't what I want...

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