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

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

Issue 1447273003: Make the FloatSize constructor from an IntSize explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/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 2214f5b3c41df078ed9c1744751d162c543a48da..e06cf388b158dacdb761e8cd8c8d2473160bf96d 100644
--- a/third_party/WebKit/Source/platform/graphics/Image.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Image.cpp
@@ -98,7 +98,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 IntSize& repeatSpacing)
{
- FloatSize intrinsicTileSize = size();
+ FloatSize intrinsicTileSize = FloatSize(size());
if (hasRelativeWidth())
intrinsicTileSize.setWidth(scaledTileSize.width());
if (hasRelativeHeight())
@@ -262,7 +262,7 @@ void Image::drawPattern(GraphicsContext* context, const FloatRect& floatSrcRect,
void Image::computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio)
{
- intrinsicRatio = size();
+ intrinsicRatio = FloatSize(size());
intrinsicWidth = Length(intrinsicRatio.width(), Fixed);
intrinsicHeight = Length(intrinsicRatio.height(), Fixed);
}

Powered by Google App Engine
This is Rietveld 408576698