| OLD | NEW |
| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 PropertyReference propertyAt(unsigned index) const { return PropertyReferenc
e(*this, index); } | 95 PropertyReference propertyAt(unsigned index) const { return PropertyReferenc
e(*this, index); } |
| 96 int findPropertyIndex(CSSPropertyID) const; | 96 int findPropertyIndex(CSSPropertyID) const; |
| 97 | 97 |
| 98 PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValue(CSSPropertyID) const; | 98 PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValue(CSSPropertyID) const; |
| 99 String getPropertyValue(CSSPropertyID) const; | 99 String getPropertyValue(CSSPropertyID) const; |
| 100 | 100 |
| 101 bool propertyIsImportant(CSSPropertyID) const; | 101 bool propertyIsImportant(CSSPropertyID) const; |
| 102 CSSPropertyID getPropertyShorthand(CSSPropertyID) const; | 102 CSSPropertyID getPropertyShorthand(CSSPropertyID) const; |
| 103 bool isPropertyImplicit(CSSPropertyID) const; | 103 bool isPropertyImplicit(CSSPropertyID) const; |
| 104 | 104 |
| 105 PassRefPtr<MutableStylePropertySet> copyBlockProperties() const; | 105 PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyBlockProperties() const; |
| 106 | 106 |
| 107 CSSParserMode cssParserMode() const { return static_cast<CSSParserMode>(m_cs
sParserMode); } | 107 CSSParserMode cssParserMode() const { return static_cast<CSSParserMode>(m_cs
sParserMode); } |
| 108 | 108 |
| 109 PassRefPtr<MutableStylePropertySet> mutableCopy() const; | 109 PassRefPtrWillBeRawPtr<MutableStylePropertySet> mutableCopy() const; |
| 110 PassRefPtr<ImmutableStylePropertySet> immutableCopyIfNeeded() const; | 110 PassRefPtr<ImmutableStylePropertySet> immutableCopyIfNeeded() const; |
| 111 | 111 |
| 112 PassRefPtr<MutableStylePropertySet> copyPropertiesInSet(const Vector<CSSProp
ertyID>&) const; | 112 PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyPropertiesInSet(const Ve
ctor<CSSPropertyID>&) const; |
| 113 | 113 |
| 114 String asText() const; | 114 String asText() const; |
| 115 | 115 |
| 116 bool isMutable() const { return m_isMutable; } | 116 bool isMutable() const { return m_isMutable; } |
| 117 | 117 |
| 118 bool hasFailedOrCanceledSubresources() const; | 118 bool hasFailedOrCanceledSubresources() const; |
| 119 | 119 |
| 120 static unsigned averageSizeInBytes(); | 120 static unsigned averageSizeInBytes(); |
| 121 | 121 |
| 122 #ifndef NDEBUG | 122 #ifndef NDEBUG |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 DEFINE_TYPE_CASTS(ImmutableStylePropertySet, StylePropertySet, set, !set->isMuta
ble(), !set.isMutable()); | 188 DEFINE_TYPE_CASTS(ImmutableStylePropertySet, StylePropertySet, set, !set->isMuta
ble(), !set.isMutable()); |
| 189 | 189 |
| 190 inline ImmutableStylePropertySet* toImmutableStylePropertySet(const RefPtr<Style
PropertySet>& set) | 190 inline ImmutableStylePropertySet* toImmutableStylePropertySet(const RefPtr<Style
PropertySet>& set) |
| 191 { | 191 { |
| 192 return toImmutableStylePropertySet(set.get()); | 192 return toImmutableStylePropertySet(set.get()); |
| 193 } | 193 } |
| 194 | 194 |
| 195 class MutableStylePropertySet : public StylePropertySet { | 195 class MutableStylePropertySet : public StylePropertySet { |
| 196 public: | 196 public: |
| 197 ~MutableStylePropertySet() { } | 197 ~MutableStylePropertySet() { } |
| 198 static PassRefPtr<MutableStylePropertySet> create(CSSParserMode = HTMLQuirks
Mode); | 198 static PassRefPtrWillBeRawPtr<MutableStylePropertySet> create(CSSParserMode
= HTMLQuirksMode); |
| 199 static PassRefPtr<MutableStylePropertySet> create(const CSSProperty* propert
ies, unsigned count); | 199 static PassRefPtrWillBeRawPtr<MutableStylePropertySet> create(const CSSPrope
rty* properties, unsigned count); |
| 200 | 200 |
| 201 unsigned propertyCount() const { return m_propertyVector.size(); } | 201 unsigned propertyCount() const { return m_propertyVector.size(); } |
| 202 | 202 |
| 203 void addParsedProperties(const WillBeHeapVector<CSSProperty, 256>&); | 203 void addParsedProperties(const WillBeHeapVector<CSSProperty, 256>&); |
| 204 void addParsedProperty(const CSSProperty&); | 204 void addParsedProperty(const CSSProperty&); |
| 205 | 205 |
| 206 // These expand shorthand properties into multiple properties. | 206 // These expand shorthand properties into multiple properties. |
| 207 bool setProperty(CSSPropertyID, const String& value, bool important = false,
StyleSheetContents* contextStyleSheet = 0); | 207 bool setProperty(CSSPropertyID, const String& value, bool important = false,
StyleSheetContents* contextStyleSheet = 0); |
| 208 void setProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValue>, bool impor
tant = false); | 208 void setProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValue>, bool impor
tant = false); |
| 209 | 209 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 inline int StylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const | 294 inline int StylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const |
| 295 { | 295 { |
| 296 if (m_isMutable) | 296 if (m_isMutable) |
| 297 return toMutableStylePropertySet(this)->findPropertyIndex(propertyID); | 297 return toMutableStylePropertySet(this)->findPropertyIndex(propertyID); |
| 298 return toImmutableStylePropertySet(this)->findPropertyIndex(propertyID); | 298 return toImmutableStylePropertySet(this)->findPropertyIndex(propertyID); |
| 299 } | 299 } |
| 300 | 300 |
| 301 } // namespace WebCore | 301 } // namespace WebCore |
| 302 | 302 |
| 303 #endif // StylePropertySet_h | 303 #endif // StylePropertySet_h |
| OLD | NEW |