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

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

Issue 1468023002: Rename imageSizeForLayoutObject() to imageSize() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bring back ps#3 and fix nit 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/ImageResource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/ImageResource.h
diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.h b/third_party/WebKit/Source/core/fetch/ImageResource.h
index 786f07b261fcd96960ec52f84e7991ae088a1d3f..1db014535bce07bd5bf28178ed5d71c00b89ec1c 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResource.h
+++ b/third_party/WebKit/Source/core/fetch/ImageResource.h
@@ -29,6 +29,7 @@
#include "platform/geometry/IntSizeHash.h"
#include "platform/geometry/LayoutSize.h"
#include "platform/graphics/ImageObserver.h"
+#include "platform/graphics/ImageOrientation.h"
#include "wtf/HashMap.h"
namespace blink {
@@ -66,7 +67,7 @@ public:
bool willPaintBrokenImage() const;
// Assumes that image rotation or scale doesn't effect the image size being empty or not.
- bool canRender() { return !errorOccurred() && !imageSizeForLayoutObject(nullptr, 1).isEmpty(); }
+ bool canRender() { return !errorOccurred() && !imageSize(DoNotRespectImageOrientation, 1).isEmpty(); }
bool usesImageContainerSize() const;
bool imageHasRelativeWidth() const;
@@ -80,7 +81,7 @@ public:
IntrinsicCorrectedToDPR, // Report the intrinsic size corrected to account for image density.
};
// This method takes a zoom multiplier that can be used to increase the natural size of the image by the zoom.
- LayoutSize imageSizeForLayoutObject(const LayoutObject*, float multiplier, SizeType = IntrinsicSize); // returns the size of the complete image.
+ LayoutSize imageSize(RespectImageOrientationEnum shouldRespectImageOrientation, float multiplier, SizeType = IntrinsicSize);
void computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio);
bool isAccessAllowed(SecurityOrigin*);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/ImageResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698