| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 case CSSPrimitiveValue::UnitType::QuirkyEms: | 128 case CSSPrimitiveValue::UnitType::QuirkyEms: |
| 129 return false; | 129 return false; |
| 130 }; | 130 }; |
| 131 ASSERT_NOT_REACHED(); | 131 ASSERT_NOT_REACHED(); |
| 132 return false; | 132 return false; |
| 133 } | 133 } |
| 134 | 134 |
| 135 static String buildCSSText(const String& expression) | 135 static String buildCSSText(const String& expression) |
| 136 { | 136 { |
| 137 StringBuilder result; | 137 StringBuilder result; |
| 138 result.appendLiteral("calc"); | 138 result.append("calc"); |
| 139 bool expressionHasSingleTerm = expression[0] != '('; | 139 bool expressionHasSingleTerm = expression[0] != '('; |
| 140 if (expressionHasSingleTerm) | 140 if (expressionHasSingleTerm) |
| 141 result.append('('); | 141 result.append('('); |
| 142 result.append(expression); | 142 result.append(expression); |
| 143 if (expressionHasSingleTerm) | 143 if (expressionHasSingleTerm) |
| 144 result.append(')'); | 144 result.append(')'); |
| 145 return result.toString(); | 145 return result.toString(); |
| 146 } | 146 } |
| 147 | 147 |
| 148 String CSSCalcValue::customCSSText() const | 148 String CSSCalcValue::customCSSText() const |
| (...skipping 585 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 CSSCalcValue* CSSCalcValue::create(CSSCalcExpressionNode* expression, ValueRange
range) | 738 CSSCalcValue* CSSCalcValue::create(CSSCalcExpressionNode* expression, 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 |