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_data || m_image); | 120 DCHECK(!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 DCHECK(!m_data || m_image); | 133 DCHECK(!m_data || m_image); |
134 | 134 |
135 if (m_image && !m_image->isNull()) { | 135 if (m_image && !m_image->isNull()) { |
136 observer->imageChanged(this); | 136 observer->imageChanged(this); |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 if (response().wasFetchedViaServiceWorker()) | 585 if (response().wasFetchedViaServiceWorker()) |
586 return response().serviceWorkerResponseType() != WebServiceWorkerRespons
eTypeOpaque; | 586 return response().serviceWorkerResponseType() != WebServiceWorkerRespons
eTypeOpaque; |
587 if (!getImage()->currentFrameHasSingleSecurityOrigin()) | 587 if (!getImage()->currentFrameHasSingleSecurityOrigin()) |
588 return false; | 588 return false; |
589 if (passesAccessControlCheck(securityOrigin)) | 589 if (passesAccessControlCheck(securityOrigin)) |
590 return true; | 590 return true; |
591 return !securityOrigin->taintsCanvas(response().url()); | 591 return !securityOrigin->taintsCanvas(response().url()); |
592 } | 592 } |
593 | 593 |
594 } // namespace blink | 594 } // namespace blink |
OLD | NEW |