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