| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/css/parser/SizesCalcParser.h" | 6 #include "core/css/parser/SizesCalcParser.h" |
| 7 | 7 |
| 8 #include "core/css/MediaValues.h" | 8 #include "core/css/MediaValues.h" |
| 9 #include "core/css/parser/CSSParserToken.h" | 9 #include "core/css/parser/CSSParserToken.h" |
| 10 | 10 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // If the stack runs out without finding a left parenthesis, then th
ere are mismatched parentheses. | 123 // If the stack runs out without finding a left parenthesis, then th
ere are mismatched parentheses. |
| 124 if (stack.isEmpty()) | 124 if (stack.isEmpty()) |
| 125 return false; | 125 return false; |
| 126 // Pop the left parenthesis from the stack, but not onto the output
queue. | 126 // Pop the left parenthesis from the stack, but not onto the output
queue. |
| 127 stack.removeLast(); | 127 stack.removeLast(); |
| 128 break; | 128 break; |
| 129 case CommentToken: | 129 case CommentToken: |
| 130 case WhitespaceToken: | 130 case WhitespaceToken: |
| 131 case EOFToken: | 131 case EOFToken: |
| 132 break; | 132 break; |
| 133 case CDOToken: |
| 134 case CDCToken: |
| 133 case AtKeywordToken: | 135 case AtKeywordToken: |
| 134 case HashToken: | 136 case HashToken: |
| 135 case UrlToken: | 137 case UrlToken: |
| 136 case BadUrlToken: | 138 case BadUrlToken: |
| 137 case PercentageToken: | 139 case PercentageToken: |
| 138 case IncludeMatchToken: | 140 case IncludeMatchToken: |
| 139 case DashMatchToken: | 141 case DashMatchToken: |
| 140 case PrefixMatchToken: | 142 case PrefixMatchToken: |
| 141 case SuffixMatchToken: | 143 case SuffixMatchToken: |
| 142 case SubstringMatchToken: | 144 case SubstringMatchToken: |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 } | 223 } |
| 222 } | 224 } |
| 223 if (stack.size() == 1 && stack.last().isLength) { | 225 if (stack.size() == 1 && stack.last().isLength) { |
| 224 m_result = std::max(clampTo<float>(stack.last().value), (float)0.0); | 226 m_result = std::max(clampTo<float>(stack.last().value), (float)0.0); |
| 225 return true; | 227 return true; |
| 226 } | 228 } |
| 227 return false; | 229 return false; |
| 228 } | 230 } |
| 229 | 231 |
| 230 } // namespace blink | 232 } // namespace blink |
| OLD | NEW |