OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 6 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
7 | 7 |
8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 | 307 |
308 void ImageResource::clear() | 308 void ImageResource::clear() |
309 { | 309 { |
310 prune(); | 310 prune(); |
311 clearImage(); | 311 clearImage(); |
312 setEncodedSize(0); | 312 setEncodedSize(0); |
313 } | 313 } |
314 | 314 |
315 void ImageResource::setCustomAcceptHeader() | 315 void ImageResource::setCustomAcceptHeader() |
316 { | 316 { |
317 DEFINE_STATIC_LOCAL(const AtomicString, acceptImages, ("image/webp,image/*,*
/*;q=0.8", AtomicString::ConstructFromLiteral)); | 317 DEFINE_STATIC_LOCAL(const AtomicString, acceptImages, ("image/webp,image/*,*
/*;q=0.8")); |
318 setAccept(acceptImages); | 318 setAccept(acceptImages); |
319 } | 319 } |
320 | 320 |
321 inline void ImageResource::createImage() | 321 inline void ImageResource::createImage() |
322 { | 322 { |
323 // Create the image if it doesn't yet exist. | 323 // Create the image if it doesn't yet exist. |
324 if (m_image) | 324 if (m_image) |
325 return; | 325 return; |
326 | 326 |
327 if (m_response.mimeType() == "image/svg+xml") { | 327 if (m_response.mimeType() == "image/svg+xml") { |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 if (response().wasFetchedViaServiceWorker()) | 543 if (response().wasFetchedViaServiceWorker()) |
544 return response().serviceWorkerResponseType() != WebServiceWorkerRespons
eTypeOpaque; | 544 return response().serviceWorkerResponseType() != WebServiceWorkerRespons
eTypeOpaque; |
545 if (!getImage()->currentFrameHasSingleSecurityOrigin()) | 545 if (!getImage()->currentFrameHasSingleSecurityOrigin()) |
546 return false; | 546 return false; |
547 if (passesAccessControlCheck(securityOrigin)) | 547 if (passesAccessControlCheck(securityOrigin)) |
548 return true; | 548 return true; |
549 return !securityOrigin->taintsCanvas(response().url()); | 549 return !securityOrigin->taintsCanvas(response().url()); |
550 } | 550 } |
551 | 551 |
552 } // namespace blink | 552 } // namespace blink |
OLD | NEW |