diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/css/CSSInitialValue.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/css/CSSInitialValue.h')
-rw-r--r-- | Source/WebCore/css/CSSInitialValue.h | 22 |
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()) |