Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1475)

Side by Side Diff: third_party/WebKit/Source/core/css/CSSCalculationValue.cpp

Issue 2382653006: Split CSSPrimitiveValue into CSSPrimitiveValue and CSSIdentifierValue (Closed)
Patch Set: Make check-webkit-style happy Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 case CSSPrimitiveValue::UnitType::DotsPerCentimeter: 112 case CSSPrimitiveValue::UnitType::DotsPerCentimeter:
113 case CSSPrimitiveValue::UnitType::Fraction: 113 case CSSPrimitiveValue::UnitType::Fraction:
114 case CSSPrimitiveValue::UnitType::Integer: 114 case CSSPrimitiveValue::UnitType::Integer:
115 return true; 115 return true;
116 case CSSPrimitiveValue::UnitType::Unknown: 116 case CSSPrimitiveValue::UnitType::Unknown:
117 case CSSPrimitiveValue::UnitType::Calc: 117 case CSSPrimitiveValue::UnitType::Calc:
118 case CSSPrimitiveValue::UnitType::CalcPercentageWithNumber: 118 case CSSPrimitiveValue::UnitType::CalcPercentageWithNumber:
119 case CSSPrimitiveValue::UnitType::CalcPercentageWithLength: 119 case CSSPrimitiveValue::UnitType::CalcPercentageWithLength:
120 case CSSPrimitiveValue::UnitType::CalcLengthWithNumber: 120 case CSSPrimitiveValue::UnitType::CalcLengthWithNumber:
121 case CSSPrimitiveValue::UnitType::CalcPercentageWithLengthAndNumber: 121 case CSSPrimitiveValue::UnitType::CalcPercentageWithLengthAndNumber:
122 case CSSPrimitiveValue::UnitType::ValueID:
123 case CSSPrimitiveValue::UnitType::QuirkyEms: 122 case CSSPrimitiveValue::UnitType::QuirkyEms:
124 return false; 123 return false;
125 }; 124 };
126 ASSERT_NOT_REACHED(); 125 ASSERT_NOT_REACHED();
127 return false; 126 return false;
128 } 127 }
129 128
130 static String buildCSSText(const String& expression) { 129 static String buildCSSText(const String& expression) {
131 StringBuilder result; 130 StringBuilder result;
132 result.append("calc"); 131 result.append("calc");
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 812
814 return expression ? new CSSCalcValue(expression, range) : nullptr; 813 return expression ? new CSSCalcValue(expression, range) : nullptr;
815 } 814 }
816 815
817 CSSCalcValue* CSSCalcValue::create(CSSCalcExpressionNode* expression, 816 CSSCalcValue* CSSCalcValue::create(CSSCalcExpressionNode* expression,
818 ValueRange range) { 817 ValueRange range) {
819 return new CSSCalcValue(expression, range); 818 return new CSSCalcValue(expression, range);
820 } 819 }
821 820
822 } // namespace blink 821 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698