diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/rendering/style/GridLength.h')
-rw-r--r-- | chromium/third_party/WebKit/Source/core/rendering/style/GridLength.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/chromium/third_party/WebKit/Source/core/rendering/style/GridLength.h b/chromium/third_party/WebKit/Source/core/rendering/style/GridLength.h index dadf7dac255..e822d08ab0b 100644 --- a/chromium/third_party/WebKit/Source/core/rendering/style/GridLength.h +++ b/chromium/third_party/WebKit/Source/core/rendering/style/GridLength.h @@ -40,17 +40,17 @@ namespace WebCore { // an new unit to Length.h. class GridLength { public: - GridLength() - : m_length(Undefined) + GridLength(const Length& length) + : m_length(length) , m_flex(0) , m_type(LengthType) { + ASSERT(!length.isUndefined()); } - GridLength(const Length& length) - : m_length(length) - , m_flex(0) - , m_type(LengthType) + explicit GridLength(double flex) + : m_flex(flex) + , m_type(FlexType) { } @@ -58,14 +58,8 @@ public: bool isFlex() const { return m_type == FlexType; } const Length& length() const { ASSERT(isLength()); return m_length; } - Length& length() { ASSERT(isLength()); return m_length; } double flex() const { ASSERT(isFlex()); return m_flex; } - void setFlex(double flex) - { - m_type = FlexType; - m_flex = flex; - } bool operator==(const GridLength& o) const { |