diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-11 13:45:28 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-11 13:45:28 +0200 |
commit | d6a599dbc9d824a462b2b206316e102bf8136446 (patch) | |
tree | ecb257a5e55b2239d74b90fdad62fccd661cf286 /Source/WebCore/css/CSSProperty.cpp | |
parent | 3ccc3a85f09a83557b391aae380d3bf5f81a2911 (diff) | |
download | qtwebkit-d6a599dbc9d824a462b2b206316e102bf8136446.tar.gz |
Imported WebKit commit 8ff1f22783a32de82fee915abd55bd1b298f2644 (http://svn.webkit.org/repository/webkit/trunk@122325)
New snapshot that should work with the latest Qt build system changes
Diffstat (limited to 'Source/WebCore/css/CSSProperty.cpp')
-rw-r--r-- | Source/WebCore/css/CSSProperty.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Source/WebCore/css/CSSProperty.cpp b/Source/WebCore/css/CSSProperty.cpp index 7a3d7154d..76cc8ea1a 100644 --- a/Source/WebCore/css/CSSProperty.cpp +++ b/Source/WebCore/css/CSSProperty.cpp @@ -26,6 +26,10 @@ #include "RenderStyleConstants.h" #include "StylePropertyShorthand.h" +#if ENABLE(CSS_VARIABLES) +#include "CSSVariableValue.h" +#endif + namespace WebCore { struct SameSizeAsCSSProperty { @@ -35,9 +39,20 @@ struct SameSizeAsCSSProperty { COMPILE_ASSERT(sizeof(CSSProperty) == sizeof(SameSizeAsCSSProperty), CSSProperty_should_stay_small); +String CSSProperty::cssName() const +{ +#if ENABLE(CSS_VARIABLES) + if (id() == CSSPropertyVariable) { + ASSERT(value()->isVariableValue()); + return "-webkit-var-" + static_cast<CSSVariableValue*>(value())->name(); + } +#endif + return String(getPropertyName(id())); +} + String CSSProperty::cssText() const { - return String(getPropertyName(id())) + ": " + m_value->cssText() + (isImportant() ? " !important" : "") + "; "; + return cssName() + ": " + m_value->cssText() + (isImportant() ? " !important" : "") + "; "; } void CSSProperty::wrapValueInCommaSeparatedList() @@ -552,8 +567,11 @@ bool CSSProperty::isInheritedProperty(CSSPropertyID propertyID) case CSSPropertyWebkitAlignItems: case CSSPropertyWebkitAlignSelf: case CSSPropertyWebkitFlex: + case CSSPropertyWebkitFlexBasis: case CSSPropertyWebkitFlexDirection: case CSSPropertyWebkitFlexFlow: + case CSSPropertyWebkitFlexGrow: + case CSSPropertyWebkitFlexShrink: case CSSPropertyWebkitFlexWrap: case CSSPropertyWebkitJustifyContent: case CSSPropertyWebkitOrder: |