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

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

Issue 1634133003: Condense Image::hasRelative{Width,Height}() into one (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Image.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ed58bd10ca9fa0e793a0eccd991e95c36dc51f0f..48e20cfed1c8d568a510f6264f95fbe33702dda0 100644
--- a/third_party/WebKit/Source/platform/graphics/Image.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Image.cpp
@@ -98,10 +98,10 @@ 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());
- if (hasRelativeWidth())
+ if (hasRelativeSize()) {
intrinsicTileSize.setWidth(scaledTileSize.width());
- if (hasRelativeHeight())
intrinsicTileSize.setHeight(scaledTileSize.height());
+ }
FloatSize scale(scaledTileSize.width() / intrinsicTileSize.width(),
scaledTileSize.height() / intrinsicTileSize.height());
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Image.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698