Index: Source/core/rendering/style/GridPosition.h |
diff --git a/Source/core/rendering/style/GridPosition.h b/Source/core/rendering/style/GridPosition.h |
index a099c4fab0d587db1bc3955231007ddaa50dbdda..ae93e5d0b997acbfda4a0e1b9f083ded2dfdc313 100644 |
--- a/Source/core/rendering/style/GridPosition.h |
+++ b/Source/core/rendering/style/GridPosition.h |
@@ -31,11 +31,13 @@ |
#ifndef GridPosition_h |
#define GridPosition_h |
+#include "wtf/text/WTFString.h" |
+ |
namespace WebCore { |
enum GridPositionType { |
AutoPosition, |
- IntegerPosition, |
+ ExplicitPosition, // [ <integer> || <string> ] |
SpanPosition |
}; |
@@ -51,13 +53,13 @@ public: |
GridPositionType type() const { return m_type; } |
bool isAuto() const { return m_type == AutoPosition; } |
- bool isInteger() const { return m_type == IntegerPosition; } |
bool isSpan() const { return m_type == SpanPosition; } |
- void setIntegerPosition(int position) |
+ void setExplicitPosition(int position, const String& namedGridLine) |
{ |
- m_type = IntegerPosition; |
+ m_type = ExplicitPosition; |
m_integerPosition = position; |
+ m_namedGridLine = namedGridLine; |
} |
// 'span' values cannot be negative, yet we reuse the <integer> position which can |
@@ -71,10 +73,16 @@ public: |
int integerPosition() const |
{ |
- ASSERT(type() == IntegerPosition); |
+ ASSERT(type() == ExplicitPosition); |
return m_integerPosition; |
} |
+ String namedGridLine() const |
+ { |
+ ASSERT(type() == ExplicitPosition); |
+ return m_namedGridLine; |
+ } |
+ |
int spanPosition() const |
{ |
ASSERT(type() == SpanPosition); |
@@ -93,6 +101,7 @@ public: |
private: |
GridPositionType m_type; |
int m_integerPosition; |
+ String m_namedGridLine; |
}; |
} // namespace WebCore |