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

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

Issue 2683793007: Keep the aspect ratio of child with percentage max-height when the size of its container changes (Closed)
Patch Set: Updated LayoutReplaced::needsPreferredWidthsRecalculation Created 3 years, 10 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/replaced/aspect-ratio-of-replaced-child-with-max-height-expected.txt ('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/LayoutReplaced.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp b/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
index 9f10ae51d040d384e469528d75cff5360f3fd769..9350529832c0d4be90d013796a33584262e1bac3 100644
--- a/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
@@ -132,8 +132,7 @@ bool LayoutReplaced::needsPreferredWidthsRecalculation() const {
// If the height is a percentage and the width is auto, then the
// containingBlocks's height changing can cause this node to change it's
// preferred width because it maintains aspect ratio.
- return hasRelativeLogicalHeight() && style()->logicalWidth().isAuto() &&
- !hasAutoHeightOrContainingBlockWithAutoHeight();
+ return hasRelativeLogicalHeight() && style()->logicalWidth().isAuto();
}
static inline bool layoutObjectHasAspectRatio(
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/replaced/aspect-ratio-of-replaced-child-with-max-height-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698