OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 15 matching lines...) Expand all Loading... |
26 #define StyleBackgroundData_h | 26 #define StyleBackgroundData_h |
27 | 27 |
28 #include "core/style/FillLayer.h" | 28 #include "core/style/FillLayer.h" |
29 #include "core/style/OutlineValue.h" | 29 #include "core/style/OutlineValue.h" |
30 #include "platform/graphics/Color.h" | 30 #include "platform/graphics/Color.h" |
31 #include "wtf/PassRefPtr.h" | 31 #include "wtf/PassRefPtr.h" |
32 #include "wtf/RefCounted.h" | 32 #include "wtf/RefCounted.h" |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
35 | 35 |
| 36 // TODO(sashab): Move this into a private class on ComputedStyle, and remove |
| 37 // all methods on it, merging them into copy/creation methods on ComputedStyle |
| 38 // instead. Keep the allocation logic, only allocating a new object if needed. |
36 class StyleBackgroundData : public RefCounted<StyleBackgroundData> { | 39 class StyleBackgroundData : public RefCounted<StyleBackgroundData> { |
37 public: | 40 public: |
38 static PassRefPtr<StyleBackgroundData> create() { return adoptRef(new StyleB
ackgroundData); } | 41 static PassRefPtr<StyleBackgroundData> create() { return adoptRef(new StyleB
ackgroundData); } |
39 PassRefPtr<StyleBackgroundData> copy() const { return adoptRef(new StyleBack
groundData(*this)); } | 42 PassRefPtr<StyleBackgroundData> copy() const { return adoptRef(new StyleBack
groundData(*this)); } |
40 ~StyleBackgroundData() { } | 43 ~StyleBackgroundData() { } |
41 | 44 |
42 bool operator==(const StyleBackgroundData&) const; | 45 bool operator==(const StyleBackgroundData&) const; |
43 bool operator!=(const StyleBackgroundData& o) const | 46 bool operator!=(const StyleBackgroundData& o) const |
44 { | 47 { |
45 return !(*this == o); | 48 return !(*this == o); |
(...skipping 12 matching lines...) Expand all Loading... |
58 StyleBackgroundData(const StyleBackgroundData&); | 61 StyleBackgroundData(const StyleBackgroundData&); |
59 | 62 |
60 FillLayer m_background; | 63 FillLayer m_background; |
61 StyleColor m_color; | 64 StyleColor m_color; |
62 OutlineValue m_outline; | 65 OutlineValue m_outline; |
63 }; | 66 }; |
64 | 67 |
65 } // namespace blink | 68 } // namespace blink |
66 | 69 |
67 #endif // StyleBackgroundData_h | 70 #endif // StyleBackgroundData_h |
OLD | NEW |