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

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

Issue 2824973002: Split StyleSurroundData::margin into four individual Lengths. (Closed)
Patch Set: 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..18e1cb3c5a2240e546b4c5a03ec1c07f5053afb5 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,14 +36,19 @@ 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_ &&
- padding_ == o.padding_ && border_ == o.border_;
+ 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_;
alancutter (OOO until 2018) 2017/04/19 07:01:21 Nit: Let's group related properties with parenthes
shend 2017/04/19 07:19:24 Done.
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698