[Webkit-unassigned] [Bug 28832] <img>.complete should return false for invalid images
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Aug 28 04:00:02 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=28832
--- Comment #21 from Kenneth Rohde Christiansen <kenneth at webkit.org> 2012-08-28 04:00:03 PST ---
(From update of attachment 159631)
View in context: https://bugs.webkit.org/attachment.cgi?id=159631&action=review
> Source/WebCore/ChangeLog:8
> + HTMLImageElement.complete should follow spec more closely
shouldn't it not just follow it? :-)
> Source/WebCore/ChangeLog:9
> + - Return true if no src or it is empty string
no src is present? or if it is equal to an empty string
Could be written better
> Source/WebCore/platform/graphics/BitmapImage.h:137
> + virtual bool decodeFailed() const { return m_source.decodeFailed(); }
why not decodingFailed? or decodeDidFail(). I am not sure what is most correct.
> Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp:239
> +bool ImageSource::decodeFailed() const
> +{
> + // TODO: implement this (with kCGImageStatus?)
> + return false;
> +}
file bug report then, add link
> LayoutTests/ChangeLog:6
> + Tests that deal with img.complete with broken images are
I dont understand this line
> LayoutTests/canvas/philip/tests/2d.drawImage.broken.html:25
> +deferTest();
> +
> +// wait a moment so imageloader has time to load the image
> +setTimeout(wrapFunction(function () {
> + var img = document.getElementById('broken.png');
> + _assertSame(img.complete, false, "img.complete", "false");
> + ctx.drawImage(img, 0, 0);
> +}), 100);
This often leads to flaky tests. How do you know 100 is enough? anyway to avoid depending on time?
--
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