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

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

Issue 216803002: Implement all shorthand property. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed ASSERT_NOT_REACH in linux_blink_dbg Created 6 years, 7 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..bbbc04fd61738f27c7a55f2fa8d435a12295829e 100644
--- a/Source/core/css/StylePropertySerializer.h
+++ b/Source/core/css/StylePropertySerializer.h
@@ -50,8 +50,58 @@ 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) { }
esprehn 2014/05/30 00:59:22 put braces on the next line.
+
+ 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) { }
esprehn 2014/05/30 00:59:22 ditto
+
+ CSSPropertyInternal(StylePropertySet::PropertyReference property)
+ : m_propertyId(property.id())
+ , m_value(property.value())
+ , m_isImportant(property.isImportant())
+ , m_isInherited(property.isInherited())
+ , m_isImplicit(property.isImplicit()) { }
esprehn 2014/05/30 00:59:22 same
+
+ CSSPropertyID id() { return m_propertyId; }
+ CSSValue* value() { return m_value; }
+ bool isImportant() { return m_isImportant; }
+ bool isInherited() { return m_isInherited; }
+ bool isImplicit() { return m_isImplicit; }
esprehn 2014/05/30 00:59:22 these should be const
tasak 2014/06/04 09:37:41 Done.
+
+ private:
+ CSSPropertyID m_propertyId;
+ CSSValue* m_value;
+ bool m_isImportant;
+ bool m_isInherited;
+ bool m_isImplicit;
+ };
+
+ unsigned propertyCount() const;
+ CSSPropertyInternal propertyAt(unsigned index) const;
+ String getPropertyValueInternal(CSSPropertyID) const;
+ CSSValue* getPropertyCSSValue(CSSPropertyID) const;
+ int findPropertyIndex(CSSPropertyID) const;
+ bool isPropertyImplicit(CSSPropertyID) const;
+ bool propertyIsImportant(CSSPropertyID) const;
const StylePropertySet& m_propertySet;
+ OwnPtr<Vector<CSSPropertyInternal> > m_propertyVector;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698