Chromium Code Reviews| Index: Source/core/css/parser/CSSPropertyParser.cpp |
| diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp |
| index 3549b5168fcf4f247fabc8b397e1aeb0212271be..d2c34ec737d51f8413ff25422e7928003db4cd77 100644 |
| --- a/Source/core/css/parser/CSSPropertyParser.cpp |
| +++ b/Source/core/css/parser/CSSPropertyParser.cpp |
| @@ -5644,7 +5644,7 @@ public: |
| , m_allowImageSlice(true) |
| , m_allowRepeat(true) |
| , m_allowForwardSlashOperator(false) |
| - , m_requireWidth(false) |
| + , m_allowWidth(false) |
| , m_requireOutset(false) |
| {} |
| @@ -5657,7 +5657,7 @@ public: |
| bool allowRepeat() const { return m_allowRepeat; } |
| bool allowForwardSlashOperator() const { return m_allowForwardSlashOperator; } |
| - bool requireWidth() const { return m_requireWidth; } |
| + bool allowWidth() const { return m_allowWidth; } |
| bool requireOutset() const { return m_requireOutset; } |
| void commitImage(PassRefPtrWillBeRawPtr<CSSValue> image) |
| @@ -5665,7 +5665,7 @@ public: |
| m_image = image; |
| m_canAdvance = true; |
| m_allowCommit = true; |
| - m_allowImage = m_allowForwardSlashOperator = m_requireWidth = m_requireOutset = false; |
| + m_allowImage = m_allowForwardSlashOperator = m_allowWidth = m_requireOutset = false; |
| m_allowImageSlice = !m_imageSlice; |
| m_allowRepeat = !m_repeat; |
| } |
| @@ -5674,20 +5674,22 @@ public: |
| m_imageSlice = slice; |
| m_canAdvance = true; |
| m_allowCommit = m_allowForwardSlashOperator = true; |
| - m_allowImageSlice = m_requireWidth = m_requireOutset = false; |
| + m_allowImageSlice = m_allowWidth = m_requireOutset = false; |
| m_allowImage = !m_image; |
| m_allowRepeat = !m_repeat; |
| } |
| void commitForwardSlashOperator() |
| { |
| m_canAdvance = true; |
| - m_allowCommit = m_allowImage = m_allowImageSlice = m_allowRepeat = m_allowForwardSlashOperator = false; |
| - if (!m_borderWidth) { |
| - m_requireWidth = true; |
| + m_allowCommit = m_allowImage = m_allowImageSlice = m_allowRepeat = false; |
| + if (!m_borderWidth && !m_allowWidth) { |
| + m_allowForwardSlashOperator = true; |
| + m_allowWidth = true; |
| m_requireOutset = false; |
| } else { |
| + m_allowForwardSlashOperator = false; |
| m_requireOutset = true; |
| - m_requireWidth = false; |
| + m_allowWidth = false; |
| } |
| } |
| void commitBorderWidth(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> width) |
| @@ -5695,7 +5697,7 @@ public: |
| m_borderWidth = width; |
| m_canAdvance = true; |
| m_allowCommit = m_allowForwardSlashOperator = true; |
| - m_allowImageSlice = m_requireWidth = m_requireOutset = false; |
| + m_allowImageSlice = m_allowWidth = m_requireOutset = false; |
| m_allowImage = !m_image; |
| m_allowRepeat = !m_repeat; |
| } |
| @@ -5704,7 +5706,7 @@ public: |
| m_outset = outset; |
| m_canAdvance = true; |
| m_allowCommit = true; |
| - m_allowImageSlice = m_allowForwardSlashOperator = m_requireWidth = m_requireOutset = false; |
| + m_allowImageSlice = m_allowForwardSlashOperator = m_allowWidth = m_requireOutset = false; |
| m_allowImage = !m_image; |
| m_allowRepeat = !m_repeat; |
| } |
| @@ -5713,7 +5715,7 @@ public: |
| m_repeat = repeat; |
| m_canAdvance = true; |
| m_allowCommit = true; |
| - m_allowRepeat = m_allowForwardSlashOperator = m_requireWidth = m_requireOutset = false; |
| + m_allowRepeat = m_allowForwardSlashOperator = m_allowWidth = m_requireOutset = false; |
|
esprehn
2014/11/20 22:54:06
One assignment per line.
je_julie(Not used)
2014/11/21 08:36:38
Done.
|
| m_allowImageSlice = !m_imageSlice; |
| m_allowImage = !m_image; |
| } |
| @@ -5759,7 +5761,7 @@ public: |
| bool m_allowRepeat; |
| bool m_allowForwardSlashOperator; |
| - bool m_requireWidth; |
| + bool m_allowWidth; |
| bool m_requireOutset; |
| RefPtrWillBeMember<CSSValue> m_image; |
| @@ -5810,7 +5812,7 @@ bool BorderImageParseContext::buildFromParser(CSSPropertyParser& parser, CSSProp |
| context.commitRepeat(repeat.release()); |
| } |
| - if (!context.canAdvance() && context.requireWidth()) { |
| + if (!context.canAdvance() && context.allowWidth()) { |
| RefPtrWillBeRawPtr<CSSPrimitiveValue> borderWidth = nullptr; |
| if (parser.parseBorderImageWidth(borderWidth)) |
| context.commitBorderWidth(borderWidth.release()); |