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

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

Issue 2368153003: Compute margin block start for 1st block in LayoutNG root constraint space (Closed)
Patch Set: Get IsNewBfc from layout_box->createsNewFormattingContext() 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
Index: third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
index d1c93cbd268b649d2071ee1488b7772c7ce6325f..2812335e2b779a27730a43bb1211c5f73d4a618d 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
@@ -19,7 +19,7 @@ class NGBlockLayoutAlgorithmTest : public ::testing::Test {
protected:
void SetUp() override { style_ = ComputedStyle::create(); }
- NGPhysicalFragment* RunBlockLayoutAlgorithm(const NGConstraintSpace* space,
+ NGPhysicalFragment* RunBlockLayoutAlgorithm(NGConstraintSpace* space,
ikilpatrick 2016/09/29 00:18:11 can add const back in.
Gleb Lanbin 2016/09/29 17:11:15 Done.
NGBox* first_child) {
NGBlockLayoutAlgorithm algorithm(style_, first_child);
NGPhysicalFragment* frag;
@@ -157,6 +157,7 @@ TEST_F(NGBlockLayoutAlgorithmTest, CollapsingMarginsCase1) {
auto* space =
new NGConstraintSpace(HorizontalTopBottom, LeftToRight,
NGLogicalSize(LayoutUnit(100), NGSizeIndefinite));
+ space->SetIsNewBfc(true);
NGPhysicalFragment* frag = RunBlockLayoutAlgorithm(space, div1);
EXPECT_EQ(NGMarginStrut({LayoutUnit(kDiv1MarginTop)}), frag->MarginStrut());

Powered by Google App Engine
This is Rietveld 408576698