From 58e648d201233babf24087c7bd03e69c692242f3 Mon Sep 17 00:00:00 2001 From: "rob.buis@samsung.com" Date: Mon, 17 Aug 2015 21:11:56 +0000 Subject: [PATCH] Use transposedSize in more places Using this method makes the code intent more clear. Review URL: https://codereview.chromium.org/1296543003 git-svn-id: svn://svn.chromium.org/blink/trunk@200667 bbb929c8-8fbe-4397-9dbb-9b2b20218538 --- third_party/WebKit/Source/platform/graphics/BitmapImage.cpp | 2 +- third_party/WebKit/Source/platform/graphics/ImageSource.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp b/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp index f49218a73039..eec27f48d948 100644 --- a/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp +++ b/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp @@ -50,7 +50,7 @@ PassRefPtr BitmapImage::createWithOrientationForTesting(const SkBit RefPtr result = adoptRef(new BitmapImage(bitmap)); result->m_frames[0].m_orientation = orientation; if (orientation.usesWidthAsHeight()) - result->m_sizeRespectingOrientation = IntSize(result->m_size.height(), result->m_size.width()); + result->m_sizeRespectingOrientation = result->m_size.transposedSize(); return result.release(); } diff --git a/third_party/WebKit/Source/platform/graphics/ImageSource.cpp b/third_party/WebKit/Source/platform/graphics/ImageSource.cpp index 8275665d6132..c441f8acefc2 100644 --- a/third_party/WebKit/Source/platform/graphics/ImageSource.cpp +++ b/third_party/WebKit/Source/platform/graphics/ImageSource.cpp @@ -85,7 +85,7 @@ IntSize ImageSource::frameSizeAtIndex(size_t index, RespectImageOrientationEnum IntSize size = m_decoder->frameSizeAtIndex(index); if ((shouldRespectOrientation == RespectImageOrientation) && m_decoder->orientationAtIndex(index).usesWidthAsHeight()) - return IntSize(size.height(), size.width()); + return size.transposedSize(); return size; } -- 2.11.4.GIT