diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-25 15:09:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-25 15:09:11 +0200 |
commit | a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd (patch) | |
tree | b7abd9f49ae1d4d2e426a5883bfccd42b8e2ee12 /Source/WebCore/css/StylePropertySet.h | |
parent | 8d473cf9743f1d30a16a27114e93bd5af5648d23 (diff) | |
download | qtwebkit-a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd.tar.gz |
Imported WebKit commit eb5c1b8fe4d4b1b90b5137433fc58a91da0e6878 (http://svn.webkit.org/repository/webkit/trunk@118516)
Diffstat (limited to 'Source/WebCore/css/StylePropertySet.h')
-rw-r--r-- | Source/WebCore/css/StylePropertySet.h | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/Source/WebCore/css/StylePropertySet.h b/Source/WebCore/css/StylePropertySet.h index d500398d0..e14f89c3f 100644 --- a/Source/WebCore/css/StylePropertySet.h +++ b/Source/WebCore/css/StylePropertySet.h @@ -37,7 +37,9 @@ class KURL; class PropertySetCSSStyleDeclaration; class StyledElement; class StylePropertyShorthand; -class StyleSheetInternal; +class StyleSheetContents; + +typedef Vector<CSSProperty, 4> StylePropertyVector; class StylePropertySet : public RefCounted<StylePropertySet> { public: @@ -47,13 +49,9 @@ public: { return adoptRef(new StylePropertySet(cssParserMode)); } - static PassRefPtr<StylePropertySet> create(const CSSProperty* properties, int numProperties, CSSParserMode cssParserMode) - { - return adoptRef(new StylePropertySet(properties, numProperties, cssParserMode)); - } - static PassRefPtr<StylePropertySet> create(const Vector<CSSProperty>& properties) + static PassRefPtr<StylePropertySet> adopt(StylePropertyVector& properties, CSSParserMode cssParserMode = CSSStrictMode) { - return adoptRef(new StylePropertySet(properties)); + return adoptRef(new StylePropertySet(properties, cssParserMode)); } unsigned propertyCount() const { return m_properties.size(); } @@ -69,7 +67,7 @@ public: bool isPropertyImplicit(CSSPropertyID) const; // These expand shorthand properties into multiple properties. - bool setProperty(CSSPropertyID, const String& value, bool important = false, StyleSheetInternal* contextStyleSheet = 0); + bool setProperty(CSSPropertyID, const String& value, bool important = false, StyleSheetContents* contextStyleSheet = 0); void setProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important = false); // These do not. FIXME: This is too messy, we can do better. @@ -78,9 +76,9 @@ public: bool removeProperty(CSSPropertyID, String* returnText = 0); - void parseDeclaration(const String& styleDeclaration, StyleSheetInternal* contextStyleSheet); + void parseDeclaration(const String& styleDeclaration, StyleSheetContents* contextStyleSheet); - void addParsedProperties(const CSSProperty*, int numProperties); + void addParsedProperties(const Vector<CSSProperty>&); void addParsedProperty(const CSSProperty&); PassRefPtr<StylePropertySet> copyBlockProperties() const; @@ -92,7 +90,7 @@ public: void setCSSParserMode(CSSParserMode cssParserMode) { m_cssParserMode = cssParserMode; } CSSParserMode cssParserMode() const { return static_cast<CSSParserMode>(m_cssParserMode); } - void addSubresourceStyleURLs(ListHashSet<KURL>&, StyleSheetInternal* contextStyleSheet); + void addSubresourceStyleURLs(ListHashSet<KURL>&, StyleSheetContents* contextStyleSheet); PassRefPtr<StylePropertySet> copy() const; // Used by StyledElement::copyNonAttributeProperties(). @@ -121,9 +119,8 @@ public: private: StylePropertySet(CSSParserMode); - StylePropertySet(const Vector<CSSProperty>&); + StylePropertySet(StylePropertyVector&, CSSParserMode); StylePropertySet(const StylePropertySet&); - StylePropertySet(const CSSProperty*, int numProperties, CSSParserMode); void setNeedsStyleRecalc(); @@ -143,7 +140,7 @@ private: const CSSProperty* findPropertyWithId(CSSPropertyID) const; CSSProperty* findPropertyWithId(CSSPropertyID); - Vector<CSSProperty, 4> m_properties; + StylePropertyVector m_properties; unsigned m_cssParserMode : 2; mutable unsigned m_ownsCSSOMWrapper : 1; |