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

Unified Diff: third_party/WebKit/Source/core/css/cssom/CSSTokenStreamValue.h

Issue 2140073002: [Typed-OM] Add compound type of CSSVariableReferenceValue and String with some tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@CSSTokenStreamValue
Patch Set: Removed unrelated files Created 4 years, 5 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/cssom/CSSTokenStreamValue.h
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSTokenStreamValue.h b/third_party/WebKit/Source/core/css/cssom/CSSTokenStreamValue.h
index d57e1804e09aa777a04b52bbf57cde16072c53e9..9d1a334a4ea4f474fb0c771fda310a3d2444afb1 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSTokenStreamValue.h
+++ b/third_party/WebKit/Source/core/css/cssom/CSSTokenStreamValue.h
@@ -7,6 +7,7 @@
#include "bindings/core/v8/Iterable.h"
#include "bindings/core/v8/ScriptWrappable.h"
+#include "bindings/core/v8/StringOrCSSVariableReferenceValue.h"
#include "core/CSSPropertyNames.h"
#include "core/CoreExport.h"
#include "core/css/CSSCustomIdentValue.h"
@@ -19,11 +20,11 @@
namespace blink {
-class CORE_EXPORT CSSTokenStreamValue final : public CSSStyleValue, public ValueIterable<String> {
+class CORE_EXPORT CSSTokenStreamValue final : public CSSStyleValue, public ValueIterable<StringOrCSSVariableReferenceValue> {
WTF_MAKE_NONCOPYABLE(CSSTokenStreamValue);
DEFINE_WRAPPERTYPEINFO();
public:
- static CSSTokenStreamValue* create(const Vector<String>& listOfReferences)
+ static CSSTokenStreamValue* create(const HeapVector<StringOrCSSVariableReferenceValue>& listOfReferences)
{
return new CSSTokenStreamValue(listOfReferences);
}
@@ -32,12 +33,18 @@ public:
StyleValueType type() const override { return TokenStreamType; }
- String referenceAtIndex(int index) { return m_listOfReferences.at(index); }
+ StringOrCSSVariableReferenceValue referenceAtIndex(int index) { return m_listOfReferences.at(index); }
size_t size() { return m_listOfReferences.size(); }
+ DEFINE_INLINE_VIRTUAL_TRACE()
+ {
+ visitor->trace(m_listOfReferences);
+ CSSStyleValue::trace(visitor);
+ }
+
protected:
- CSSTokenStreamValue(Vector<String> listOfReferences)
+ CSSTokenStreamValue(const HeapVector<StringOrCSSVariableReferenceValue>& listOfReferences)
: CSSStyleValue()
, m_listOfReferences(listOfReferences)
{
@@ -46,7 +53,7 @@ protected:
private:
IterationSource* startIteration(ScriptState*, ExceptionState&) override;
- Vector<String> m_listOfReferences;
+ HeapVector<StringOrCSSVariableReferenceValue> m_listOfReferences;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698