Support parsing of additional values for the touch-action property
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Jan 2019 08:30:53 +0000 (08:30 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Jan 2019 08:30:53 +0000 (08:30 +0000)
commitea51cbca6392a89bc269d74f5b267f5d93573535
tree936f9548f37662fd30376ee59c4d3a633a49e8f2
parentd27e2e330310af30835960da8e3b0eff856f387a
Support parsing of additional values for the touch-action property
https://bugs.webkit.org/show_bug.cgi?id=193314
<rdar://problem/47176519>

Reviewed by Dean Jackson.

We add parsing support for the "none", "pan-x", "pan-y" and "pinch-zoom" values of the CSS "touch-action" property.

* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::touchActionFlagsToCSSValue):
(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator OptionSet<TouchAction> const):
(WebCore::CSSPrimitiveValue::operator TouchAction const): Deleted.
* css/CSSProperties.json:
* css/CSSValueKeywords.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertTouchAction):
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeTouchAction):
* dom/Element.cpp:
(WebCore::Element::allowsDoubleTapGesture const):
* platform/TouchAction.h: Added.
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::touchActions const):
(WebCore::RenderStyle::setTouchActions):
(WebCore::RenderStyle::initialTouchActions):
(WebCore::RenderStyle::touchAction const): Deleted.
(WebCore::RenderStyle::setTouchAction): Deleted.
(WebCore::RenderStyle::initialTouchAction): Deleted.
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):
* rendering/style/StyleRareNonInheritedData.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSProperties.json
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/css/StyleBuilderConverter.h
Source/WebCore/css/parser/CSSParserFastPaths.cpp
Source/WebCore/css/parser/CSSPropertyParser.cpp
Source/WebCore/dom/Element.cpp
Source/WebCore/platform/TouchAction.h [new file with mode: 0644]
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/RenderStyleConstants.h
Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
Source/WebCore/rendering/style/StyleRareNonInheritedData.h