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

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

Issue 2651853002: Deprecate the currently used NGMarginStrut in favor of the new one. (Closed)
Patch Set: git rebase-update Created 3 years, 11 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.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
index dabe1a37e601231e9df5935515f21f49c86965ef..a9880e4c30e397f14607f52ce80512f3f1883b4a 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
@@ -60,8 +60,8 @@ void AdjustToClearance(const NGConstraintSpace& space,
}
LayoutUnit ComputeCollapsedMarginBlockStart(
- const NGMarginStrut& prev_margin_strut,
- const NGMarginStrut& curr_margin_strut) {
+ const NGDeprecatedMarginStrut& prev_margin_strut,
+ const NGDeprecatedMarginStrut& curr_margin_strut) {
return std::max(prev_margin_strut.margin_block_end,
curr_margin_strut.margin_block_start) -
std::max(prev_margin_strut.negative_margin_block_end.abs(),
@@ -518,7 +518,7 @@ NGBoxStrut NGBlockLayoutAlgorithm::CollapseMargins(
fragment.MarginStrut().IsEmpty();
// Create the current child's margin strut from its children's margin strut or
// use margin strut from the the last non-empty child.
- NGMarginStrut curr_margin_strut =
+ NGDeprecatedMarginStrut curr_margin_strut =
is_zero_height_box ? prev_child_margin_strut_ : fragment.MarginStrut();
// Calculate borders and padding for the current child.
@@ -629,7 +629,8 @@ NGLogicalOffset NGBlockLayoutAlgorithm::PositionFloatFragment(
margins);
}
-void NGBlockLayoutAlgorithm::UpdateMarginStrut(const NGMarginStrut& from) {
+void NGBlockLayoutAlgorithm::UpdateMarginStrut(
+ const NGDeprecatedMarginStrut& from) {
if (!is_fragment_margin_strut_block_start_updated_) {
builder_->SetMarginStrutBlockStart(from);
is_fragment_margin_strut_block_start_updated_ = true;

Powered by Google App Engine
This is Rietveld 408576698