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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc

Issue 2323953002: [layout-ng] Use correct height for ContainerBlockSize (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | 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/ng/ng_constraint_space.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc
index c99af5ce609fdb19377b08686e1b8803c606ca16..ea3633725c56ac0eab547ab9e4d6acdb9db23325 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc
@@ -4,6 +4,8 @@
#include "core/layout/ng/ng_constraint_space.h"
+#include "core/layout/LayoutBlock.h"
+#include "core/layout/LayoutView.h"
#include "core/layout/ng/ng_units.h"
namespace blink {
@@ -54,9 +56,13 @@ NGConstraintSpace* NGConstraintSpace::CreateFromLayoutObject(
// XXX for orthogonal writing mode this is not right
LayoutUnit container_logical_width =
std::max(LayoutUnit(), box.containingBlockLogicalWidthForContent());
- // XXX Make sure this height is correct
- LayoutUnit container_logical_height =
- box.containingBlockLogicalHeightForContent(ExcludeMarginBorderPadding);
+ LayoutUnit container_logical_height;
+ if (!box.parent()) {
+ container_logical_height = box.view()->viewLogicalHeightForPercentages();
+ } else if (box.containingBlock()) {
+ container_logical_height =
+ box.containingBlock()->availableLogicalHeightForPercentageComputation();
+ }
if (box.hasOverrideLogicalContentWidth()) {
container_logical_width = box.overrideLogicalContentWidth();
fixed_inline = true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698