Changeset 259571 in webkit
- Timestamp:
- Apr 6, 2020 8:33:34 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r259567 r259571 1 2020-04-06 Antti Koivisto <antti@apple.com> 2 3 Remove instance fields and methods from StyleColor 4 https://bugs.webkit.org/show_bug.cgi?id=210045 5 6 Reviewed by Zalan Bujtas. 7 8 They are unused. The type itself remains as a namespace for static functions. 9 We might want bring it back later but there is no need to leave dead code around now. 10 11 * css/StyleColor.h: 12 (WebCore::StyleColor::StyleColor): Deleted. 13 (WebCore::StyleColor::currentColor): Deleted. 14 (WebCore::StyleColor::isCurrentColor const): Deleted. 15 (WebCore::StyleColor::getColor const): Deleted. 16 (WebCore::StyleColor::resolve const): Deleted. 17 (WebCore::operator==): Deleted. 18 (WebCore::operator!=): Deleted. 19 1 20 2020-04-06 Said Abou-Hallawa <sabouhallawa@apple.com> 2 21 -
trunk/Source/WebCore/css/StyleColor.h
r254373 r259571 38 38 namespace WebCore { 39 39 40 class StyleColor { 41 public: 42 StyleColor() 43 : m_currentColor(true) { } 44 StyleColor(Color color) 45 : m_color(color) 46 , m_currentColor(false) { } 47 static StyleColor currentColor() { return StyleColor(); } 48 49 bool isCurrentColor() const { return m_currentColor; } 50 const Color& getColor() const { ASSERT(!isCurrentColor()); return m_color; } 51 52 const Color& resolve(const Color& currentColor) const { return m_currentColor ? currentColor : m_color; } 53 40 struct StyleColor { 54 41 enum class Options : uint8_t { 55 42 ForVisitedLink = 1 << 0, … … 62 49 static bool isColorKeyword(CSSValueID); 63 50 WEBCORE_EXPORT static bool isSystemColor(CSSValueID); 64 65 private:66 Color m_color;67 bool m_currentColor;68 51 }; 69 52 70 inline bool operator==(const StyleColor& a, const StyleColor& b)71 {72 if (a.isCurrentColor() || b.isCurrentColor())73 return a.isCurrentColor() && b.isCurrentColor();74 return a.getColor() == b.getColor();75 }76 77 inline bool operator!=(const StyleColor& a, const StyleColor& b)78 {79 return !(a == b);80 }81 82 83 53 } // namespace WebCore
Note: See TracChangeset
for help on using the changeset viewer.