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

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

Issue 2389823003: Fix incorrectly calculated content_size for fragments that create new FC (Closed)
Patch Set: Regroup the code to put together the Collapsing Margins logic for NewFormattingContext's fragments 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_units.h ('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_units.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_units.cc b/third_party/WebKit/Source/core/layout/ng/ng_units.cc
index bec0be56fa5bf76fa1712c4429e0ff315608a529..f8ecccdce2b182987feac638972af04a53d03445 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_units.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_units.cc
@@ -71,6 +71,10 @@ bool NGBoxStrut::operator==(const NGBoxStrut& other) const {
std::tie(inline_start, inline_end, block_start, block_end);
}
+LayoutUnit NGMarginStrut::BlockEndSum() const {
+ return margin_block_end + negative_margin_block_end;
+}
+
void NGMarginStrut::AppendMarginBlockStart(const LayoutUnit& value) {
if (value < 0) {
negative_margin_block_start =
@@ -112,6 +116,10 @@ String NGMarginStrut::ToString() const {
negative_margin_block_end.toInt());
}
+bool NGMarginStrut::IsEmpty() const {
+ return *this == NGMarginStrut();
+}
+
bool NGMarginStrut::operator==(const NGMarginStrut& other) const {
return std::tie(other.margin_block_start, other.margin_block_end,
other.negative_margin_block_start,
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_units.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698