summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/CSSInitialValue.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/css/CSSInitialValue.h')
-rw-r--r--Source/WebCore/css/CSSInitialValue.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/Source/WebCore/css/CSSInitialValue.h b/Source/WebCore/css/CSSInitialValue.h
index a0a6e5548..c4161515e 100644
--- a/Source/WebCore/css/CSSInitialValue.h
+++ b/Source/WebCore/css/CSSInitialValue.h
@@ -18,21 +18,20 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef CSSInitialValue_h
-#define CSSInitialValue_h
+#pragma once
#include "CSSValue.h"
-#include <wtf/PassRefPtr.h>
+#include <wtf/NeverDestroyed.h>
namespace WebCore {
-class CSSInitialValue : public CSSValue {
+class CSSInitialValue final : public CSSValue {
public:
- static PassRef<CSSInitialValue> createExplicit()
+ static Ref<CSSInitialValue> createExplicit()
{
return adoptRef(*new CSSInitialValue(/* implicit */ false));
}
- static PassRef<CSSInitialValue> createImplicit()
+ static Ref<CSSInitialValue> createImplicit()
{
return adoptRef(*new CSSInitialValue(/* implicit */ true));
}
@@ -43,18 +42,23 @@ public:
bool equals(const CSSInitialValue&) const { return true; }
+#if COMPILER(MSVC)
+ // FIXME: This should be private, but for some reason MSVC then fails to invoke it from LazyNeverDestroyed::construct.
+public:
+#else
private:
+ friend class LazyNeverDestroyed<CSSInitialValue>;
+#endif
CSSInitialValue(bool implicit)
: CSSValue(InitialClass)
, m_isImplicit(implicit)
{
}
+private:
bool m_isImplicit;
};
-CSS_VALUE_TYPE_CASTS(CSSInitialValue, isInitialValue())
-
} // namespace WebCore
-#endif // CSSInitialValue_h
+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSInitialValue, isInitialValue())