Chromium Code Reviews| 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 |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..afed3e8d7e81c9f6e44c956f4ab150d92686ef02 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/css/cssom/CSSTokenStreamValue.h |
| @@ -0,0 +1,57 @@ |
| +#ifndef CSSTokenStreamValue_h |
| +#define CSSTokenStreamValue_h |
| + |
| +#include "bindings/core/v8/Iterable.h" |
| +#include "bindings/core/v8/ScriptWrappable.h" |
| +#include "core/CSSPropertyNames.h" |
| +#include "core/CoreExport.h" |
| +#include "core/css/CSSCustomIdentValue.h" |
| +#include "core/css/CSSPrimitiveValue.h" |
| +#include "core/css/cssom/CSSStyleValue.h" |
| +#include "core/css/parser/CSSParserTokenRange.h" |
| +#include "core/css/parser/CSSPropertyParser.h" |
| +#include "platform/heap/HeapAllocator.h" |
| +#include "wtf/Vector.h" |
| + |
| +namespace blink { |
| + |
| +class CORE_EXPORT CSSTokenStreamValueObserver : public GarbageCollectedMixin { |
|
meade_UTC10
2016/07/07 05:48:02
What's this class for? It doesn't seem to be used
anthonyhkf
2016/07/07 08:01:45
Done.
|
| +public: |
| + virtual void valueWasSet() = 0; |
| + |
| + DEFINE_INLINE_VIRTUAL_TRACE() { } |
| +}; |
| + |
| +class CORE_EXPORT CSSTokenStreamValue final : public CSSStyleValue, |
| + public ValueIterable<String> { |
|
meade_UTC10
2016/07/07 05:48:02
This can be on the previous line (blink doesn't ha
anthonyhkf
2016/07/07 08:01:45
Done.
|
| + WTF_MAKE_NONCOPYABLE(CSSTokenStreamValue); |
| + DEFINE_WRAPPERTYPEINFO(); |
| +public: |
| + static CSSTokenStreamValue* create(const Vector<String>& listOfReferences) |
| + { |
| + return new CSSTokenStreamValue(listOfReferences); |
| + } |
| + |
| + CSSValue* toCSSValue() const override; |
| + |
| + StyleValueType type() const override { return TokenStreamType; } |
| + |
| + String componentAtIndex(int index) { return m_listOfReferences.at(index); } |
|
meade_UTC10
2016/07/07 05:48:02
Can this be renamed to referenceAtIndex or somethi
anthonyhkf
2016/07/07 08:01:45
Done.
|
| + |
| + Vector<String> listOfReferences() const { return m_listOfReferences; } |
|
meade_UTC10
2016/07/07 05:48:02
Is this function used anywhere?
anthonyhkf
2016/07/07 08:01:45
Done.
|
| + |
| + size_t size() { return m_listOfReferences.size(); } |
| + |
| +protected: |
| + CSSTokenStreamValue(Vector<String> listOfReferences) : CSSStyleValue(), |
| + m_listOfReferences(listOfReferences) { } |
|
meade_UTC10
2016/07/07 05:48:02
Constructor line breaking should be like this:
My
anthonyhkf
2016/07/07 08:01:45
Done.
|
| + |
| +private: |
| + IterationSource* startIteration(ScriptState*, ExceptionState&) override; |
| + |
| + Vector<String> m_listOfReferences; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // CSSTokenStreamValue_h |