Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/WebKit/Source/core/fetch/ImageResource.cpp

Issue 1997833002: Don't keep a separate m_revalidatingRequest on Resource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
116 116
117 Resource::markClientsAndObserversFinished(); 117 Resource::markClientsAndObserversFinished();
118 } 118 }
119 119
120 void ImageResource::addObserver(ImageResourceObserver* observer) 120 void ImageResource::addObserver(ImageResourceObserver* observer)
121 { 121 {
122 willAddClientOrObserver(); 122 willAddClientOrObserver();
123 123
124 m_observers.add(observer); 124 m_observers.add(observer);
125 125
126 if (!m_revalidatingRequest.isNull()) 126 if (m_isRevalidating)
127 return; 127 return;
128 128
129 if (m_data && !m_image && !errorOccurred()) { 129 if (m_data && !m_image && !errorOccurred()) {
130 createImage(); 130 createImage();
131 m_image->setData(m_data, true); 131 m_image->setData(m_data, true);
132 } 132 }
133 133
134 if (m_image && !m_image->isNull()) { 134 if (m_image && !m_image->isNull()) {
135 observer->imageChanged(this); 135 observer->imageChanged(this);
136 } 136 }
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 if (response().wasFetchedViaServiceWorker()) 553 if (response().wasFetchedViaServiceWorker())
554 return response().serviceWorkerResponseType() != WebServiceWorkerRespons eTypeOpaque; 554 return response().serviceWorkerResponseType() != WebServiceWorkerRespons eTypeOpaque;
555 if (!getImage()->currentFrameHasSingleSecurityOrigin()) 555 if (!getImage()->currentFrameHasSingleSecurityOrigin())
556 return false; 556 return false;
557 if (passesAccessControlCheck(securityOrigin)) 557 if (passesAccessControlCheck(securityOrigin))
558 return true; 558 return true;
559 return !securityOrigin->taintsCanvas(response().url()); 559 return !securityOrigin->taintsCanvas(response().url());
560 } 560 }
561 561
562 } // namespace blink 562 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698