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

69 lines
1.9 KiB
HTML
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
<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<html>
<meta name="viewport" content="initial-scale=1.0">
<head>
Many CSS js-tests use waitUntilDone https://bugs.webkit.org/show_bug.cgi?id=172379 Reviewed by Tim Horton. Corrected the use of js-test harness, updated the tests to use js-test.js instead of js-test-pre.js where possible. * css3/filters/should-not-have-compositing-layer-expected.txt: * css3/filters/should-not-have-compositing-layer.html: * css3/scroll-snap/nested-elements-expected.txt: * css3/scroll-snap/nested-elements.html: * css3/scroll-snap/scroll-snap-2d-change-axis-type-expected.txt: * css3/scroll-snap/scroll-snap-2d-change-axis-type.html: * css3/scroll-snap/scroll-snap-2d-offsets-computed-independently-expected.txt: * css3/scroll-snap/scroll-snap-2d-offsets-computed-independently.html: * css3/scroll-snap/scroll-snap-elements-container-larger-than-children-expected.txt: * css3/scroll-snap/scroll-snap-elements-container-larger-than-children.html: * css3/scroll-snap/scroll-snap-mismatch-expected.txt: * css3/scroll-snap/scroll-snap-mismatch.html: * css3/scroll-snap/scroll-snap-offsets-expected.txt: * css3/scroll-snap/scroll-snap-offsets.html: * css3/scroll-snap/scroll-snap-positions-expected.txt: * css3/scroll-snap/scroll-snap-positions-mainframe-expected.txt: * css3/scroll-snap/scroll-snap-positions-mainframe.html: * css3/scroll-snap/scroll-snap-positions-overflow-resize-expected.txt: * css3/scroll-snap/scroll-snap-positions-overflow-resize.html: * css3/scroll-snap/scroll-snap-positions.html: * css3/scroll-snap/scroll-snap-style-changed-align-expected.txt: * css3/scroll-snap/scroll-snap-style-changed-align.html: * css3/touch-action/touch-action-manipulation-fast-clicks.html: * fast/css/counters/2displays-expected.txt: * fast/css/counters/2displays.html: * fast/css/counters/after-continuation-expected.txt: * fast/css/counters/after-continuation.html: * fast/css/counters/counter-increment-inherit-expected.txt: * fast/css/counters/counter-increment-inherit.htm: * fast/css/counters/counter-increment-tests-expected.txt: * fast/css/counters/counter-increment-tests.htm: * fast/css/device-aspect-ratio.html: * fast/css/hover-display-block-inline-expected.txt: * fast/css/hover-display-block-inline.html: * fast/css/hover-display-block-none-expected.txt: * fast/css/hover-display-block-none.html: * fast/css/image-resolution/image-resolution.html: * fast/css/max-device-aspect-ratio.html: * fast/css/min-device-aspect-ratio.html: * fast/css/pseudo-target-indirect-sibling-001.html: * fast/css/pseudo-target-indirect-sibling-002.html: Canonical link: https://commits.webkit.org/189283@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-19 21:19:00 +00:00
<script src="../../resources/js-test.js"></script>
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
<script id="ui-script" type="text/plain">
(function() {
var count = 0;
function fireSuccessiveTaps() {
if (count < 3)
uiController.singleTapAtPoint(200, 200, fireSuccessiveTaps);
else
uiController.uiScriptComplete("");
count++;
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
}
fireSuccessiveTaps();
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
})();
</script>
<script>
var scriptCompleted = false;
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
var clickCount = 0;
Many CSS js-tests use waitUntilDone https://bugs.webkit.org/show_bug.cgi?id=172379 Reviewed by Tim Horton. Corrected the use of js-test harness, updated the tests to use js-test.js instead of js-test-pre.js where possible. * css3/filters/should-not-have-compositing-layer-expected.txt: * css3/filters/should-not-have-compositing-layer.html: * css3/scroll-snap/nested-elements-expected.txt: * css3/scroll-snap/nested-elements.html: * css3/scroll-snap/scroll-snap-2d-change-axis-type-expected.txt: * css3/scroll-snap/scroll-snap-2d-change-axis-type.html: * css3/scroll-snap/scroll-snap-2d-offsets-computed-independently-expected.txt: * css3/scroll-snap/scroll-snap-2d-offsets-computed-independently.html: * css3/scroll-snap/scroll-snap-elements-container-larger-than-children-expected.txt: * css3/scroll-snap/scroll-snap-elements-container-larger-than-children.html: * css3/scroll-snap/scroll-snap-mismatch-expected.txt: * css3/scroll-snap/scroll-snap-mismatch.html: * css3/scroll-snap/scroll-snap-offsets-expected.txt: * css3/scroll-snap/scroll-snap-offsets.html: * css3/scroll-snap/scroll-snap-positions-expected.txt: * css3/scroll-snap/scroll-snap-positions-mainframe-expected.txt: * css3/scroll-snap/scroll-snap-positions-mainframe.html: * css3/scroll-snap/scroll-snap-positions-overflow-resize-expected.txt: * css3/scroll-snap/scroll-snap-positions-overflow-resize.html: * css3/scroll-snap/scroll-snap-positions.html: * css3/scroll-snap/scroll-snap-style-changed-align-expected.txt: * css3/scroll-snap/scroll-snap-style-changed-align.html: * css3/touch-action/touch-action-manipulation-fast-clicks.html: * fast/css/counters/2displays-expected.txt: * fast/css/counters/2displays.html: * fast/css/counters/after-continuation-expected.txt: * fast/css/counters/after-continuation.html: * fast/css/counters/counter-increment-inherit-expected.txt: * fast/css/counters/counter-increment-inherit.htm: * fast/css/counters/counter-increment-tests-expected.txt: * fast/css/counters/counter-increment-tests.htm: * fast/css/device-aspect-ratio.html: * fast/css/hover-display-block-inline-expected.txt: * fast/css/hover-display-block-inline.html: * fast/css/hover-display-block-none-expected.txt: * fast/css/hover-display-block-none.html: * fast/css/image-resolution/image-resolution.html: * fast/css/max-device-aspect-ratio.html: * fast/css/min-device-aspect-ratio.html: * fast/css/pseudo-target-indirect-sibling-001.html: * fast/css/pseudo-target-indirect-sibling-002.html: Canonical link: https://commits.webkit.org/189283@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-19 21:19:00 +00:00
jsTestIsAsync = true;
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
function getUIScript() {
return document.getElementById("ui-script").text;
}
function runTest() {
if (testRunner.runUIScript)
testRunner.runUIScript(getUIScript(), function(result) {
scriptCompleted = true;
if (clickCount == 3)
Many CSS js-tests use waitUntilDone https://bugs.webkit.org/show_bug.cgi?id=172379 Reviewed by Tim Horton. Corrected the use of js-test harness, updated the tests to use js-test.js instead of js-test-pre.js where possible. * css3/filters/should-not-have-compositing-layer-expected.txt: * css3/filters/should-not-have-compositing-layer.html: * css3/scroll-snap/nested-elements-expected.txt: * css3/scroll-snap/nested-elements.html: * css3/scroll-snap/scroll-snap-2d-change-axis-type-expected.txt: * css3/scroll-snap/scroll-snap-2d-change-axis-type.html: * css3/scroll-snap/scroll-snap-2d-offsets-computed-independently-expected.txt: * css3/scroll-snap/scroll-snap-2d-offsets-computed-independently.html: * css3/scroll-snap/scroll-snap-elements-container-larger-than-children-expected.txt: * css3/scroll-snap/scroll-snap-elements-container-larger-than-children.html: * css3/scroll-snap/scroll-snap-mismatch-expected.txt: * css3/scroll-snap/scroll-snap-mismatch.html: * css3/scroll-snap/scroll-snap-offsets-expected.txt: * css3/scroll-snap/scroll-snap-offsets.html: * css3/scroll-snap/scroll-snap-positions-expected.txt: * css3/scroll-snap/scroll-snap-positions-mainframe-expected.txt: * css3/scroll-snap/scroll-snap-positions-mainframe.html: * css3/scroll-snap/scroll-snap-positions-overflow-resize-expected.txt: * css3/scroll-snap/scroll-snap-positions-overflow-resize.html: * css3/scroll-snap/scroll-snap-positions.html: * css3/scroll-snap/scroll-snap-style-changed-align-expected.txt: * css3/scroll-snap/scroll-snap-style-changed-align.html: * css3/touch-action/touch-action-manipulation-fast-clicks.html: * fast/css/counters/2displays-expected.txt: * fast/css/counters/2displays.html: * fast/css/counters/after-continuation-expected.txt: * fast/css/counters/after-continuation.html: * fast/css/counters/counter-increment-inherit-expected.txt: * fast/css/counters/counter-increment-inherit.htm: * fast/css/counters/counter-increment-tests-expected.txt: * fast/css/counters/counter-increment-tests.htm: * fast/css/device-aspect-ratio.html: * fast/css/hover-display-block-inline-expected.txt: * fast/css/hover-display-block-inline.html: * fast/css/hover-display-block-none-expected.txt: * fast/css/hover-display-block-none.html: * fast/css/image-resolution/image-resolution.html: * fast/css/max-device-aspect-ratio.html: * fast/css/min-device-aspect-ratio.html: * fast/css/pseudo-target-indirect-sibling-001.html: * fast/css/pseudo-target-indirect-sibling-002.html: Canonical link: https://commits.webkit.org/189283@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-19 21:19:00 +00:00
finishJSTest();
});
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
}
function handleClicked() {
clickCount++;
document.body.appendChild(document.createTextNode("Click!"));
document.body.appendChild(document.createElement("br"));
if (clickCount == 3 && scriptCompleted)
Many CSS js-tests use waitUntilDone https://bugs.webkit.org/show_bug.cgi?id=172379 Reviewed by Tim Horton. Corrected the use of js-test harness, updated the tests to use js-test.js instead of js-test-pre.js where possible. * css3/filters/should-not-have-compositing-layer-expected.txt: * css3/filters/should-not-have-compositing-layer.html: * css3/scroll-snap/nested-elements-expected.txt: * css3/scroll-snap/nested-elements.html: * css3/scroll-snap/scroll-snap-2d-change-axis-type-expected.txt: * css3/scroll-snap/scroll-snap-2d-change-axis-type.html: * css3/scroll-snap/scroll-snap-2d-offsets-computed-independently-expected.txt: * css3/scroll-snap/scroll-snap-2d-offsets-computed-independently.html: * css3/scroll-snap/scroll-snap-elements-container-larger-than-children-expected.txt: * css3/scroll-snap/scroll-snap-elements-container-larger-than-children.html: * css3/scroll-snap/scroll-snap-mismatch-expected.txt: * css3/scroll-snap/scroll-snap-mismatch.html: * css3/scroll-snap/scroll-snap-offsets-expected.txt: * css3/scroll-snap/scroll-snap-offsets.html: * css3/scroll-snap/scroll-snap-positions-expected.txt: * css3/scroll-snap/scroll-snap-positions-mainframe-expected.txt: * css3/scroll-snap/scroll-snap-positions-mainframe.html: * css3/scroll-snap/scroll-snap-positions-overflow-resize-expected.txt: * css3/scroll-snap/scroll-snap-positions-overflow-resize.html: * css3/scroll-snap/scroll-snap-positions.html: * css3/scroll-snap/scroll-snap-style-changed-align-expected.txt: * css3/scroll-snap/scroll-snap-style-changed-align.html: * css3/touch-action/touch-action-manipulation-fast-clicks.html: * fast/css/counters/2displays-expected.txt: * fast/css/counters/2displays.html: * fast/css/counters/after-continuation-expected.txt: * fast/css/counters/after-continuation.html: * fast/css/counters/counter-increment-inherit-expected.txt: * fast/css/counters/counter-increment-inherit.htm: * fast/css/counters/counter-increment-tests-expected.txt: * fast/css/counters/counter-increment-tests.htm: * fast/css/device-aspect-ratio.html: * fast/css/hover-display-block-inline-expected.txt: * fast/css/hover-display-block-inline.html: * fast/css/hover-display-block-none-expected.txt: * fast/css/hover-display-block-none.html: * fast/css/image-resolution/image-resolution.html: * fast/css/max-device-aspect-ratio.html: * fast/css/min-device-aspect-ratio.html: * fast/css/pseudo-target-indirect-sibling-001.html: * fast/css/pseudo-target-indirect-sibling-002.html: Canonical link: https://commits.webkit.org/189283@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-19 21:19:00 +00:00
finishJSTest();
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
}
</script>
<style>
body {
margin: 0;
}
#target {
touch-action: manipulation;
width: 400px;
height: 400px;
}
</style>
</head>
<body onload="runTest()">
<button id="target" onclick="handleClicked()"></button>
<p>Repeatedly tapping on the button should fire click events.</p>
<p>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.</p>
</body>
</html>