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

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

Issue 2453553002: Resolve ApplyAutoMargins's TODO in NGBlockLayoutAlgorithm. (Closed)
Patch Set: change ApplyAutoMargins to pass margins by pointer + DCHECK Created 4 years, 2 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/Source/core/layout/ng/ng_length_utils.cc ('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/ng/ng_length_utils_test.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_length_utils_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_length_utils_test.cc
index 506d0fcd4dbc6d8b7ce5d89e9c15e07a7777b5b8..ec9e9922283d035bf0b23c4972216882afe36a31 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_length_utils_test.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_length_utils_test.cc
@@ -289,7 +289,7 @@ TEST_F(NGLengthUtilsTest, testAutoMargins) {
NGConstraintSpace* constraint_space(ConstructConstraintSpace(200, 300));
NGBoxStrut margins;
- ApplyAutoMargins(*constraint_space, *style_, *fragment, margins);
+ ApplyAutoMargins(*constraint_space, *style_, *fragment, &margins);
EXPECT_EQ(LayoutUnit(), margins.block_start);
EXPECT_EQ(LayoutUnit(), margins.block_end);
@@ -298,14 +298,14 @@ TEST_F(NGLengthUtilsTest, testAutoMargins) {
style_->setMarginLeft(Length(0, Fixed));
margins = NGBoxStrut();
- ApplyAutoMargins(*constraint_space, *style_, *fragment, margins);
+ ApplyAutoMargins(*constraint_space, *style_, *fragment, &margins);
EXPECT_EQ(LayoutUnit(0), margins.inline_start);
EXPECT_EQ(LayoutUnit(50), margins.inline_end);
style_->setMarginLeft(Length(Auto));
style_->setMarginRight(Length(0, Fixed));
margins = NGBoxStrut();
- ApplyAutoMargins(*constraint_space, *style_, *fragment, margins);
+ ApplyAutoMargins(*constraint_space, *style_, *fragment, &margins);
EXPECT_EQ(LayoutUnit(50), margins.inline_start);
EXPECT_EQ(LayoutUnit(0), margins.inline_end);
@@ -315,7 +315,7 @@ TEST_F(NGLengthUtilsTest, testAutoMargins) {
style_->setMarginRight(Length(5000, Fixed));
margins = NGBoxStrut();
margins.inline_end = LayoutUnit(5000);
- ApplyAutoMargins(*constraint_space, *style_, *fragment, margins);
+ ApplyAutoMargins(*constraint_space, *style_, *fragment, &margins);
EXPECT_EQ(LayoutUnit(0), margins.inline_start);
EXPECT_EQ(LayoutUnit(5000), margins.inline_end);
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698