[Webkit-unassigned] [Bug 48781] Add a resourceload delegate method to query if WebCore should paint the default broken image for failed images.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 24 13:00:14 PST 2011


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





--- Comment #27 from Yongjun Zhang <yongjun_zhang at apple.com>  2011-02-24 13:00:13 PST ---
(In reply to comment #26)
> (From update of attachment 78883 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=78883&action=review
> 
> r=me, but consider the comments.
> 
> > WebKit/mac/WebView/WebResourceLoadDelegatePrivate.h:59
> > + @param imageURL The url of the offending image.
> 
> Maybe use "broken" instead of "offending" here.
> 
Done.

> > LayoutTests/fast/images/support-broken-image-delegate.html:26
> > +<img id="broken" onError="loaded()" onLoad="loaded()" src="resources/broken-image-with-invalid-format.png">
> 
> Instead of calling loaded() in the onload="" attribute, can you call a different function that always sets result.innerHTML to "FAIL" since this code path is unexpected?  (Or is there a reason for setting onload and onerror to the same function?)
>

I wanted to reset shouldPaintBorkenImage flag and call layoutTestController.notifyDone() when the test fails, to avoid time out.  Agree it is better to move that to another function, please see the next patch. 

> > LayoutTests/fast/images/resources/broken-image-with-invalid-format.png:1
> > +fsadljf903q2asdfic-=29q24;lasdf
> 
> Is the MIME type for this file correct?  Strange that it shows up as text in the diff.  May need to fix this up in svn after the commit.

Yes, I manually added text in this file to make sure it is a broken png file :-)

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