| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 } | 116 } |
| 117 | 117 |
| 118 void ImageResource::didAddClient(ResourceClient* client) | 118 void ImageResource::didAddClient(ResourceClient* client) |
| 119 { | 119 { |
| 120 DCHECK((m_multipartParser && isLoading()) || !m_data || m_image); | 120 DCHECK((m_multipartParser && isLoading()) || !m_data || m_image); |
| 121 Resource::didAddClient(client); | 121 Resource::didAddClient(client); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void ImageResource::addObserver(ImageResourceObserver* observer) | 124 void ImageResource::addObserver(ImageResourceObserver* observer) |
| 125 { | 125 { |
| 126 willAddClientOrObserver(); | 126 willAddClientOrObserver(MarkAsReferenced); |
| 127 | 127 |
| 128 m_observers.add(observer); | 128 m_observers.add(observer); |
| 129 | 129 |
| 130 if (isCacheValidator()) | 130 if (isCacheValidator()) |
| 131 return; | 131 return; |
| 132 | 132 |
| 133 // When the response is not multipart, if |m_data| exists, |m_image| must | 133 // When the response is not multipart, if |m_data| exists, |m_image| must |
| 134 // be created. This is assured that |updateImage()| is called when | 134 // be created. This is assured that |updateImage()| is called when |
| 135 // |appendData()| is called. | 135 // |appendData()| is called. |
| 136 // | 136 // |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 if (response().wasFetchedViaServiceWorker()) | 594 if (response().wasFetchedViaServiceWorker()) |
| 595 return response().serviceWorkerResponseType() != WebServiceWorkerRespons
eTypeOpaque; | 595 return response().serviceWorkerResponseType() != WebServiceWorkerRespons
eTypeOpaque; |
| 596 if (!getImage()->currentFrameHasSingleSecurityOrigin()) | 596 if (!getImage()->currentFrameHasSingleSecurityOrigin()) |
| 597 return false; | 597 return false; |
| 598 if (passesAccessControlCheck(securityOrigin)) | 598 if (passesAccessControlCheck(securityOrigin)) |
| 599 return true; | 599 return true; |
| 600 return !securityOrigin->taintsCanvas(response().url()); | 600 return !securityOrigin->taintsCanvas(response().url()); |
| 601 } | 601 } |
| 602 | 602 |
| 603 } // namespace blink | 603 } // namespace blink |
| OLD | NEW |