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

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

Issue 2472583006: Add support of leader_point in NGLayoutOpportunityIterator. (Closed)
Patch Set: LayoutUnit(0) -> LayoutUnit() Created 4 years, 1 month 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 71e9f0b0dea3928c3ff3da73cc714cc119753bea..8fba52f9ad8c5aba69b3afe9daf962dbdba2ea5b 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_units.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_units.cc
@@ -107,6 +107,30 @@ NGLogicalOffset& NGLogicalOffset::operator+=(const NGLogicalOffset& other) {
return *this;
}
+bool NGLogicalOffset::operator>(const NGLogicalOffset& other) const {
+ return inline_offset > other.inline_offset &&
+ block_offset > other.block_offset;
+}
+
+bool NGLogicalOffset::operator>=(const NGLogicalOffset& other) const {
+ return inline_offset >= other.inline_offset &&
+ block_offset >= other.block_offset;
+}
+
+bool NGLogicalOffset::operator<(const NGLogicalOffset& other) const {
+ return inline_offset < other.inline_offset &&
+ block_offset < other.block_offset;
+}
+
+bool NGLogicalOffset::operator<=(const NGLogicalOffset& other) const {
+ return inline_offset <= other.inline_offset &&
+ block_offset <= other.block_offset;
+}
+
+String NGLogicalOffset::ToString() const {
+ return String::format("%dx%d", inline_offset.toInt(), block_offset.toInt());
+}
+
bool NGBoxStrut::IsEmpty() const {
return *this == NGBoxStrut();
}
« 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