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

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

Issue 2346193002: Split CSSPrimitiveValue into CSSPrimitiveValue and CSSIdentifierValue (Closed)
Patch Set: Rebase please work 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 case CSSPrimitiveValue::UnitType::DotsPerCentimeter: 118 case CSSPrimitiveValue::UnitType::DotsPerCentimeter:
119 case CSSPrimitiveValue::UnitType::Fraction: 119 case CSSPrimitiveValue::UnitType::Fraction:
120 case CSSPrimitiveValue::UnitType::Integer: 120 case CSSPrimitiveValue::UnitType::Integer:
121 return true; 121 return true;
122 case CSSPrimitiveValue::UnitType::Unknown: 122 case CSSPrimitiveValue::UnitType::Unknown:
123 case CSSPrimitiveValue::UnitType::Calc: 123 case CSSPrimitiveValue::UnitType::Calc:
124 case CSSPrimitiveValue::UnitType::CalcPercentageWithNumber: 124 case CSSPrimitiveValue::UnitType::CalcPercentageWithNumber:
125 case CSSPrimitiveValue::UnitType::CalcPercentageWithLength: 125 case CSSPrimitiveValue::UnitType::CalcPercentageWithLength:
126 case CSSPrimitiveValue::UnitType::CalcLengthWithNumber: 126 case CSSPrimitiveValue::UnitType::CalcLengthWithNumber:
127 case CSSPrimitiveValue::UnitType::CalcPercentageWithLengthAndNumber: 127 case CSSPrimitiveValue::UnitType::CalcPercentageWithLengthAndNumber:
128 case CSSPrimitiveValue::UnitType::ValueID:
129 case CSSPrimitiveValue::UnitType::QuirkyEms: 128 case CSSPrimitiveValue::UnitType::QuirkyEms:
130 return false; 129 return false;
131 }; 130 };
132 ASSERT_NOT_REACHED(); 131 ASSERT_NOT_REACHED();
133 return false; 132 return false;
134 } 133 }
135 134
136 static String buildCSSText(const String& expression) 135 static String buildCSSText(const String& expression)
137 { 136 {
138 StringBuilder result; 137 StringBuilder result;
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 745
747 return expression ? new CSSCalcValue(expression, range) : nullptr; 746 return expression ? new CSSCalcValue(expression, range) : nullptr;
748 } 747 }
749 748
750 CSSCalcValue* CSSCalcValue::create(CSSCalcExpressionNode* expression, ValueRange range) 749 CSSCalcValue* CSSCalcValue::create(CSSCalcExpressionNode* expression, ValueRange range)
751 { 750 {
752 return new CSSCalcValue(expression, range); 751 return new CSSCalcValue(expression, range);
753 } 752 }
754 753
755 } // namespace blink 754 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698