[webkit-reviews] review granted: [Bug 69732] <img crossorigin> should fail to load when CORS check fails : [Attachment 112130] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 23 20:31:21 PDT 2011


Darin Adler <darin at apple.com> has granted Adam Barth <abarth at webkit.org>'s
request for review:
Bug 69732: <img crossorigin> should fail to load when CORS check fails
https://bugs.webkit.org/show_bug.cgi?id=69732

Attachment 112130: Patch
https://bugs.webkit.org/attachment.cgi?id=112130&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=112130&action=review


It seems a little strange to do the entire load and then report it as if it was
a failure once the load is done. It seems the load should instead fail as soon
as we get the HTTP header before reading any more data, loosely speaking.

> Source/WebCore/loader/ImageLoader.cpp:243
> +    if (m_element->fastHasAttribute(HTMLNames::crossoriginAttr) &&
!resource->passesAccessControlCheck(m_element->document()->securityOrigin())) {


We normally do "using namespace HTMLNames" at the top of the file, and leave
off the prefix.


More information about the webkit-reviews mailing list