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..92bf47625cc860c282db2579061f82bb5fae4992 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,14 @@ public: |
GridPositionType type() const { return m_type; } |
bool isAuto() const { return m_type == AutoPosition; } |
- bool isInteger() const { return m_type == IntegerPosition; } |
+ bool isExplicit() const { return m_type == ExplicitPosition; } |
esprehn
2013/05/14 21:52:27
So nothing actually calls this?
Julien - ping for review
2013/05/14 22:51:11
Indeed, the only place calling isInteger was CSSCo
|
bool isSpan() const { return m_type == SpanPosition; } |
- void setIntegerPosition(int position) |
+ void setExplicitPosition(int position, const String& namedGridLine) |
esprehn
2013/05/14 21:52:27
We don't need to keep these in a map somewhere?
Julien - ping for review
2013/05/14 22:51:11
We do but not these ones specifically. This is the
|
{ |
- 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 +74,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 +102,7 @@ public: |
private: |
GridPositionType m_type; |
int m_integerPosition; |
+ String m_namedGridLine; |
}; |
} // namespace WebCore |