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

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

Issue 2360793002: [layoutng] Add border and padding when setting the override size (Closed)
Patch Set: review comments 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 7590215d8df52d17a581ad4fde6f9947cd1de593..cae190747cc9d0599fe6ae29d473a9dcced13a91 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
@@ -71,12 +71,17 @@ NGConstraintSpace* NGConstraintSpace::CreateFromLayoutObject(
container_logical_height =
box.containingBlock()->availableLogicalHeightForPercentageComputation();
}
+ // When we have an override size, the container_logical_{width,height} will be
+ // used as the final size of the box, so it has to include border and
+ // padding.
if (box.hasOverrideLogicalContentWidth()) {
- container_logical_width = box.overrideLogicalContentWidth();
+ container_logical_width =
+ box.borderAndPaddingLogicalWidth() + box.overrideLogicalContentWidth();
fixed_inline = true;
}
if (box.hasOverrideLogicalContentHeight()) {
- container_logical_width = box.overrideLogicalContentHeight();
+ container_logical_height = box.borderAndPaddingLogicalHeight() +
+ box.overrideLogicalContentHeight();
fixed_block = 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