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

Unified Diff: Source/core/rendering/style/CollapsedBorderValue.h

Issue 23581008: Revert r154797: "Move isValid/isCurrentColor from Color to StyleColor" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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: Source/core/rendering/style/CollapsedBorderValue.h
diff --git a/Source/core/rendering/style/CollapsedBorderValue.h b/Source/core/rendering/style/CollapsedBorderValue.h
index 30716ec70355d82bbc90428d57de37c59f5a2660..ef16dba2322c88fb4f9205330d499d9cfd2e3a51 100644
--- a/Source/core/rendering/style/CollapsedBorderValue.h
+++ b/Source/core/rendering/style/CollapsedBorderValue.h
@@ -34,7 +34,6 @@ public:
CollapsedBorderValue()
: m_color(0)
, m_colorIsValid(false)
- , m_currentColor(false)
, m_width(0)
, m_style(BNONE)
, m_precedence(BOFF)
@@ -42,10 +41,9 @@ public:
{
}
- CollapsedBorderValue(const BorderValue& border, const StyleColor& color, EBorderPrecedence precedence)
- : m_color(color.color())
+ CollapsedBorderValue(const BorderValue& border, const Color& color, EBorderPrecedence precedence)
+ : m_color(color.rgb())
, m_colorIsValid(color.isValid())
- , m_currentColor(color.isCurrentColor())
, m_width(border.nonZero() ? border.width() : 0)
, m_style(border.style())
, m_precedence(precedence)
@@ -56,7 +54,7 @@ public:
unsigned width() const { return m_style > BHIDDEN ? m_width : 0; }
EBorderStyle style() const { return static_cast<EBorderStyle>(m_style); }
bool exists() const { return m_precedence != BOFF; }
- StyleColor color() const { return StyleColor(m_color, m_colorIsValid, m_currentColor); }
+ Color color() const { return Color(m_color, m_colorIsValid); }
bool isTransparent() const { return m_transparent; }
EBorderPrecedence precedence() const { return static_cast<EBorderPrecedence>(m_precedence); }
@@ -66,10 +64,9 @@ public:
}
private:
- Color m_color;
+ RGBA32 m_color;
unsigned m_colorIsValid : 1;
- unsigned m_currentColor : 1;
- unsigned m_width : 22;
+ unsigned m_width : 23;
unsigned m_style : 4; // EBorderStyle
unsigned m_precedence : 3; // EBorderPrecedence
unsigned m_transparent : 1;

Powered by Google App Engine
This is Rietveld 408576698