diff options
Diffstat (limited to 'WebCore/css/CSSInitialValue.h')
-rw-r--r-- | WebCore/css/CSSInitialValue.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/WebCore/css/CSSInitialValue.h b/WebCore/css/CSSInitialValue.h index 96bc2a5..70ea91c 100644 --- a/WebCore/css/CSSInitialValue.h +++ b/WebCore/css/CSSInitialValue.h @@ -30,12 +30,12 @@ class CSSInitialValue : public CSSValue { public: static PassRefPtr<CSSInitialValue> createExplicit() { - static CSSInitialValue* explicitValue = new CSSInitialValue(false); + static CSSInitialValue* explicitValue = create(false).releaseRef(); return explicitValue; } static PassRefPtr<CSSInitialValue> createImplicit() { - static CSSInitialValue* explicitValue = new CSSInitialValue(true); + static CSSInitialValue* explicitValue = create(true).releaseRef(); return explicitValue; } @@ -47,6 +47,11 @@ private: { } + static PassRefPtr<CSSInitialValue> create(bool implicit) + { + return adoptRef(new CSSInitialValue(implicit)); + } + virtual unsigned short cssValueType() const; virtual bool isImplicitInitialValue() const { return m_implicit; } |