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

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

Issue 2854183003: Clean up StyleBackgroundData. (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/StyleBackgroundData.h
diff --git a/third_party/WebKit/Source/core/style/StyleBackgroundData.h b/third_party/WebKit/Source/core/style/StyleBackgroundData.h
index 953b41e9513f286261d22ab2b0d2a18e8c75216f..640d0ea57bd5dd70cd64c98398185093de192e37 100644
--- a/third_party/WebKit/Source/core/style/StyleBackgroundData.h
+++ b/third_party/WebKit/Source/core/style/StyleBackgroundData.h
@@ -36,7 +36,8 @@ namespace blink {
// TODO(sashab): Move this into a private class on ComputedStyle, and remove
// all methods on it, merging them into copy/creation methods on ComputedStyle
// instead. Keep the allocation logic, only allocating a new object if needed.
-class CORE_EXPORT StyleBackgroundData : public RefCounted<StyleBackgroundData> {
+class CORE_EXPORT StyleBackgroundData
+ : public RefCountedCopyable<StyleBackgroundData> {
public:
static PassRefPtr<StyleBackgroundData> Create() {
return AdoptRef(new StyleBackgroundData);
@@ -44,22 +45,18 @@ class CORE_EXPORT StyleBackgroundData : public RefCounted<StyleBackgroundData> {
PassRefPtr<StyleBackgroundData> Copy() const {
return AdoptRef(new StyleBackgroundData(*this));
}
- ~StyleBackgroundData() {}
bool operator==(const StyleBackgroundData&) const;
bool operator!=(const StyleBackgroundData& o) const { return !(*this == o); }
- const FillLayer& Background() const { return background_; }
- const StyleColor& GetColor() const { return color_; }
-
private:
friend class ComputedStyle;
StyleBackgroundData();
- StyleBackgroundData(const StyleBackgroundData&);
+ StyleBackgroundData(const StyleBackgroundData&) = default;
FillLayer background_;
- StyleColor color_;
+ StyleColor background_color_;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/core/style/StyleBackgroundData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698