| Index: third_party/WebKit/Source/core/style/ComputedStyle.h
|
| diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
|
| index a66a3f692703a6fc7afc027125741241d2e39597..b5479148d7196c0cd22f259d9c8497f1637b05f0 100644
|
| --- a/third_party/WebKit/Source/core/style/ComputedStyle.h
|
| +++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
|
| @@ -72,6 +72,7 @@
|
| #include "wtf/Forward.h"
|
| #include "wtf/LeakAnnotations.h"
|
| #include "wtf/RefCounted.h"
|
| +#include "wtf/TypeTraits.h"
|
| #include "wtf/Vector.h"
|
| #include <memory>
|
|
|
| @@ -186,11 +187,13 @@ protected:
|
|
|
| bool operator!=(const InheritedData& other) const { return !(*this == other); }
|
|
|
| + static_assert(IsEnumSafeToStoreInBitfield<EVisibility>::value, "EVisibility is stored in a bitfield on ComputedStyle");
|
| +
|
| unsigned m_emptyCells : 1; // EEmptyCells
|
| unsigned m_captionSide : 2; // ECaptionSide
|
| unsigned m_listStyleType : 7; // EListStyleType
|
| unsigned m_listStylePosition : 1; // EListStylePosition
|
| - unsigned m_visibility : 2; // EVisibility
|
| + EVisibility m_visibility : 2;
|
| unsigned m_textAlign : 4; // ETextAlign
|
| unsigned m_textTransform : 2; // ETextTransform
|
| unsigned m_textUnderline : 1;
|
| @@ -298,7 +301,7 @@ protected:
|
| m_inheritedData.m_captionSide = initialCaptionSide();
|
| m_inheritedData.m_listStyleType = initialListStyleType();
|
| m_inheritedData.m_listStylePosition = initialListStylePosition();
|
| - m_inheritedData.m_visibility = static_cast<unsigned>(initialVisibility());
|
| + m_inheritedData.m_visibility = initialVisibility();
|
| m_inheritedData.m_textAlign = initialTextAlign();
|
| m_inheritedData.m_textTransform = initialTextTransform();
|
| m_inheritedData.m_textUnderline = false;
|
| @@ -1470,7 +1473,7 @@ public:
|
| // visibility
|
| static EVisibility initialVisibility() { return EVisibility::Visible; }
|
| EVisibility visibility() const { return static_cast<EVisibility>(m_inheritedData.m_visibility); }
|
| - void setVisibility(EVisibility v) { m_inheritedData.m_visibility = static_cast<unsigned>(v); }
|
| + void setVisibility(EVisibility v) { m_inheritedData.m_visibility = v; }
|
|
|
| // white-space inherited
|
| static EWhiteSpace initialWhiteSpace() { return NORMAL; }
|
|
|