#ifndef StylePropertySerializer_h
#define StylePropertySerializer_h
#include "core/css/CSSValueList.h"
#include "core/css/StylePropertySet.h"
namespace WebCore {
class StylePropertySet;
class StylePropertySerializer {
public:
StylePropertySerializer(const StylePropertySet&);
String asText() const;
String getPropertyValue(CSSPropertyID) const;
private:
String getCommonValue(const StylePropertyShorthand&) const;
enum CommonValueMode { OmitUncommonValues, ReturnNullOnUncommonValues };
String borderPropertyValue(CommonValueMode) const;
String getLayeredShorthandValue(const StylePropertyShorthand&) const;
String get4Values(const StylePropertyShorthand&) const;
String borderSpacingValue(const StylePropertyShorthand&) const;
String getShorthandValue(const StylePropertyShorthand&) const;
String fontValue() const;
void appendFontLonghandValueIfExplicit(CSSPropertyID, StringBuilder& result, String& value) const;
String backgroundRepeatPropertyValue() const;
String getPropertyText(CSSPropertyID, const String& value, bool isImportant, bool isNotFirstDecl) const;
bool isPropertyShorthandAvailable(const StylePropertyShorthand&) const;
bool shorthandHasOnlyInitialOrInheritedValue(const StylePropertyShorthand&) const;
void appendBackgroundPropertyAsText(StringBuilder& result, unsigned& numDecls) const;
const StylePropertySet& m_propertySet;
};
}
#endif