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

Side by Side Diff: Source/core/css/resolver/StyleBuilderConverter.h

Issue 1307673003: Made CSSPrimitiveValue::getString() only work for String types (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@split_out_pair
Patch Set: Small fix 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * * Redistributions of source code must retain the above copyright 4 * * Redistributions of source code must retain the above copyright
5 * notice, this list of conditions and the following disclaimer. 5 * notice, this list of conditions and the following disclaimer.
6 * * Redistributions in binary form must reproduce the above 6 * * Redistributions in binary form must reproduce the above
7 * copyright notice, this list of conditions and the following disclaimer 7 * copyright notice, this list of conditions and the following disclaimer
8 * in the documentation and/or other materials provided with the 8 * in the documentation and/or other materials provided with the
9 * distribution. 9 * distribution.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 ASSERT_NOT_REACHED(); 150 ASSERT_NOT_REACHED();
151 return 0; 151 return 0;
152 } 152 }
153 153
154 template <CSSValueID IdForNone> 154 template <CSSValueID IdForNone>
155 AtomicString StyleBuilderConverter::convertString(StyleResolverState&, CSSValue* value) 155 AtomicString StyleBuilderConverter::convertString(StyleResolverState&, CSSValue* value)
156 { 156 {
157 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 157 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
158 if (primitiveValue->getValueID() == IdForNone) 158 if (primitiveValue->getValueID() == IdForNone)
159 return nullAtom; 159 return nullAtom;
160 ASSERT(primitiveValue->isString());
160 return AtomicString(primitiveValue->getStringValue()); 161 return AtomicString(primitiveValue->getStringValue());
161 } 162 }
162 163
163 } // namespace blink 164 } // namespace blink
164 165
165 #endif 166 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698