| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 CSSPrimitiveValue::create(token.numericValue(), type), token.numeric
ValueType() == IntegerValueType); | 629 CSSPrimitiveValue::create(token.numericValue(), type), token.numeric
ValueType() == IntegerValueType); |
| 630 | 630 |
| 631 return true; | 631 return true; |
| 632 } | 632 } |
| 633 | 633 |
| 634 bool parseValueTerm(CSSParserTokenRange& tokens, int depth, Value* result) | 634 bool parseValueTerm(CSSParserTokenRange& tokens, int depth, Value* result) |
| 635 { | 635 { |
| 636 if (checkDepthAndIndex(&depth, tokens) != OK) | 636 if (checkDepthAndIndex(&depth, tokens) != OK) |
| 637 return false; | 637 return false; |
| 638 | 638 |
| 639 if (tokens.peek().type() == LeftParenthesisToken) { | 639 if (tokens.peek().type() == LeftParenthesisToken || tokens.peek().functi
onId() == CSSValueCalc) { |
| 640 CSSParserTokenRange innerRange = tokens.consumeBlock(); | 640 CSSParserTokenRange innerRange = tokens.consumeBlock(); |
| 641 tokens.consumeWhitespace(); | 641 tokens.consumeWhitespace(); |
| 642 innerRange.consumeWhitespace(); | 642 innerRange.consumeWhitespace(); |
| 643 return parseValueExpression(innerRange, depth, result); | 643 return parseValueExpression(innerRange, depth, result); |
| 644 } | 644 } |
| 645 | 645 |
| 646 return parseValue(tokens, result); | 646 return parseValue(tokens, result); |
| 647 } | 647 } |
| 648 | 648 |
| 649 bool parseValueMultiplicativeExpression(CSSParserTokenRange& tokens, int dep
th, Value* result) | 649 bool parseValueMultiplicativeExpression(CSSParserTokenRange& tokens, int dep
th, Value* result) |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 | 734 |
| 735 return expression ? new CSSCalcValue(expression, range) : nullptr; | 735 return expression ? new CSSCalcValue(expression, range) : nullptr; |
| 736 } | 736 } |
| 737 | 737 |
| 738 RawPtr<CSSCalcValue> CSSCalcValue::create(RawPtr<CSSCalcExpressionNode> expressi
on, ValueRange range) | 738 RawPtr<CSSCalcValue> CSSCalcValue::create(RawPtr<CSSCalcExpressionNode> expressi
on, ValueRange range) |
| 739 { | 739 { |
| 740 return new CSSCalcValue(expression, range); | 740 return new CSSCalcValue(expression, range); |
| 741 } | 741 } |
| 742 | 742 |
| 743 } // namespace blink | 743 } // namespace blink |
| OLD | NEW |