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

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

Issue 1094003002: CSSStyleDeclaration::setProperty should override important style (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review feedback Created 5 years, 8 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 class CORE_EXPORT MutableStylePropertySet : public StylePropertySet { 190 class CORE_EXPORT MutableStylePropertySet : public StylePropertySet {
191 public: 191 public:
192 ~MutableStylePropertySet() { } 192 ~MutableStylePropertySet() { }
193 static PassRefPtrWillBeRawPtr<MutableStylePropertySet> create(CSSParserMode = HTMLQuirksMode); 193 static PassRefPtrWillBeRawPtr<MutableStylePropertySet> create(CSSParserMode = HTMLQuirksMode);
194 static PassRefPtrWillBeRawPtr<MutableStylePropertySet> create(const CSSPrope rty* properties, unsigned count); 194 static PassRefPtrWillBeRawPtr<MutableStylePropertySet> create(const CSSPrope rty* properties, unsigned count);
195 195
196 unsigned propertyCount() const { return m_propertyVector.size(); } 196 unsigned propertyCount() const { return m_propertyVector.size(); }
197 197
198 // Returns whether this style set was changed. 198 // Returns whether this style set was changed.
199 bool addParsedProperties(const WillBeHeapVector<CSSProperty, 256>&); 199 bool addParsedProperties(const WillBeHeapVector<CSSProperty, 256>&);
200 bool addParsedProperty(const CSSProperty&); 200 bool addRespectingCascade(const CSSProperty&);
201 201
202 // These expand shorthand properties into multiple properties. 202 // These expand shorthand properties into multiple properties.
203 bool setProperty(CSSPropertyID unresolvedProperty, const String& value, bool important = false, StyleSheetContents* contextStyleSheet = 0); 203 bool setProperty(CSSPropertyID unresolvedProperty, const String& value, bool important = false, StyleSheetContents* contextStyleSheet = 0);
204 void setProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValue>, bool impor tant = false); 204 void setProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValue>, bool impor tant = false);
205 205
206 // These do not. FIXME: This is too messy, we can do better. 206 // These do not. FIXME: This is too messy, we can do better.
207 bool setProperty(CSSPropertyID, CSSValueID identifier, bool important = fals e); 207 bool setProperty(CSSPropertyID, CSSValueID identifier, bool important = fals e);
208 bool setProperty(const CSSProperty&, CSSProperty* slot = 0); 208 bool setProperty(const CSSProperty&, CSSProperty* slot = 0);
209 209
210 bool removeProperty(CSSPropertyID, String* returnText = 0); 210 bool removeProperty(CSSPropertyID, String* returnText = 0);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 inline int StylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const 296 inline int StylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const
297 { 297 {
298 if (m_isMutable) 298 if (m_isMutable)
299 return toMutableStylePropertySet(this)->findPropertyIndex(propertyID); 299 return toMutableStylePropertySet(this)->findPropertyIndex(propertyID);
300 return toImmutableStylePropertySet(this)->findPropertyIndex(propertyID); 300 return toImmutableStylePropertySet(this)->findPropertyIndex(propertyID);
301 } 301 }
302 302
303 } // namespace blink 303 } // namespace blink
304 304
305 #endif // StylePropertySet_h 305 #endif // StylePropertySet_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/important-js-override-expected.txt ('k') | Source/core/css/StylePropertySet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698