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

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

Issue 2568743005: Place the out of flow positioned blocks (Closed)
Patch Set: skip failing tests Created 3 years, 12 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 1a4eec73684beb0fbcb91cfc6ce9dcfbb60789b1..fc94812ce8330a6df3bb4a3ce7b51f5f955bd878 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_units.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_units.cc
@@ -147,6 +147,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();
}
« 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