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

Unified Diff: third_party/WebKit/Source/core/style/StyleSurroundData.cpp

Issue 2824973002: Split StyleSurroundData::margin into four individual Lengths. (Closed)
Patch Set: Rebase Created 3 years, 8 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/style/StyleSurroundData.cpp
diff --git a/third_party/WebKit/Source/core/style/StyleSurroundData.cpp b/third_party/WebKit/Source/core/style/StyleSurroundData.cpp
index 3489aea0e040983e48611e2b455a6179bf956ec8..0d4a7b9a342f363b72579b88d7d1fd318a64bdc2 100644
--- a/third_party/WebKit/Source/core/style/StyleSurroundData.cpp
+++ b/third_party/WebKit/Source/core/style/StyleSurroundData.cpp
@@ -23,7 +23,12 @@
namespace blink {
-StyleSurroundData::StyleSurroundData() : margin_(kFixed), padding_(kFixed) {}
+StyleSurroundData::StyleSurroundData()
+ : margin_left_(kFixed),
+ margin_right_(kFixed),
+ margin_top_(kFixed),
+ margin_bottom_(kFixed),
+ padding_(kFixed) {}
StyleSurroundData::StyleSurroundData(const StyleSurroundData& o)
: RefCounted<StyleSurroundData>(),
@@ -31,13 +36,18 @@ StyleSurroundData::StyleSurroundData(const StyleSurroundData& o)
right_(o.right_),
top_(o.top_),
bottom_(o.bottom_),
- margin_(o.margin_),
+ margin_left_(o.margin_left_),
+ margin_right_(o.margin_right_),
+ margin_top_(o.margin_top_),
+ margin_bottom_(o.margin_bottom_),
padding_(o.padding_),
border_(o.border_) {}
bool StyleSurroundData::operator==(const StyleSurroundData& o) const {
- return left_ == o.left_ && right_ == o.right_ && top_ == o.top_ &&
- bottom_ == o.bottom_ && margin_ == o.margin_ &&
+ return (left_ == o.left_ && right_ == o.right_ && top_ == o.top_ &&
+ bottom_ == o.bottom_) &&
+ (margin_left_ == o.margin_left_ && margin_right_ == o.margin_right_ &&
+ margin_top_ == o.margin_top_ && margin_bottom_ == o.margin_bottom_) &&
padding_ == o.padding_ && border_ == o.border_;
}
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleSurroundData.h ('k') | third_party/WebKit/Source/platform/LengthBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698