Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
index 70693ab1bb91a858754eb9e84fa5efa1e13bac08..18539015990d6265d9c9a1e40ffb4a19fe8b8298 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
@@ -716,15 +716,19 @@ static inline bool objectIsRelayoutBoundary(const LayoutObject* object) { |
if (object->isTablePart()) |
return false; |
- if (object->style()->containsLayout() && object->style()->containsSize()) |
+ const ComputedStyle* style = object->style(); |
+ if (style->containsLayout() && style->containsSize()) |
return true; |
if (!object->hasOverflowClip()) |
return false; |
- if (object->style()->width().isIntrinsicOrAuto() || |
- object->style()->height().isIntrinsicOrAuto() || |
- object->style()->height().isPercentOrCalc()) |
+ // If either dimension is percent-based, intrinsic, or anything but fixed, |
+ // this object cannot form a re-layout boundary. A non-fixed computed logical |
+ // height will allow the object to grow and shrink based on the content |
+ // inside. The same goes for for logical width, if this objects is inside a |
+ // shrink-to-fit container, for instance. |
+ if (!style->width().isFixed() || !style->height().isFixed()) |
return false; |
// Scrollbar parts can be removed during layout. Avoid the complexity of |