haikuwebkit/LayoutTests/css3/touch-action/touch-action-manipulation-f...

13 lines
363 B
Plaintext
Raw Permalink Normal View History

Implement touch-action: manipulation; for iOS https://bugs.webkit.org/show_bug.cgi?id=149854 <rdar://problem/23017145> Reviewed by Benjamin Poulain. Source/WebCore: Implements the manipulation value for the CSS property touch-action. Adds support for parsing the touch-action property and two of its values: auto and manipulation. Tests: css3/touch-action/touch-action-computed-style.html css3/touch-action/touch-action-manipulation-fast-clicks.html css3/touch-action/touch-action-parsing.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): (WebCore::isKeywordPropertyID): (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator TouchAction): * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * dom/Element.cpp: (WebCore::Element::allowsDoubleTapGesture): Here, we determine whether an element that resulted from hit-testing a touch should allow double-tap gestures. To do this, we walk up the element's parents, stopping when we detect an element that disallows double tap gestures by having a touch-action other than auto or by hitting the root node. * dom/Element.h: * dom/Node.h: (WebCore::Node::allowsDoubleTapGesture): * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: Source/WebKit2: Implements the manipulation value for the CSS property touch-action. Performs hit-testing upon receiving a potential tap to determine whether to disable double-tap gesture recognition over the duration of the tap. If so, sends a message from the web process to the UI process indicating that double-tapping should be disabled, allowing single taps to avoid the delay. * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::potentialTapAtPosition): LayoutTests: Add tests to check that the manipulation and auto values of the touch-action property can be properly parsed and can be obtained through computed style. Also tests that putting touch-action: manipulation on an element and tapping repeatedly on it will fire clicks instead of recognizing double taps and causing the viewport to zoom. * TestExpectations: * css3/touch-action/touch-action-computed-style-expected.txt: Added. * css3/touch-action/touch-action-computed-style.html: Added. * css3/touch-action/touch-action-manipulation-fast-clicks-expected.txt: Added. * css3/touch-action/touch-action-manipulation-fast-clicks.html: Added. * css3/touch-action/touch-action-parsing-expected.txt: Added. * css3/touch-action/touch-action-parsing.html: Added. * platform/ios-simulator-wk2/TestExpectations: Canonical link: https://commits.webkit.org/168615@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-10-22 13:54:55 +00:00
PASS successfullyParsed is true
TEST COMPLETE
Repeatedly tapping on the button should fire click events.
This test is best run in WebKitTestRunner. If you are running this test manually, verify that tapping the button causes a "Click!" message to appear below, and that click occurred without the regular 350ms delay for double tapping.
Click!
Click!
Click!