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

Unified Diff: Source/core/css/StylePropertySerializer.h

Issue 216803002: Implement all shorthand property. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/css/StylePropertySerializer.h
diff --git a/Source/core/css/StylePropertySerializer.h b/Source/core/css/StylePropertySerializer.h
index ed9bc6ab478efef2ee1b9343c3f84f222ab1a25d..4341f24ba844a639887f84c029016e3c73c837c9 100644
--- a/Source/core/css/StylePropertySerializer.h
+++ b/Source/core/css/StylePropertySerializer.h
@@ -50,8 +50,62 @@ private:
bool isPropertyShorthandAvailable(const StylePropertyShorthand&) const;
bool shorthandHasOnlyInitialOrInheritedValue(const StylePropertyShorthand&) const;
void appendBackgroundPropertyAsText(StringBuilder& result, unsigned& numDecls) const;
+ String getAllPropertyValue() const;
+ String getExpandedAllPropertyValue() const;
+ bool hasAllShorthand(String& result) const;
+
+private:
+ class CSSPropertyInternal {
+ public:
+ CSSPropertyInternal()
+ : m_propertyId(CSSPropertyInvalid)
+ , m_value(0)
+ , m_isImportant(false)
+ , m_isInherited(false)
+ , m_isImplicit(false)
+ { }
+
+ CSSPropertyInternal(CSSPropertyID propertyId, CSSValue* value, bool isImportant, bool isInherited, bool isImplicit)
+ : m_propertyId(propertyId)
+ , m_value(value)
+ , m_isImportant(isImportant)
+ , m_isInherited(isInherited)
+ , m_isImplicit(isImplicit)
+ { }
+
+ CSSPropertyInternal(StylePropertySet::PropertyReference property)
+ : m_propertyId(property.id())
+ , m_value(property.value())
+ , m_isImportant(property.isImportant())
+ , m_isInherited(property.isInherited())
+ , m_isImplicit(property.isImplicit())
+ { }
+
+ CSSPropertyID id() const { return m_propertyId; }
+ CSSValue* value() const { return m_value; }
+ bool isImportant() const { return m_isImportant; }
+ bool isInherited() const { return m_isInherited; }
+ bool isImplicit() const { return m_isImplicit; }
+
+ private:
+ CSSPropertyID m_propertyId;
+ CSSValue* m_value;
+ bool m_isImportant;
+ bool m_isInherited;
+ bool m_isImplicit;
+ };
+
+ void expandAll();
+ unsigned propertyCount() const;
+ CSSPropertyInternal propertyAt(unsigned index) const;
+ String propertyValue(CSSPropertyID) const;
+ CSSValue* getPropertyCSSValue(CSSPropertyID) const;
+ int findPropertyIndex(CSSPropertyID) const;
+ bool isPropertyImplicit(CSSPropertyID) const;
+ bool propertyIsImportant(CSSPropertyID) const;
const StylePropertySet& m_propertySet;
+ Vector<CSSPropertyInternal> m_propertyVector;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698