Index: third_party/WebKit/Source/core/layout/LayoutReplaced.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp b/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp |
index 3e42a90b09d1e94d92945c587cc63ba4d5902a08..c5f778d14a0a874302fb2c7b3e4df3356fb4507a 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp |
@@ -282,6 +282,9 @@ LayoutUnit LayoutReplaced::computeReplacedLogicalWidth(ShouldComputePreferred sh |
bool computedHeightIsAuto = hasAutoHeightOrContainingBlockWithAutoHeight(); |
bool hasIntrinsicWidth = constrainedSize.width() > 0; |
+ if (!hasIntrinsicWidth && contentLayoutObject) |
+ hasIntrinsicWidth = contentLayoutObject->style()->logicalWidth().isFixed(); |
davve
2016/01/18 15:52:48
You rely on the (logical) intrinsic width being co
Shanmuga Pandi
2016/01/20 06:09:34
Instead of LogicalWidth()/Height(), getting hasInt
|
+ |
// If 'height' and 'width' both have computed values of 'auto' and the element also has an intrinsic width, then that intrinsic width is the used value of 'width'. |
if (computedHeightIsAuto && hasIntrinsicWidth) |
return computeReplacedLogicalWidthRespectingMinMaxWidth(constrainedSize.width(), shouldComputePreferred); |
@@ -344,6 +347,9 @@ LayoutUnit LayoutReplaced::computeReplacedLogicalHeight() const |
bool widthIsAuto = style()->logicalWidth().isAuto(); |
bool hasIntrinsicHeight = constrainedSize.height() > 0; |
+ if (!hasIntrinsicHeight && contentLayoutObject) |
+ hasIntrinsicHeight = contentLayoutObject->style()->logicalHeight().isFixed(); |
+ |
// If 'height' and 'width' both have computed values of 'auto' and the element also has an intrinsic height, then that intrinsic height is the used value of 'height'. |
if (widthIsAuto && hasIntrinsicHeight) |
return computeReplacedLogicalHeightRespectingMinMaxHeight(constrainedSize.height()); |