diff options
Diffstat (limited to 'WebCore/rendering')
-rw-r--r-- | WebCore/rendering/RenderImage.cpp | 46 | ||||
-rw-r--r-- | WebCore/rendering/style/RenderStyle.h | 8 |
2 files changed, 21 insertions, 33 deletions
diff --git a/WebCore/rendering/RenderImage.cpp b/WebCore/rendering/RenderImage.cpp index e6f4dbe..d21c1ea 100644 --- a/WebCore/rendering/RenderImage.cpp +++ b/WebCore/rendering/RenderImage.cpp @@ -470,22 +470,18 @@ int RenderImage::computeReplacedLogicalWidth(bool includeMaxWidth) const int minLogicalWidth = computeReplacedLogicalWidthUsing(style()->logicalMinWidth()); int maxLogicalWidth = !includeMaxWidth || style()->logicalMaxWidth().isUndefined() ? logicalWidth : computeReplacedLogicalWidthUsing(style()->logicalMaxWidth()); -<<<<<<< HEAD #ifdef ANDROID_LAYOUT - width = max(minW, min(width, maxW)); + logicalWidth = max(minLogicalWidth, min(logicalWidth, maxLogicalWidth)); // in SSR mode, we will fit the image to its container width if (document()->settings()->layoutAlgorithm() == Settings::kLayoutSSR) { int cw = containingBlockLogicalWidthForContent(); - if (cw && width>cw) - width = cw; + if (cw && logicalWidth > cw) + logicalWidth = cw; } - return width; + return logicalWidth; #else - return max(minW, min(width, maxW)); -#endif -======= return max(minLogicalWidth, min(logicalWidth, maxLogicalWidth)); ->>>>>>> webkit.org at r70209 +#endif } int RenderImage::computeReplacedLogicalHeight() const @@ -504,32 +500,28 @@ int RenderImage::computeReplacedLogicalHeight() const int minLogicalHeight = computeReplacedLogicalHeightUsing(style()->logicalMinHeight()); int maxLogicalHeight = style()->logicalMaxHeight().isUndefined() ? logicalHeight : computeReplacedLogicalHeightUsing(style()->logicalMaxHeight()); -<<<<<<< HEAD #ifdef ANDROID_LAYOUT - height = max(minH, min(height, maxH)); + logicalHeight = max(minLogicalHeight, min(logicalHeight, maxLogicalHeight)); // in SSR mode, we will fit the image to its container width - if (height && document()->settings()->layoutAlgorithm() == Settings::kLayoutSSR) { - int width; - if (isWidthSpecified()) - width = computeReplacedWidthUsing(style()->width()); + if (logicalHeight && document()->settings()->layoutAlgorithm() == Settings::kLayoutSSR) { + int logicalWidth; + if (isLogicalWidthSpecified()) + logicalWidth = computeReplacedLogicalWidthUsing(style()->width()); else - width = calcAspectRatioWidth(); - int minW = computeReplacedWidthUsing(style()->minWidth()); - int maxW = style()->maxWidth().value() == undefinedLength ? width : - computeReplacedWidthUsing(style()->maxWidth()); - width = max(minW, min(width, maxW)); + logicalWidth = calcAspectRatioLogicalWidth(); + int minLogicalWidth = computeReplacedLogicalWidthUsing(style()->minWidth()); + int maxLogicalWidth = style()->maxWidth().value() == undefinedLength ? logicalWidth : + computeReplacedLogicalWidthUsing(style()->maxWidth()); + logicalWidth = max(minLogicalWidth, min(logicalWidth, maxLogicalWidth)); int cw = containingBlockLogicalWidthForContent(); - if (cw && width && width > cw) - height = cw * height / width; // preserve aspect ratio + if (cw && logicalWidth && logicalWidth > cw) + logicalHeight = cw * logicalHeight / logicalWidth; // preserve aspect ratio } - return height; + return logicalHeight; #else - return max(minH, min(height, maxH)); -#endif -======= return max(minLogicalHeight, min(logicalHeight, maxLogicalHeight)); ->>>>>>> webkit.org at r70209 +#endif } int RenderImage::calcAspectRatioLogicalWidth() const diff --git a/WebCore/rendering/style/RenderStyle.h b/WebCore/rendering/style/RenderStyle.h index 587b473..96645cf 100644 --- a/WebCore/rendering/style/RenderStyle.h +++ b/WebCore/rendering/style/RenderStyle.h @@ -753,7 +753,8 @@ public: bool isHorizontalWritingMode() const { return writingMode() == TopToBottomWritingMode || writingMode() == BottomToTopWritingMode; } bool isFlippedLinesWritingMode() const { return writingMode() == LeftToRightWritingMode || writingMode() == BottomToTopWritingMode; } -<<<<<<< HEAD + ESpeak speak() { return static_cast<ESpeak>(rareInheritedData->speak); } + #ifdef ANDROID_CSS_RING // called when building nav cache to determine if the ring data is unchanged const void* ringData() const { return reinterpret_cast<const void*>(rareInheritedData.get()); } @@ -770,11 +771,6 @@ public: #ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR Color tapHighlightColor() const { return rareInheritedData->tapHighlightColor; } #endif - -======= - ESpeak speak() { return static_cast<ESpeak>(rareInheritedData->speak); } - ->>>>>>> webkit.org at r70209 // attribute setter methods void setDisplay(EDisplay v) { noninherited_flags._effectiveDisplay = v; } |