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

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

Issue 2042653002: Make CSSPropertyParser::addProperty take a const CSSValue& (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_make_cssvaluelist_and_computedstylemapping_store_const
Patch Set: Rebase Created 4 years, 5 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 * (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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 unsigned propertyCount() const { return m_propertyVector.size(); } 197 unsigned propertyCount() const { return m_propertyVector.size(); }
198 198
199 // Returns whether this style set was changed. 199 // Returns whether this style set was changed.
200 bool addParsedProperties(const HeapVector<CSSProperty, 256>&); 200 bool addParsedProperties(const HeapVector<CSSProperty, 256>&);
201 bool addRespectingCascade(const CSSProperty&); 201 bool addRespectingCascade(const CSSProperty&);
202 202
203 // These expand shorthand properties into multiple properties. 203 // These expand shorthand properties into multiple properties.
204 bool setProperty(CSSPropertyID unresolvedProperty, const String& value, bool important = false, StyleSheetContents* contextStyleSheet = 0); 204 bool setProperty(CSSPropertyID unresolvedProperty, const String& value, bool important = false, StyleSheetContents* contextStyleSheet = 0);
205 bool setProperty(const AtomicString& customPropertyName, const String& value , bool important = false, StyleSheetContents* contextStyleSheet = 0); 205 bool setProperty(const AtomicString& customPropertyName, const String& value , bool important = false, StyleSheetContents* contextStyleSheet = 0);
206 void setProperty(CSSPropertyID, CSSValue*, bool important = false); 206 void setProperty(CSSPropertyID, const CSSValue*, bool important = false);
207 207
208 // These do not. FIXME: This is too messy, we can do better. 208 // These do not. FIXME: This is too messy, we can do better.
209 bool setProperty(CSSPropertyID, CSSValueID identifier, bool important = fals e); 209 bool setProperty(CSSPropertyID, CSSValueID identifier, bool important = fals e);
210 bool setProperty(const CSSProperty&, CSSProperty* slot = 0); 210 bool setProperty(const CSSProperty&, CSSProperty* slot = 0);
211 211
212 template<typename T> // CSSPropertyID or AtomicString 212 template<typename T> // CSSPropertyID or AtomicString
213 bool removeProperty(T property, String* returnText = 0); 213 bool removeProperty(T property, String* returnText = 0);
214 bool removePropertiesInSet(const CSSPropertyID* set, unsigned length); 214 bool removePropertiesInSet(const CSSPropertyID* set, unsigned length);
215 void removeEquivalentProperties(const StylePropertySet*); 215 void removeEquivalentProperties(const StylePropertySet*);
216 void removeEquivalentProperties(const CSSStyleDeclaration*); 216 void removeEquivalentProperties(const CSSStyleDeclaration*);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 inline int StylePropertySet::findPropertyIndex(T property) const 286 inline int StylePropertySet::findPropertyIndex(T property) const
287 { 287 {
288 if (m_isMutable) 288 if (m_isMutable)
289 return toMutableStylePropertySet(this)->findPropertyIndex(property); 289 return toMutableStylePropertySet(this)->findPropertyIndex(property);
290 return toImmutableStylePropertySet(this)->findPropertyIndex(property); 290 return toImmutableStylePropertySet(this)->findPropertyIndex(property);
291 } 291 }
292 292
293 } // namespace blink 293 } // namespace blink
294 294
295 #endif // StylePropertySet_h 295 #endif // StylePropertySet_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/StringKeyframe.cpp ('k') | third_party/WebKit/Source/core/css/StylePropertySet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698