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

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

Issue 2568743005: Place the out of flow positioned blocks (Closed)
Patch Set: Out of flow positioning: placing the elements Created 4 years 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_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 f431434b207237f78a041a23472e9a776d166cb9..88ceb0aa6fcd2f9231fcc002da6e9ce55720baa0 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_units.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_units.cc
@@ -142,6 +142,16 @@ NGPhysicalOffset& NGPhysicalOffset::operator+=(const NGPhysicalOffset& other) {
return *this;
}
+NGPhysicalOffset NGPhysicalOffset::operator-(
+ const NGPhysicalOffset& other) const {
+ return NGPhysicalOffset{this->left - other.left, this->top - other.top};
+}
+
+NGPhysicalOffset& NGPhysicalOffset::operator-=(const NGPhysicalOffset& other) {
+ *this = *this - other;
+ return *this;
+}
+
bool NGBoxStrut::IsEmpty() const {
return *this == NGBoxStrut();
}

Powered by Google App Engine
This is Rietveld 408576698