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

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

Issue 1774943003: blink: Rename platform/ methods to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-platform: rebase-yayyyyyyyy Created 4 years, 9 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 DEFINE_STATIC_REF(blink::Image, brokenImageLoRes, (blink::Image::loadPlatfor mResource("missingImage"))); 172 DEFINE_STATIC_REF(blink::Image, brokenImageLoRes, (blink::Image::loadPlatfor mResource("missingImage")));
173 return std::make_pair(brokenImageLoRes, 1); 173 return std::make_pair(brokenImageLoRes, 1);
174 } 174 }
175 175
176 bool ImageResource::willPaintBrokenImage() const 176 bool ImageResource::willPaintBrokenImage() const
177 { 177 {
178 return errorOccurred(); 178 return errorOccurred();
179 } 179 }
180 180
181 blink::Image* ImageResource::image() 181 blink::Image* ImageResource::getImage()
182 { 182 {
183 ASSERT(!isPurgeable()); 183 ASSERT(!isPurgeable());
184 184
185 if (errorOccurred()) { 185 if (errorOccurred()) {
186 // Returning the 1x broken image is non-ideal, but we cannot reliably ac cess the appropriate 186 // Returning the 1x broken image is non-ideal, but we cannot reliably ac cess the appropriate
187 // deviceScaleFactor from here. It is critical that callers use ImageRes ource::brokenImage() 187 // deviceScaleFactor from here. It is critical that callers use ImageRes ource::brokenImage()
188 // when they need the real, deviceScaleFactor-appropriate broken image i con. 188 // when they need the real, deviceScaleFactor-appropriate broken image i con.
189 return brokenImage(1).first; 189 return brokenImage(1).first;
190 } 190 }
191 191
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 { 445 {
446 if (!image || image != m_image) 446 if (!image || image != m_image)
447 return; 447 return;
448 notifyObservers(&rect); 448 notifyObservers(&rect);
449 } 449 }
450 450
451 bool ImageResource::isAccessAllowed(SecurityOrigin* securityOrigin) 451 bool ImageResource::isAccessAllowed(SecurityOrigin* securityOrigin)
452 { 452 {
453 if (response().wasFetchedViaServiceWorker()) 453 if (response().wasFetchedViaServiceWorker())
454 return response().serviceWorkerResponseType() != WebServiceWorkerRespons eTypeOpaque; 454 return response().serviceWorkerResponseType() != WebServiceWorkerRespons eTypeOpaque;
455 if (!image()->currentFrameHasSingleSecurityOrigin()) 455 if (!getImage()->currentFrameHasSingleSecurityOrigin())
456 return false; 456 return false;
457 if (passesAccessControlCheck(securityOrigin)) 457 if (passesAccessControlCheck(securityOrigin))
458 return true; 458 return true;
459 return !securityOrigin->taintsCanvas(response().url()); 459 return !securityOrigin->taintsCanvas(response().url());
460 } 460 }
461 461
462 bool ImageResource::loadingMultipartContent() const 462 bool ImageResource::loadingMultipartContent() const
463 { 463 {
464 return m_loader && m_loader->loadingMultipartContent(); 464 return m_loader && m_loader->loadingMultipartContent();
465 } 465 }
466 466
467 } // namespace blink 467 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ImageResource.h ('k') | third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698