diff options
Diffstat (limited to 'WebCore/rendering/RenderImage.cpp')
-rw-r--r-- | WebCore/rendering/RenderImage.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/WebCore/rendering/RenderImage.cpp b/WebCore/rendering/RenderImage.cpp index ec2a4d3..1f79e50 100644 --- a/WebCore/rendering/RenderImage.cpp +++ b/WebCore/rendering/RenderImage.cpp @@ -550,7 +550,7 @@ int RenderImage::calcReplacedWidth(bool includeMaxWidth) const } return width; #else - return max(minW, min(width, maxW)); + return max(minW, min(width, maxW)); #endif } @@ -572,19 +572,19 @@ int RenderImage::calcReplacedHeight() const #ifdef ANDROID_LAYOUT height = max(minH, min(height, maxH)); // in SSR mode, we will fit the image to its container width - if (height && document()->settings()->layoutAlgorithm() == Settings::kLayoutSSR) { + if (height && document()->settings()->layoutAlgorithm() == Settings::kLayoutSSR) { int width; if (isWidthSpecified()) width = calcReplacedWidthUsing(style()->width()); else width = calcAspectRatioWidth(); int minW = calcReplacedWidthUsing(style()->minWidth()); - int maxW = style()->maxWidth().value() == undefinedLength ? width : - calcReplacedWidthUsing(style()->maxWidth()); + int maxW = style()->maxWidth().value() == undefinedLength ? width : + calcReplacedWidthUsing(style()->maxWidth()); width = max(minW, min(width, maxW)); int cw = containingBlockWidthForContent(); - if (cw && width && width>cw) + if (cw && width && width > cw) height = cw * height / width; // preserve aspect ratio } return height; |