| Index: Source/core/rendering/style/BorderValue.h
|
| diff --git a/Source/core/rendering/style/BorderValue.h b/Source/core/rendering/style/BorderValue.h
|
| index fb8c61c81045db232f2a55e3f35a2f74baba6149..689f17eda1f802e7f9c01f26db921eb9b620dedb 100644
|
| --- a/Source/core/rendering/style/BorderValue.h
|
| +++ b/Source/core/rendering/style/BorderValue.h
|
| @@ -25,7 +25,7 @@
|
| #ifndef BorderValue_h
|
| #define BorderValue_h
|
|
|
| -#include "core/platform/graphics/Color.h"
|
| +#include "core/css/StyleColor.h"
|
| #include "core/rendering/style/RenderStyleConstants.h"
|
|
|
| namespace WebCore {
|
| @@ -36,6 +36,7 @@ public:
|
| BorderValue()
|
| : m_color(0)
|
| , m_colorIsValid(false)
|
| + , m_currentColor(false)
|
| , m_width(3)
|
| , m_style(BNONE)
|
| , m_isAuto(AUTO_OFF)
|
| @@ -49,7 +50,7 @@ public:
|
|
|
| bool isTransparent() const
|
| {
|
| - return m_colorIsValid && !alphaChannel(m_color);
|
| + return m_colorIsValid && !m_currentColor && !m_color.alpha();
|
| }
|
|
|
| bool isVisible(bool checkStyle = true) const
|
| @@ -59,7 +60,7 @@ public:
|
|
|
| bool operator==(const BorderValue& o) const
|
| {
|
| - return m_width == o.m_width && m_style == o.m_style && m_color == o.m_color && m_colorIsValid == o.m_colorIsValid;
|
| + return m_width == o.m_width && m_style == o.m_style && m_color == o.m_color && m_colorIsValid == o.m_colorIsValid && m_currentColor == o.m_currentColor;
|
| }
|
|
|
| bool operator!=(const BorderValue& o) const
|
| @@ -67,22 +68,24 @@ public:
|
| return !(*this == o);
|
| }
|
|
|
| - void setColor(const Color& color)
|
| + void setColor(const StyleColor& color)
|
| {
|
| - m_color = color.rgb();
|
| + m_color = color.color();
|
| m_colorIsValid = color.isValid();
|
| + m_currentColor = color.isCurrentColor();
|
| }
|
|
|
| - Color color() const { return Color(m_color, m_colorIsValid); }
|
| + StyleColor color() const { return StyleColor(m_color, m_colorIsValid, m_currentColor); }
|
|
|
| unsigned width() const { return m_width; }
|
| EBorderStyle style() const { return static_cast<EBorderStyle>(m_style); }
|
|
|
| protected:
|
| - RGBA32 m_color;
|
| + Color m_color;
|
| unsigned m_colorIsValid : 1;
|
| + unsigned m_currentColor : 1;
|
|
|
| - unsigned m_width : 26;
|
| + unsigned m_width : 25;
|
| unsigned m_style : 4; // EBorderStyle
|
|
|
| // This is only used by OutlineValue but moved here to keep the bits packed.
|
|
|