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

Unified Diff: third_party/WebKit/Source/core/css/CSSStringValueBase.h

Issue 1373433002: Split out CSSPrimitiveValue's PropertyID into CSSCustomIdentValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_string
Patch Set: Created 5 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: third_party/WebKit/Source/core/css/CSSStringValueBase.h
diff --git a/third_party/WebKit/Source/core/css/CSSStringValueBase.h b/third_party/WebKit/Source/core/css/CSSStringValueBase.h
deleted file mode 100644
index 55538c63693d6df0688d7beb5a983f2345ceb440..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/css/CSSStringValueBase.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CSSStringValueBase_h
-#define CSSStringValueBase_h
-
-#include "core/CoreExport.h"
-#include "core/css/CSSValue.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefCounted.h"
-
-namespace blink {
-
-enum class StringValueClass {
- StringClass,
- CustomIdentClass,
- URIClass,
-};
-
-template <StringValueClass T>
-class CSSStringValueBase : public CSSValue {
-public:
- static PassRefPtrWillBeRawPtr<CSSStringValueBase> create(const String& str)
- {
- return adoptRefWillBeNoop(new CSSStringValueBase(str));
- }
-
- String value() const { return m_string; }
-
- String customCSSText() const;
-
- bool equals(const CSSStringValueBase& other) const
- {
- return m_string == other.m_string;
- }
-
- DEFINE_INLINE_TRACE_AFTER_DISPATCH()
- {
- CSSValue::traceAfterDispatch(visitor);
- }
-
-private:
- CSSStringValueBase(const String&);
-
- String m_string;
-};
-
-using CSSStringValue = CSSStringValueBase<StringValueClass::StringClass>;
-using CSSCustomIdentValue = CSSStringValueBase<StringValueClass::CustomIdentClass>;
-using CSSURIValue = CSSStringValueBase<StringValueClass::URIClass>;
-
-DEFINE_CSS_VALUE_TYPE_CASTS(CSSStringValue, isStringValue());
-DEFINE_CSS_VALUE_TYPE_CASTS(CSSCustomIdentValue, isCustomIdentValue());
-DEFINE_CSS_VALUE_TYPE_CASTS(CSSURIValue, isURIValue());
-
-} // namespace blink
-
-#endif // CSSStringValueBase_h

Powered by Google App Engine
This is Rietveld 408576698