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

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

Issue 2350603002: Ignore zero-height fragments during margin collapsing (Closed)
Patch Set: Set writing mode and fixed size on style_. 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_fragment_builder.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
index cbb9244f0038f59b562f7622091b2d9d0c058a45..f7ef2e236c9daf7dfb89efc16267fb26051ef9a9 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
@@ -10,9 +10,7 @@ NGFragmentBuilder::NGFragmentBuilder(
NGPhysicalFragmentBase::NGFragmentType type)
: type_(type),
writing_mode_(HorizontalTopBottom),
- direction_(LeftToRight),
- is_margin_strut_block_start_updated_(false),
- is_margin_strut_block_end_updated_(false) {}
+ direction_(LeftToRight) {}
NGFragmentBuilder& NGFragmentBuilder::SetWritingMode(
NGWritingMode writing_mode) {
@@ -56,19 +54,15 @@ NGFragmentBuilder& NGFragmentBuilder::AddChild(NGFragment* child,
NGFragmentBuilder& NGFragmentBuilder::SetMarginStrutBlockStart(
const NGMarginStrut& from) {
- DCHECK(!is_margin_strut_block_start_updated_);
margin_strut_.margin_block_start = from.margin_block_start;
margin_strut_.negative_margin_block_start = from.negative_margin_block_start;
- is_margin_strut_block_start_updated_ = true;
return *this;
}
NGFragmentBuilder& NGFragmentBuilder::SetMarginStrutBlockEnd(
const NGMarginStrut& from) {
- DCHECK(!is_margin_strut_block_end_updated_);
margin_strut_.margin_block_end = from.margin_block_end;
margin_strut_.negative_margin_block_end = from.negative_margin_block_end;
- is_margin_strut_block_end_updated_ = true;
return *this;
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h ('k') | third_party/WebKit/Source/core/layout/ng/ng_units.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698