Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2643703002: Percent-width blocks cannot form a re-layout boundary. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css-intrinsic-dimensions/resize-inside-percent-width-overflow-hidden.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css-intrinsic-dimensions/resize-inside-percent-width-overflow-hidden.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698