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

Unified Diff: Source/core/rendering/RenderBoxModelObject.cpp

Issue 359673003: Inapplicable top, bottom style shouldn't affect height calculation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Re-add experimentally removed code and fix it Created 6 years, 6 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 | « LayoutTests/fast/css/replaced-element-ignore-top-bottom.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBoxModelObject.cpp
diff --git a/Source/core/rendering/RenderBoxModelObject.cpp b/Source/core/rendering/RenderBoxModelObject.cpp
index 233497736ab23155dcee87c38b9241308a8dc723..dcfe8878b9350f9e2099256d0429a97b7e369376 100644
--- a/Source/core/rendering/RenderBoxModelObject.cpp
+++ b/Source/core/rendering/RenderBoxModelObject.cpp
@@ -191,14 +191,11 @@ bool RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight() const
if (cb->isRenderView())
return false;
- if (!cb->style()->logicalTop().isAuto() && !cb->style()->logicalBottom().isAuto())
+ if (cb->isOutOfFlowPositioned() && !cb->style()->logicalTop().isAuto() && !cb->style()->logicalBottom().isAuto())
return false;
- // If the height of the containing block computes to 'auto', then it hasn't been 'specified explictly'.
- if (!cb->hasAutoHeightOrContainingBlockWithAutoHeight())
- return false;
-
- return true;
+ // If the height of the containing block computes to 'auto', then it hasn't been 'specified explicitly'.
+ return cb->hasAutoHeightOrContainingBlockWithAutoHeight();
}
LayoutSize RenderBoxModelObject::relativePositionOffset() const
« no previous file with comments | « LayoutTests/fast/css/replaced-element-ignore-top-bottom.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698