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

Side by Side Diff: third_party/WebKit/Source/core/css/StylePropertySet.h

Issue 2524303002: Emit console warning when element.animate() keyframe value fails to parse (Closed)
Patch Set: Review changes Created 4 years 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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 static MutableStylePropertySet* create(CSSParserMode); 217 static MutableStylePropertySet* create(CSSParserMode);
218 static MutableStylePropertySet* create(const CSSProperty* properties, 218 static MutableStylePropertySet* create(const CSSProperty* properties,
219 unsigned count); 219 unsigned count);
220 220
221 unsigned propertyCount() const { return m_propertyVector.size(); } 221 unsigned propertyCount() const { return m_propertyVector.size(); }
222 222
223 // Returns whether this style set was changed. 223 // Returns whether this style set was changed.
224 bool addParsedProperties(const HeapVector<CSSProperty, 256>&); 224 bool addParsedProperties(const HeapVector<CSSProperty, 256>&);
225 bool addRespectingCascade(const CSSProperty&); 225 bool addRespectingCascade(const CSSProperty&);
226 226
227 struct SetResult {
228 bool didParse;
229 bool didChange;
230 };
227 // These expand shorthand properties into multiple properties. 231 // These expand shorthand properties into multiple properties.
228 bool setProperty(CSSPropertyID unresolvedProperty, 232 SetResult setProperty(CSSPropertyID unresolvedProperty,
229 const String& value, 233 const String& value,
230 bool important = false, 234 bool important = false,
231 StyleSheetContents* contextStyleSheet = 0); 235 StyleSheetContents* contextStyleSheet = 0);
232 bool setProperty(const AtomicString& customPropertyName, 236 SetResult setProperty(const AtomicString& customPropertyName,
233 const String& value, 237 const String& value,
234 bool important, 238 bool important,
235 StyleSheetContents* contextStyleSheet, 239 StyleSheetContents* contextStyleSheet,
236 bool isAnimationTainted); 240 bool isAnimationTainted);
237 void setProperty(CSSPropertyID, const CSSValue&, bool important = false); 241 void setProperty(CSSPropertyID, const CSSValue&, bool important = false);
238 242
239 // These do not. FIXME: This is too messy, we can do better. 243 // These do not. FIXME: This is too messy, we can do better.
240 bool setProperty(CSSPropertyID, 244 bool setProperty(CSSPropertyID,
241 CSSValueID identifier, 245 CSSValueID identifier,
242 bool important = false); 246 bool important = false);
243 bool setProperty(const CSSProperty&, CSSProperty* slot = 0); 247 bool setProperty(const CSSProperty&, CSSProperty* slot = 0);
244 248
245 template <typename T> // CSSPropertyID or AtomicString 249 template <typename T> // CSSPropertyID or AtomicString
246 bool removeProperty(T property, String* returnText = 0); 250 bool removeProperty(T property, String* returnText = 0);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 template <typename T> 333 template <typename T>
330 inline int StylePropertySet::findPropertyIndex(T property) const { 334 inline int StylePropertySet::findPropertyIndex(T property) const {
331 if (m_isMutable) 335 if (m_isMutable)
332 return toMutableStylePropertySet(this)->findPropertyIndex(property); 336 return toMutableStylePropertySet(this)->findPropertyIndex(property);
333 return toImmutableStylePropertySet(this)->findPropertyIndex(property); 337 return toImmutableStylePropertySet(this)->findPropertyIndex(property);
334 } 338 }
335 339
336 } // namespace blink 340 } // namespace blink
337 341
338 #endif // StylePropertySet_h 342 #endif // StylePropertySet_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698