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

Unified Diff: third_party/WebKit/Source/core/fetch/ImageResource.cpp

Issue 1482953002: Drop dependency on LayoutObject in fetch/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fix Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/fetch/ImageResource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.cpp b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
index 65d4b6c90d16c78407b8130034ceaa4d13fc93b7..748921a691a8272059fd6d0341a2a16e620f83e2 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
@@ -30,7 +30,6 @@
#include "core/fetch/ResourceClientWalker.h"
#include "core/fetch/ResourceFetcher.h"
#include "core/fetch/ResourceLoader.h"
-#include "core/layout/LayoutObject.h"
#include "core/svg/graphics/SVGImage.h"
#include "platform/Logging.h"
#include "platform/RuntimeEnabledFeatures.h"
@@ -446,19 +445,6 @@ void ImageResource::changedInRect(const blink::Image* image, const IntRect& rect
notifyObservers(&rect);
}
-bool ImageResource::currentFrameKnownToBeOpaque(const LayoutObject* layoutObject)
-{
- blink::Image* image = this->image();
- if (image->isBitmapImage()) {
- TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", "data", InspectorPaintImageEvent::data(layoutObject, *this));
- // BitmapImage::currentFrameKnownToBeOpaque() conservatively returns false for uncached
- // frames. To increase the change of an accurate answer, we pre-cache the current frame
- // metadata.
- image->imageForCurrentFrame();
- }
- return image->currentFrameKnownToBeOpaque();
-}
-
bool ImageResource::isAccessAllowed(SecurityOrigin* securityOrigin)
{
if (response().wasFetchedViaServiceWorker())

Powered by Google App Engine
This is Rietveld 408576698