Title: [259571] trunk/Source/WebCore
- Revision
- 259571
- Author
- [email protected]
- Date
- 2020-04-06 08:33:34 -0700 (Mon, 06 Apr 2020)
Log Message
Remove instance fields and methods from StyleColor
https://bugs.webkit.org/show_bug.cgi?id=210045
Reviewed by Zalan Bujtas.
They are unused. The type itself remains as a namespace for static functions.
We might want bring it back later but there is no need to leave dead code around now.
* css/StyleColor.h:
(WebCore::StyleColor::StyleColor): Deleted.
(WebCore::StyleColor::currentColor): Deleted.
(WebCore::StyleColor::isCurrentColor const): Deleted.
(WebCore::StyleColor::getColor const): Deleted.
(WebCore::StyleColor::resolve const): Deleted.
(WebCore::operator==): Deleted.
(WebCore::operator!=): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (259570 => 259571)
--- trunk/Source/WebCore/ChangeLog 2020-04-06 15:27:55 UTC (rev 259570)
+++ trunk/Source/WebCore/ChangeLog 2020-04-06 15:33:34 UTC (rev 259571)
@@ -1,3 +1,22 @@
+2020-04-06 Antti Koivisto <[email protected]>
+
+ Remove instance fields and methods from StyleColor
+ https://bugs.webkit.org/show_bug.cgi?id=210045
+
+ Reviewed by Zalan Bujtas.
+
+ They are unused. The type itself remains as a namespace for static functions.
+ We might want bring it back later but there is no need to leave dead code around now.
+
+ * css/StyleColor.h:
+ (WebCore::StyleColor::StyleColor): Deleted.
+ (WebCore::StyleColor::currentColor): Deleted.
+ (WebCore::StyleColor::isCurrentColor const): Deleted.
+ (WebCore::StyleColor::getColor const): Deleted.
+ (WebCore::StyleColor::resolve const): Deleted.
+ (WebCore::operator==): Deleted.
+ (WebCore::operator!=): Deleted.
+
2020-04-06 Said Abou-Hallawa <[email protected]>
CanvasRenderingContext2D.drawImage should ignore the EXIF orientation if the image-orientation is none
Modified: trunk/Source/WebCore/css/StyleColor.h (259570 => 259571)
--- trunk/Source/WebCore/css/StyleColor.h 2020-04-06 15:27:55 UTC (rev 259570)
+++ trunk/Source/WebCore/css/StyleColor.h 2020-04-06 15:33:34 UTC (rev 259571)
@@ -37,20 +37,7 @@
namespace WebCore {
-class StyleColor {
-public:
- StyleColor()
- : m_currentColor(true) { }
- StyleColor(Color color)
- : m_color(color)
- , m_currentColor(false) { }
- static StyleColor currentColor() { return StyleColor(); }
-
- bool isCurrentColor() const { return m_currentColor; }
- const Color& getColor() const { ASSERT(!isCurrentColor()); return m_color; }
-
- const Color& resolve(const Color& currentColor) const { return m_currentColor ? currentColor : m_color; }
-
+struct StyleColor {
enum class Options : uint8_t {
ForVisitedLink = 1 << 0,
UseSystemAppearance = 1 << 1,
@@ -61,23 +48,6 @@
static Color colorFromKeyword(CSSValueID, OptionSet<Options>);
static bool isColorKeyword(CSSValueID);
WEBCORE_EXPORT static bool isSystemColor(CSSValueID);
-
-private:
- Color m_color;
- bool m_currentColor;
};
-inline bool operator==(const StyleColor& a, const StyleColor& b)
-{
- if (a.isCurrentColor() || b.isCurrentColor())
- return a.isCurrentColor() && b.isCurrentColor();
- return a.getColor() == b.getColor();
-}
-
-inline bool operator!=(const StyleColor& a, const StyleColor& b)
-{
- return !(a == b);
-}
-
-
} // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes