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

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

Issue 1192983003: CSS Custom Properties (Variables) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Post-merge Created 5 years, 3 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 | Annotate | Revision Log
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 case CSSPrimitiveValue::UnitType::String: 124 case CSSPrimitiveValue::UnitType::String:
125 case CSSPrimitiveValue::UnitType::URI: 125 case CSSPrimitiveValue::UnitType::URI:
126 case CSSPrimitiveValue::UnitType::RGBColor: 126 case CSSPrimitiveValue::UnitType::RGBColor:
127 case CSSPrimitiveValue::UnitType::Shape: 127 case CSSPrimitiveValue::UnitType::Shape:
128 case CSSPrimitiveValue::UnitType::Calc: 128 case CSSPrimitiveValue::UnitType::Calc:
129 case CSSPrimitiveValue::UnitType::CalcPercentageWithNumber: 129 case CSSPrimitiveValue::UnitType::CalcPercentageWithNumber:
130 case CSSPrimitiveValue::UnitType::CalcPercentageWithLength: 130 case CSSPrimitiveValue::UnitType::CalcPercentageWithLength:
131 case CSSPrimitiveValue::UnitType::PropertyID: 131 case CSSPrimitiveValue::UnitType::PropertyID:
132 case CSSPrimitiveValue::UnitType::ValueID: 132 case CSSPrimitiveValue::UnitType::ValueID:
133 case CSSPrimitiveValue::UnitType::QuirkyEms: 133 case CSSPrimitiveValue::UnitType::QuirkyEms:
134 case CSSPrimitiveValue::UnitType::VariableReference:
134 return false; 135 return false;
135 }; 136 };
136 ASSERT_NOT_REACHED(); 137 ASSERT_NOT_REACHED();
137 return false; 138 return false;
138 } 139 }
139 140
140 static String buildCSSText(const String& expression) 141 static String buildCSSText(const String& expression)
141 { 142 {
142 StringBuilder result; 143 StringBuilder result;
143 result.appendLiteral("calc"); 144 result.appendLiteral("calc");
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 742
742 return expression ? adoptRefWillBeNoop(new CSSCalcValue(expression, range)) : nullptr; 743 return expression ? adoptRefWillBeNoop(new CSSCalcValue(expression, range)) : nullptr;
743 } 744 }
744 745
745 PassRefPtrWillBeRawPtr<CSSCalcValue> CSSCalcValue::create(PassRefPtrWillBeRawPtr <CSSCalcExpressionNode> expression, ValueRange range) 746 PassRefPtrWillBeRawPtr<CSSCalcValue> CSSCalcValue::create(PassRefPtrWillBeRawPtr <CSSCalcExpressionNode> expression, ValueRange range)
746 { 747 {
747 return adoptRefWillBeNoop(new CSSCalcValue(expression, range)); 748 return adoptRefWillBeNoop(new CSSCalcValue(expression, range));
748 } 749 }
749 750
750 } // namespace blink 751 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698