Index: Source/core/css/CSSComputedStyleDeclaration.cpp |
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp |
old mode 100644 |
new mode 100755 |
index 73ce88040017a04f9e847fd5e69f1ba4002e2ce4..41b017b3a5208c0194780edab92cf45869fff862 |
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp |
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp |
@@ -1547,6 +1547,30 @@ static PassRefPtr<CSSPrimitiveValue> valueForFontWeight(RenderStyle& style) |
return cssValuePool().createIdentifierValue(CSSValueNormal); |
} |
+static PassRefPtr<CSSValue> touchActionFlagsToCSSValue(TouchAction touchAction) |
+{ |
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); |
+ if (touchAction == TouchActionAuto) { |
+ list->append(cssValuePool().createIdentifierValue(CSSValueAuto)); |
+ } |
+ if (touchAction & TouchActionNone) { |
+ ASSERT(touchAction == TouchActionNone); |
+ list->append(cssValuePool().createIdentifierValue(CSSValueNone)); |
+ } |
+ if (touchAction & TouchActionPanX) { |
+ list->append(cssValuePool().createIdentifierValue(CSSValuePanX)); |
+ } |
+ if (touchAction & TouchActionPanY) { |
+ list->append(cssValuePool().createIdentifierValue(CSSValuePanY)); |
+ } |
+ |
+ if (!list->length()) { |
+ ASSERT(false); |
+ return cssValuePool().createIdentifierValue(CSSValueAuto); |
Rick Byers
2013/12/13 13:34:23
nit: just remove this whole if block and just ASSE
gnana
2013/12/13 17:06:23
Done.
|
+ } |
+ return list.release(); |
+} |
+ |
static bool isLayoutDependent(CSSPropertyID propertyID, PassRefPtr<RenderStyle> style, RenderObject* renderer) |
{ |
// Some properties only depend on layout in certain conditions which |
@@ -2321,7 +2345,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert |
case CSSPropertyTop: |
return valueForPositionOffset(*style, CSSPropertyTop, renderer, m_node->document().renderView()); |
case CSSPropertyTouchAction: |
- return cssValuePool().createValue(style->touchAction()); |
+ return touchActionFlagsToCSSValue(style->touchAction()); |
case CSSPropertyTouchActionDelay: |
return cssValuePool().createValue(style->touchActionDelay()); |
case CSSPropertyUnicodeBidi: |