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

Unified Diff: third_party/WebKit/Source/core/style/NinePieceImage.h

Issue 2901433002: Replace NinePieceImage.setMaskDefault with static method. (Closed)
Patch Set: Created 3 years, 7 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/NinePieceImage.h
diff --git a/third_party/WebKit/Source/core/style/NinePieceImage.h b/third_party/WebKit/Source/core/style/NinePieceImage.h
index 0e876f39b7303f8cb99da2f79750efb3ffa8ea8d..f7b87effdb54addcc3f458dbf3997689d1ca4d96 100644
--- a/third_party/WebKit/Source/core/style/NinePieceImage.h
+++ b/third_party/WebKit/Source/core/style/NinePieceImage.h
@@ -82,6 +82,14 @@ class CORE_EXPORT NinePieceImage {
ENinePieceImageRule horizontal_rule,
ENinePieceImageRule vertical_rule);
+ static NinePieceImage MaskDefaults() {
+ NinePieceImage image;
+ image.data_.Access()->image_slices = LengthBox(0);
+ image.data_.Access()->fill = true;
+ image.data_.Access()->border_slices = BorderImageLengthBox(Length(kAuto));
+ return image;
+ }
+
bool operator==(const NinePieceImage& other) const {
return data_ == other.data_;
}
@@ -145,12 +153,6 @@ class CORE_EXPORT NinePieceImage {
data_.Access()->vertical_rule = other.data_->vertical_rule;
}
- void SetMaskDefaults() {
- data_.Access()->image_slices = LengthBox(0);
- data_.Access()->fill = true;
- data_.Access()->border_slices = BorderImageLengthBox(Length(kAuto));
- }
-
static LayoutUnit ComputeOutset(const BorderImageLength& outset_side,
int border_side) {
if (outset_side.IsNumber())

Powered by Google App Engine
This is Rietveld 408576698