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

Unified Diff: third_party/WebKit/Source/platform/graphics/Image.cpp

Issue 1732563007: [NOT FOR COMMIT] Pass defaultObjectSize to get image size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/Image.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/Image.cpp b/third_party/WebKit/Source/platform/graphics/Image.cpp
index 5ab1d6f47e714896ef405937e8ceda2110650766..3b75e56112673a5647ddd60adc7bc4463f55d390 100644
--- a/third_party/WebKit/Source/platform/graphics/Image.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Image.cpp
@@ -97,7 +97,7 @@ bool Image::setData(PassRefPtr<SharedBuffer> data, bool allDataReceived)
void Image::drawTiled(GraphicsContext& ctxt, const FloatRect& destRect, const FloatPoint& srcPoint, const FloatSize& scaledTileSize, SkXfermode::Mode op, const FloatSize& repeatSpacing)
{
- FloatSize intrinsicTileSize = FloatSize(size());
+ FloatSize intrinsicTileSize = FloatSize(defaultConcreteObjectSize());
if (hasRelativeSize()) {
intrinsicTileSize.setWidth(scaledTileSize.width());
intrinsicTileSize.setHeight(scaledTileSize.height());
@@ -261,7 +261,7 @@ void Image::drawPattern(GraphicsContext& context, const FloatRect& floatSrcRect,
void Image::computeIntrinsicDimensions(FloatSize& intrinsicSize, FloatSize& intrinsicRatio)
{
- intrinsicSize = intrinsicRatio = FloatSize(size());
+ intrinsicSize = intrinsicRatio = FloatSize(defaultConcreteObjectSize());
}
PassRefPtr<Image> Image::imageForDefaultFrame()
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Image.h ('k') | third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698