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

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

Issue 2178073005: Refactoring: Remove calling prune() in clear() in ImageResource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 } 331 }
332 332
333 ImageResourceObserverWalker walker(m_observers); 333 ImageResourceObserverWalker walker(m_observers);
334 while (auto* observer = walker.next()) { 334 while (auto* observer = walker.next()) {
335 observer->imageChanged(this, changeRect); 335 observer->imageChanged(this, changeRect);
336 } 336 }
337 } 337 }
338 338
339 void ImageResource::clear() 339 void ImageResource::clear()
340 { 340 {
341 prune();
342 clearImage(); 341 clearImage();
343 m_data.clear(); 342 m_data.clear();
344 setEncodedSize(0); 343 setEncodedSize(0);
345 } 344 }
346 345
347 inline void ImageResource::createImage() 346 inline void ImageResource::createImage()
348 { 347 {
349 // Create the image if it doesn't yet exist. 348 // Create the image if it doesn't yet exist.
350 if (m_image) 349 if (m_image)
351 return; 350 return;
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 if (response().wasFetchedViaServiceWorker()) 584 if (response().wasFetchedViaServiceWorker())
586 return response().serviceWorkerResponseType() != WebServiceWorkerRespons eTypeOpaque; 585 return response().serviceWorkerResponseType() != WebServiceWorkerRespons eTypeOpaque;
587 if (!getImage()->currentFrameHasSingleSecurityOrigin()) 586 if (!getImage()->currentFrameHasSingleSecurityOrigin())
588 return false; 587 return false;
589 if (passesAccessControlCheck(securityOrigin)) 588 if (passesAccessControlCheck(securityOrigin))
590 return true; 589 return true;
591 return !securityOrigin->taintsCanvas(response().url()); 590 return !securityOrigin->taintsCanvas(response().url());
592 } 591 }
593 592
594 } // namespace blink 593 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698