Chromium Code Reviews| Index: Source/core/css/CSSContentDistributionValue.h |
| diff --git a/Source/core/css/CSSContentDistributionValue.h b/Source/core/css/CSSContentDistributionValue.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..feaf22e7691312494d18c3bad83e8c34961fe18b |
| --- /dev/null |
| +++ b/Source/core/css/CSSContentDistributionValue.h |
| @@ -0,0 +1,46 @@ |
| +// Copyright (c) 2014 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 fil |
|
Julien - ping for review
2014/10/28 17:23:05
LICENSE fil? :)
jfernandez
2014/10/29 11:03:04
Done.
|
| + |
| +#ifndef CSSContentDistributionValue_h |
| +#define CSSContentDistributionValue_h |
| + |
| +#include "core/css/CSSValue.h" |
| +#include "core/css/CSSValuePool.h" |
| +#include "wtf/RefPtr.h" |
| + |
| +namespace blink { |
| + |
| +class CSSContentDistributionValue : public CSSValue { |
| +public: |
| + static PassRefPtrWillBeRawPtr<CSSContentDistributionValue> create(CSSValueID distribution, CSSValueID position, CSSValueID overflow) |
| + { |
| + return adoptRefWillBeNoop(new CSSContentDistributionValue(distribution, position, overflow)); |
| + } |
| + ~CSSContentDistributionValue(); |
| + |
| + PassRefPtrWillBeRawPtr<CSSPrimitiveValue> distribution() const { return cssValuePool().createIdentifierValue(m_distribution); } |
| + |
| + PassRefPtrWillBeRawPtr<CSSPrimitiveValue> position() const { return cssValuePool().createIdentifierValue(m_position); } |
| + |
| + PassRefPtrWillBeRawPtr<CSSPrimitiveValue> overflow() const { return cssValuePool().createIdentifierValue(m_overflow); } |
| + |
| + String customCSSText() const; |
| + |
| + bool equals(const CSSContentDistributionValue&) const; |
| + |
| + void traceAfterDispatch(Visitor* visitor) { CSSValue::traceAfterDispatch(visitor); } |
|
Julien - ping for review
2014/10/28 17:23:05
Do we need that as it calls the base class?
jfernandez
2014/10/29 11:03:04
Well, the class doesn't hold any reference to be h
|
| + |
| +private: |
| + explicit CSSContentDistributionValue(CSSValueID distribution, CSSValueID position, CSSValueID overflow); |
| + |
| + CSSValueID m_distribution; |
| + CSSValueID m_position; |
| + CSSValueID m_overflow; |
| +}; |
| + |
| +DEFINE_CSS_VALUE_TYPE_CASTS(CSSContentDistributionValue, isContentDistributionValue()); |
| + |
| +} // namespace blink |
| + |
| +#endif // CSSContentDistributionValue_h |