WebKit Bugzilla
Attachment 358937 Details for
Bug 193314
: Support parsing of additional values for the touch-action property
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193314-20190111224925.patch (text/plain), 31.07 KB, created by
Antoine Quint
on 2019-01-11 13:49:27 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2019-01-11 13:49:27 PST
Size:
31.07 KB
patch
obsolete
>Subversion Revision: 239871 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index f7f33131c17ff3d21cb95051381c00d58a605888..8418bd4b60616d9aeacb3895d00105e5cff5c511 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,46 @@ >+2019-01-11 Antoine Quint <graouts@apple.com> >+ >+ Support parsing of additional values for the touch-action property >+ https://bugs.webkit.org/show_bug.cgi?id=193314 >+ <rdar://problem/47176519> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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: >+ > 2019-01-11 Miguel Gomez <magomez@igalia.com> > > [GTK] Garbled rendering on Youtube while scrolling under X11. >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index ff35a886e153bf4f1e17c5cc6d63fa76d53d1366..cf35004f08ef649d9c3e09dc2855996c51a81a93 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -2106,6 +2106,7 @@ > 71A1B6081DEE5AD70073BCFB /* modern-media-controls-localized-strings.js in Resources */ = {isa = PBXBuildFile; fileRef = 71A1B6061DEE5A820073BCFB /* modern-media-controls-localized-strings.js */; }; > 71A57DF2154BE25C0009D120 /* SVGPathUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 71A57DF0154BE25C0009D120 /* SVGPathUtilities.h */; }; > 71B28427203CEC4C0036AA5D /* JSCSSAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 71B28426203CEC0D0036AA5D /* JSCSSAnimation.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 71B7EE0D21B5C6870031C1EF /* TouchAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 71AEE4EB21B5A49C00DDB036 /* TouchAction.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 71C29E32203CE781008F36D2 /* CSSAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 71C29E30203CE76B008F36D2 /* CSSAnimation.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 71C916081D1483A300ACA47D /* UserInterfaceLayoutDirection.h in Headers */ = {isa = PBXBuildFile; fileRef = 71C916071D1483A300ACA47D /* UserInterfaceLayoutDirection.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 71DCB7021568197600862271 /* JSSVGZoomAndPan.h in Headers */ = {isa = PBXBuildFile; fileRef = 71DCB7001568197600862271 /* JSSVGZoomAndPan.h */; }; >@@ -9356,6 +9357,7 @@ > 71A1B6071DEE5A820073BCFB /* en */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = en; path = "en.lproj/modern-media-controls-localized-strings.js"; sourceTree = SOURCE_ROOT; }; > 71A57DEF154BE25C0009D120 /* SVGPathUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPathUtilities.cpp; sourceTree = "<group>"; }; > 71A57DF0154BE25C0009D120 /* SVGPathUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathUtilities.h; sourceTree = "<group>"; }; >+ 71AEE4EB21B5A49C00DDB036 /* TouchAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TouchAction.h; sourceTree = "<group>"; }; > 71B0460A1DD3C2EE00EE19CF /* status-support.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = "status-support.js"; sourceTree = "<group>"; }; > 71B28424203CEC0B0036AA5D /* JSCSSAnimation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSAnimation.cpp; sourceTree = "<group>"; }; > 71B28426203CEC0D0036AA5D /* JSCSSAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCSSAnimation.h; sourceTree = "<group>"; }; >@@ -25366,6 +25368,7 @@ > 185BCF270F3279CE000EA262 /* ThreadTimers.h */, > 93309EA1099EB78C0056E581 /* Timer.cpp */, > 9305B24C098F1B6B00C28855 /* Timer.h */, >+ 71AEE4EB21B5A49C00DDB036 /* TouchAction.h */, > 868160D1187669C40021E79D /* UserActivity.cpp */, > 868160D2187669C40021E79D /* UserActivity.h */, > A3AF9D8220325324006CAD06 /* UserAgent.h */, >@@ -31852,6 +31855,7 @@ > 2D7ED0AB1BAE99170043B3E5 /* TimerEventBasedMock.h in Headers */, > 49E912AE0EFAC906009D0CAF /* TimingFunction.h in Headers */, > 0F54DD081881D5F5003EEDBB /* Touch.h in Headers */, >+ 71B7EE0D21B5C6870031C1EF /* TouchAction.h in Headers */, > 0F54DD091881D5F5003EEDBB /* TouchEvent.h in Headers */, > 0F54DD0A1881D5F5003EEDBB /* TouchList.h in Headers */, > 070334D71459FFD5008D8D45 /* TrackBase.h in Headers */, >diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >index 9ebc3abbee63acb9ac5476ee915a9695b849bce7..ca215aae6b407143fc466230f1f9573e3d61d3ce 100644 >--- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >+++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >@@ -73,6 +73,7 @@ > #include "StyleResolver.h" > #include "StyleScope.h" > #include "StyleScrollSnapPoints.h" >+#include "TouchAction.h" > #include "WebKitFontFamilyNames.h" > #include "WillChangeData.h" > #include <wtf/NeverDestroyed.h> >@@ -1746,6 +1747,32 @@ static Ref<CSSPrimitiveValue> valueForFamily(const AtomicString& family) > return CSSValuePool::singleton().createFontFamilyValue(family); > } > >+#if ENABLE(TOUCH_EVENTS) >+static Ref<CSSValue> touchActionFlagsToCSSValue(OptionSet<TouchAction> touchActions) >+{ >+ auto& cssValuePool = CSSValuePool::singleton(); >+ >+ if (touchActions & TouchAction::Auto) >+ return cssValuePool.createIdentifierValue(CSSValueAuto); >+ if (touchActions & TouchAction::None) >+ return cssValuePool.createIdentifierValue(CSSValueNone); >+ if (touchActions & TouchAction::Manipulation) >+ return cssValuePool.createIdentifierValue(CSSValueManipulation); >+ >+ auto list = CSSValueList::createSpaceSeparated(); >+ if (touchActions & TouchAction::PanX) >+ list->append(cssValuePool.createIdentifierValue(CSSValuePanX)); >+ if (touchActions & TouchAction::PanY) >+ list->append(cssValuePool.createIdentifierValue(CSSValuePanY)); >+ if (touchActions & TouchAction::PinchZoom) >+ list->append(cssValuePool.createIdentifierValue(CSSValuePinchZoom)); >+ >+ if (!list->length()) >+ return cssValuePool.createIdentifierValue(CSSValueAuto); >+ return WTFMove(list); >+} >+#endif >+ > static Ref<CSSValue> renderTextDecorationFlagsToCSSValue(OptionSet<TextDecoration> textDecoration) > { > auto& cssValuePool = CSSValuePool::singleton(); >@@ -3732,7 +3759,7 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyinStyle(const RenderSty > case CSSPropertyWebkitTapHighlightColor: > return currentColorOrValidColor(&style, style.tapHighlightColor()); > case CSSPropertyTouchAction: >- return cssValuePool.createValue(style.touchAction()); >+ return touchActionFlagsToCSSValue(style.touchActions()); > #endif > #if PLATFORM(IOS_FAMILY) > case CSSPropertyWebkitTouchCallout: >diff --git a/Source/WebCore/css/CSSPrimitiveValueMappings.h b/Source/WebCore/css/CSSPrimitiveValueMappings.h >index c95ff65a835ba7643edb8d2bb25d16f16bc62117..efd8423db44d25710d8491f58ebd5c1fad5dac3b 100644 >--- a/Source/WebCore/css/CSSPrimitiveValueMappings.h >+++ b/Source/WebCore/css/CSSPrimitiveValueMappings.h >@@ -42,6 +42,7 @@ > #include "SVGRenderStyleDefs.h" > #include "TextFlags.h" > #include "ThemeTypes.h" >+#include "TouchAction.h" > #include "UnicodeBidi.h" > #include "WritingMode.h" > #include <wtf/MathExtras.h> >@@ -5247,10 +5248,22 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TouchAction touchAction) > case TouchAction::Manipulation: > m_value.valueID = CSSValueManipulation; > break; >+ case TouchAction::None: >+ m_value.valueID = CSSValueNone; >+ break; >+ case TouchAction::PanX: >+ m_value.valueID = CSSValuePanX; >+ break; >+ case TouchAction::PanY: >+ m_value.valueID = CSSValuePanY; >+ break; >+ case TouchAction::PinchZoom: >+ m_value.valueID = CSSValuePinchZoom; >+ break; > } > } > >-template<> inline CSSPrimitiveValue::operator TouchAction() const >+template<> inline CSSPrimitiveValue::operator OptionSet<TouchAction>() const > { > ASSERT(isValueID()); > switch (m_value.valueID) { >@@ -5258,6 +5271,14 @@ template<> inline CSSPrimitiveValue::operator TouchAction() const > return TouchAction::Auto; > case CSSValueManipulation: > return TouchAction::Manipulation; >+ case CSSValueNone: >+ return TouchAction::None; >+ case CSSValuePanX: >+ return TouchAction::PanX; >+ case CSSValuePanY: >+ return TouchAction::PanY; >+ case CSSValuePinchZoom: >+ return TouchAction::PinchZoom; > default: > break; > } >diff --git a/Source/WebCore/css/CSSProperties.json b/Source/WebCore/css/CSSProperties.json >index fe012ba4b229e656cc1d89bb26f258dc1ecaea3c..16dd74523b65ec1ade82d145ae09a74fd136dbb2 100644 >--- a/Source/WebCore/css/CSSProperties.json >+++ b/Source/WebCore/css/CSSProperties.json >@@ -6677,10 +6677,16 @@ > "touch-action": { > "values": [ > "auto", >- "manipulation" >+ "none", >+ "manipulation", >+ "pan-x", >+ "pan-y", >+ "pinch-zoom" > ], > "codegen-properties": { >- "enable-if": "ENABLE_TOUCH_EVENTS" >+ "name-for-methods": "TouchActions", >+ "enable-if": "ENABLE_TOUCH_EVENTS", >+ "converter": "TouchAction" > }, > "specification": { > "url": "https://www.w3.org/TR/pointerevents/#the-touch-action-css-property" >diff --git a/Source/WebCore/css/CSSValueKeywords.in b/Source/WebCore/css/CSSValueKeywords.in >index 86b5e5914f40e73afb149521843a4ec97c861018..09321901bf599b3c4d064c84b9f420474b7da6cb 100644 >--- a/Source/WebCore/css/CSSValueKeywords.in >+++ b/Source/WebCore/css/CSSValueKeywords.in >@@ -1354,7 +1354,12 @@ scroll-position > > #if defined(ENABLE_TOUCH_EVENTS) && ENABLE_TOUCH_EVENTS > // touch-action >+// auto >+// none > manipulation >+pan-x >+pan-y >+pinch-zoom > #endif > > // hanging-punctuation >diff --git a/Source/WebCore/css/StyleBuilderConverter.h b/Source/WebCore/css/StyleBuilderConverter.h >index da000d3af01b55bb7db83fad82150251ebcde829..80d81aa6f8509aab27ef2f23c9e61114d4211c55 100644 >--- a/Source/WebCore/css/StyleBuilderConverter.h >+++ b/Source/WebCore/css/StyleBuilderConverter.h >@@ -52,6 +52,7 @@ > #include "Settings.h" > #include "StyleResolver.h" > #include "StyleScrollSnapPoints.h" >+#include "TouchAction.h" > #include "TransformFunctions.h" > #include <wtf/Optional.h> > >@@ -116,6 +117,7 @@ public: > #endif > #if ENABLE(TOUCH_EVENTS) > static Color convertTapHighlightColor(StyleResolver&, const CSSValue&); >+ static OptionSet<TouchAction> convertTouchAction(StyleResolver&, const CSSValue&); > #endif > #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING) > static bool convertOverflowScrolling(StyleResolver&, const CSSValue&); >@@ -1345,6 +1347,26 @@ inline Color StyleBuilderConverter::convertTapHighlightColor(StyleResolver& styl > { > return styleResolver.colorFromPrimitiveValue(downcast<CSSPrimitiveValue>(value)); > } >+ >+inline OptionSet<TouchAction> StyleBuilderConverter::convertTouchAction(StyleResolver&, const CSSValue& value) >+{ >+ if (is<CSSPrimitiveValue>(value)) >+ return downcast<CSSPrimitiveValue>(value); >+ >+ if (is<CSSValueList>(value)) { >+ OptionSet<TouchAction> touchActions; >+ for (auto& currentValue : downcast<CSSValueList>(value)) { >+ auto& primitiveValue = downcast<CSSPrimitiveValue>(currentValue.get()); >+ auto primitiveValueID = primitiveValue.valueID(); >+ if (primitiveValueID != CSSValuePanX && primitiveValueID != CSSValuePanY && primitiveValueID != CSSValuePinchZoom) >+ return RenderStyle::initialTouchActions(); >+ touchActions.add(primitiveValue); >+ } >+ return touchActions; >+ } >+ >+ return RenderStyle::initialTouchActions(); >+} > #endif > > #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING) >diff --git a/Source/WebCore/css/parser/CSSParserFastPaths.cpp b/Source/WebCore/css/parser/CSSParserFastPaths.cpp >index 3835f239b08c400c347f85213697d8eed1d02413..36609b4fe6f91a5ee9671c7570341a01cd7f458d 100644 >--- a/Source/WebCore/css/parser/CSSParserFastPaths.cpp >+++ b/Source/WebCore/css/parser/CSSParserFastPaths.cpp >@@ -758,10 +758,6 @@ bool CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyID propertyId > return valueID == CSSValueNormal || valueID == CSSValueBreakAll || valueID == CSSValueKeepAll || valueID == CSSValueBreakWord; > case CSSPropertyWebkitBorderFit: > return valueID == CSSValueBorder || valueID == CSSValueLines; >-#if ENABLE(TOUCH_EVENTS) >- case CSSPropertyTouchAction: // auto | manipulation >- return valueID == CSSValueAuto || valueID == CSSValueManipulation; >-#endif > #if ENABLE(CSS_TRAILING_WORD) > case CSSPropertyAppleTrailingWord: // auto | -apple-partially-balanced > return valueID == CSSValueAuto || valueID == CSSValueWebkitPartiallyBalanced; >@@ -941,9 +937,6 @@ bool CSSParserFastPaths::isKeywordPropertyID(CSSPropertyID propertyId) > case CSSPropertyIsolation: > case CSSPropertyMixBlendMode: > #endif >-#if ENABLE(TOUCH_EVENTS) >- case CSSPropertyTouchAction: >-#endif > #if ENABLE(CSS_BOX_DECORATION_BREAK) > case CSSPropertyWebkitBoxDecorationBreak: > #endif >diff --git a/Source/WebCore/css/parser/CSSPropertyParser.cpp b/Source/WebCore/css/parser/CSSPropertyParser.cpp >index 98df41895a30c7a0bed6535afaf5690bcfb6f637..ec6e0036457a9d75415a43f8164eacd3d687ef3a 100644 >--- a/Source/WebCore/css/parser/CSSPropertyParser.cpp >+++ b/Source/WebCore/css/parser/CSSPropertyParser.cpp >@@ -1342,14 +1342,23 @@ static RefPtr<CSSValue> consumeClip(CSSParserTokenRange& range, CSSParserMode cs > #if ENABLE(TOUCH_EVENTS) > static RefPtr<CSSValue> consumeTouchAction(CSSParserTokenRange& range) > { >- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); > CSSValueID id = range.peek().id(); >- if (id == CSSValueAuto || id == CSSValueNone || id == CSSValueManipulation) { >- list->append(consumeIdent(range).releaseNonNull()); >- return list; >+ if (id == CSSValueNone || id == CSSValueAuto || id == CSSValueManipulation) >+ return consumeIdent(range); >+ >+ auto list = CSSValueList::createSpaceSeparated(); >+ while (true) { >+ auto ident = consumeIdent<CSSValuePanX, CSSValuePanY, CSSValuePinchZoom>(range); >+ if (!ident) >+ break; >+ if (list->hasValue(ident.get())) >+ return nullptr; >+ list->append(ident.releaseNonNull()); > } >- // FIXME-NEWPARSER: Support pan. >- return nullptr; >+ >+ if (!list->length()) >+ return nullptr; >+ return list; > } > #endif > >diff --git a/Source/WebCore/dom/Element.cpp b/Source/WebCore/dom/Element.cpp >index 5ff302fbe65265586d620e26e23fe476b4652eb7..da5cd2f081c1e88f8111efff326df2026444c43a 100644 >--- a/Source/WebCore/dom/Element.cpp >+++ b/Source/WebCore/dom/Element.cpp >@@ -103,6 +103,7 @@ > #include "StyleScope.h" > #include "StyleTreeResolver.h" > #include "TextIterator.h" >+#include "TouchAction.h" > #include "VoidCallback.h" > #include "WebAnimation.h" > #include "WheelEvent.h" >@@ -1664,7 +1665,7 @@ URL Element::absoluteLinkURL() const > #if ENABLE(TOUCH_EVENTS) > bool Element::allowsDoubleTapGesture() const > { >- if (renderStyle() && renderStyle()->touchAction() != TouchAction::Auto) >+ if (renderStyle() && renderStyle()->touchActions() != TouchAction::Auto) > return false; > > Element* parent = parentElement(); >diff --git a/Source/WebCore/platform/TouchAction.h b/Source/WebCore/platform/TouchAction.h >new file mode 100644 >index 0000000000000000000000000000000000000000..8682b7fc4677589d819f92f9d5496c3ca53e3f1f >--- /dev/null >+++ b/Source/WebCore/platform/TouchAction.h >@@ -0,0 +1,39 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+namespace WebCore { >+ >+enum class TouchAction : uint8_t { >+ Auto = 0, >+ None = 1 << 0, >+ Manipulation = 1 << 1, >+ PanX = 1 << 2, >+ PanY = 1 << 3, >+ PinchZoom = 1 << 4, >+}; >+ >+} >diff --git a/Source/WebCore/rendering/style/RenderStyle.h b/Source/WebCore/rendering/style/RenderStyle.h >index 54cbfaa4887c1248b4f859fb9eb3cc6e7b7eedfd..3d87fbd48dc6237ffe2c519a8b0c4524b7a41c95 100644 >--- a/Source/WebCore/rendering/style/RenderStyle.h >+++ b/Source/WebCore/rendering/style/RenderStyle.h >@@ -64,6 +64,7 @@ > #include "StyleVisualData.h" > #include "TextFlags.h" > #include "ThemeTypes.h" >+#include "TouchAction.h" > #include "TransformOperations.h" > #include "UnicodeBidi.h" > #include <memory> >@@ -704,7 +705,7 @@ public: > int initialLetterHeight() const { return initialLetter().height(); } > > #if ENABLE(TOUCH_EVENTS) >- TouchAction touchAction() const { return static_cast<TouchAction>(m_rareNonInheritedData->touchAction); } >+ OptionSet<TouchAction> touchActions() const { return OptionSet<TouchAction>::fromRaw(m_rareNonInheritedData->touchActions); } > #endif > > #if ENABLE(CSS_SCROLL_SNAP) >@@ -1223,7 +1224,7 @@ public: > void setInitialLetter(const IntSize& size) { SET_VAR(m_rareNonInheritedData, initialLetter, size); } > > #if ENABLE(TOUCH_EVENTS) >- void setTouchAction(TouchAction touchAction) { SET_VAR(m_rareNonInheritedData, touchAction, static_cast<unsigned>(touchAction)); } >+ void setTouchActions(OptionSet<TouchAction> touchActions) { SET_VAR(m_rareNonInheritedData, touchActions, touchActions.toRaw()); } > #endif > > #if ENABLE(CSS_SCROLL_SNAP) >@@ -1619,7 +1620,7 @@ public: > static WillChangeData* initialWillChange() { return nullptr; } > > #if ENABLE(TOUCH_EVENTS) >- static TouchAction initialTouchAction() { return TouchAction::Auto; } >+ static TouchAction initialTouchActions() { return TouchAction::Auto; } > #endif > > #if ENABLE(CSS_SCROLL_SNAP) >diff --git a/Source/WebCore/rendering/style/RenderStyleConstants.h b/Source/WebCore/rendering/style/RenderStyleConstants.h >index 66e5c7b47410a1b0af11bea436ac9cb2a84771e4..67c7c04f84d43fcad00b01aa6dd3514fbed6afed 100644 >--- a/Source/WebCore/rendering/style/RenderStyleConstants.h >+++ b/Source/WebCore/rendering/style/RenderStyleConstants.h >@@ -1085,13 +1085,6 @@ enum class CSSBoxType : uint8_t { > ViewBox > }; > >-#if ENABLE(TOUCH_EVENTS) >-enum class TouchAction : uint8_t { >- Auto, >- Manipulation >-}; >-#endif >- > #if ENABLE(CSS_SCROLL_SNAP) > enum class ScrollSnapStrictness : uint8_t { > None, >diff --git a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp b/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp >index a312bdaebd5f5587ea12db0817174ad0a9178d99..b66c328fcb594cc3b2aa9856b1ffc11eb313a5e0 100644 >--- a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp >+++ b/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp >@@ -77,7 +77,7 @@ StyleRareNonInheritedData::StyleRareNonInheritedData() > , justifySelf(RenderStyle::initialSelfAlignment()) > , customProperties(StyleCustomPropertyData::create()) > #if ENABLE(TOUCH_EVENTS) >- , touchAction(static_cast<unsigned>(RenderStyle::initialTouchAction())) >+ , touchActions(static_cast<unsigned>(RenderStyle::initialTouchActions())) > #endif > , pageSizeType(PAGE_SIZE_AUTO) > , transformStyle3D(static_cast<unsigned>(RenderStyle::initialTransformStyle3D())) >@@ -171,7 +171,7 @@ inline StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonIn > , customProperties(o.customProperties) > , customPaintWatchedProperties(o.customPaintWatchedProperties ? std::make_unique<HashSet<String>>(*o.customPaintWatchedProperties) : nullptr) > #if ENABLE(TOUCH_EVENTS) >- , touchAction(o.touchAction) >+ , touchActions(o.touchActions) > #endif > , pageSizeType(o.pageSizeType) > , transformStyle3D(o.transformStyle3D) >@@ -286,7 +286,7 @@ bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c > && textCombine == o.textCombine > && textDecorationStyle == o.textDecorationStyle > #if ENABLE(TOUCH_EVENTS) >- && touchAction == o.touchAction >+ && touchActions == o.touchActions > #endif > #if ENABLE(CSS_COMPOSITING) > && effectiveBlendMode == o.effectiveBlendMode >diff --git a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h b/Source/WebCore/rendering/style/StyleRareNonInheritedData.h >index f9baa142305d220774ef26c04be2e3b2881aa94f..311124046ee5ea35345cca16681e8c146c7fb8c8 100644 >--- a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h >+++ b/Source/WebCore/rendering/style/StyleRareNonInheritedData.h >@@ -175,7 +175,7 @@ public: > std::unique_ptr<HashSet<String>> customPaintWatchedProperties; > > #if ENABLE(TOUCH_EVENTS) >- unsigned touchAction : 1; // TouchAction >+ unsigned touchActions : 5; // TouchAction > #endif > > unsigned pageSizeType : 2; // PageSizeType >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index e2e3768083c5467d58f119d8c1de3f4ca3c21edb..83f0b453bd9c8f322db8c950291fb3d551eccfa0 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2019-01-11 Antoine Quint <graouts@apple.com> >+ >+ Support parsing of additional values for the touch-action property >+ https://bugs.webkit.org/show_bug.cgi?id=193314 >+ <rdar://problem/47176519> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Run more touch-action tests in OpenSource. >+ >+ * platform/ios-wk2/TestExpectations: >+ * platform/ios/TestExpectations: >+ > 2019-01-11 Dominik Infuehr <dinfuehr@igalia.com> > > Enable DFG on ARM/Linux again >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index 0fd799d725824efb70632919d02ae26291e4d180..cea27e638417dba9658b7acbefc010c7eacd6811 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,16 @@ >+2019-01-11 Antoine Quint <graouts@apple.com> >+ >+ Support parsing of additional values for the touch-action property >+ https://bugs.webkit.org/show_bug.cgi?id=193314 >+ <rdar://problem/47176519> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Mark WPT progressions for the touch-action property. >+ >+ * web-platform-tests/pointerevents/extension/pointerevent_touch-action-verification-expected.txt: >+ * web-platform-tests/pointerevents/pointerevent_touch-action-verification-expected.txt: >+ > 2019-01-10 Oriol Brufau <obrufau@igalia.com> > > [css-grid] Let abspos items reference implicit grid lines >diff --git a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/extension/pointerevent_touch-action-verification-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/extension/pointerevent_touch-action-verification-expected.txt >index b04398c98e3cacc975496a0f5d516ec9065d1282..75be87af1b5cdc294e816f5cac3906ab471c9e7d 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/extension/pointerevent_touch-action-verification-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/extension/pointerevent_touch-action-verification-expected.txt >@@ -8,17 +8,17 @@ The following pointer types were detected: . > > > PASS default >-FAIL stylesheet-none assert_equals: expected "auto" but got "none" >+PASS stylesheet-none > PASS explicit-auto >-FAIL explicit-pan-x assert_equals: expected "auto" but got "pan-x" >+PASS explicit-pan-x > FAIL explicit-pan-left assert_equals: expected "auto" but got "pan-left" > FAIL explicit-pan-right assert_equals: expected "auto" but got "pan-right" >-FAIL explicit-pan-y assert_equals: expected "auto" but got "pan-y" >+PASS explicit-pan-y > FAIL explicit-pan-up assert_equals: expected "auto" but got "pan-up" > FAIL explicit-pan-down assert_equals: expected "auto" but got "pan-down" >-FAIL explicit-pinch-zoom assert_equals: expected "auto" but got "pinch-zoom" >-FAIL explicit-pan-x-pan-y assert_equals: expected "auto" but got "pan-x pan-y" >-FAIL explicit-pan-y-pan-x assert_equals: expected "auto" but got "pan-x pan-y" >+PASS explicit-pinch-zoom >+PASS explicit-pan-x-pan-y >+PASS explicit-pan-y-pan-x > FAIL explicit-pan-left-pan-up assert_equals: expected "auto" but got "pan-left pan-up" > FAIL explicit-pan-left-pan-down assert_equals: expected "auto" but got "pan-left pan-down" > FAIL explicit-pan-right-pan-up assert_equals: expected "auto" but got "pan-right pan-up" >@@ -28,11 +28,11 @@ FAIL explicit-pan-up-pan-right assert_equals: expected "auto" but got "pan-right > FAIL explicit-pan-down-pan-left assert_equals: expected "auto" but got "pan-left pan-down" > FAIL explicit-pan-down-pan-right assert_equals: expected "auto" but got "pan-right pan-down" > FAIL explicit-pinch-zoom-pan-x-pan-up assert_equals: expected "auto" but got "pan-x pan-up pinch-zoom" >-FAIL explicit-pinch-zoom-pan-x-pan-y assert_equals: expected "auto" but got "manipulation" >+FAIL explicit-pinch-zoom-pan-x-pan-y assert_equals: expected "pan-x pan-y pinch-zoom" but got "manipulation" > PASS explicit-manipulation >-FAIL explicit-none assert_equals: expected "auto" but got "none" >+PASS explicit-none > PASS explicit-invalid-1 >-FAIL explicit-invalid-2 assert_equals: expected "auto" but got "none" >+PASS explicit-invalid-2 > PASS explicit-invalid-3 > PASS explicit-invalid-4 > PASS explicit-invalid-5 >@@ -46,6 +46,6 @@ PASS explicit-invalid-12 > PASS explicit-invalid-13 > PASS explicit-invalid-14 > PASS not-inherited >-FAIL inherit assert_equals: expected "auto" but got "none" >+PASS inherit > PASS initial > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-verification-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-verification-expected.txt >index 123f93ea4b75e5404afed21f28d3d85c07e4f538..702400b4e2860b696b5d98307ac0cda0dacc072a 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-verification-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-verification-expected.txt >@@ -6,16 +6,16 @@ touch-action: basic verification > > > PASS default >-FAIL stylesheet-none assert_equals: expected "auto" but got "none" >+PASS stylesheet-none > PASS explicit-auto >-FAIL explicit-pan-x assert_equals: expected "auto" but got "pan-x" >-FAIL explicit-pan-y assert_equals: expected "auto" but got "pan-y" >-FAIL explicit-pan-x-pan-y assert_equals: expected "auto" but got "pan-x pan-y" >-FAIL explicit-pan-y-pan-x assert_equals: expected "auto" but got "pan-x pan-y" >+PASS explicit-pan-x >+PASS explicit-pan-y >+PASS explicit-pan-x-pan-y >+PASS explicit-pan-y-pan-x > PASS explicit-manipulation >-FAIL explicit-none assert_equals: expected "auto" but got "none" >+PASS explicit-none > PASS explicit-invalid-1 >-FAIL explicit-invalid-2 assert_equals: expected "auto" but got "none" >+PASS explicit-invalid-2 > PASS explicit-invalid-3 > PASS explicit-invalid-4 > PASS explicit-invalid-5 >@@ -28,6 +28,6 @@ PASS explicit-invalid-11 > PASS explicit-invalid-12 > PASS explicit-invalid-13 > PASS not-inherited >-FAIL inherit assert_equals: expected "auto" but got "none" >+PASS inherit > PASS initial > >diff --git a/LayoutTests/platform/ios-wk2/TestExpectations b/LayoutTests/platform/ios-wk2/TestExpectations >index c567c141aa974e607b70b8a97c013e0e4b08bc77..075d17a2565896a470356b9571fd9c5114e7a47c 100644 >--- a/LayoutTests/platform/ios-wk2/TestExpectations >+++ b/LayoutTests/platform/ios-wk2/TestExpectations >@@ -1338,3 +1338,5 @@ fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-after-hiding-a > fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible.html [ Skip ] > fast/forms/password-scrolled-after-caps-lock-toggled.html [ Skip ] > fast/repaint/placeholder-after-caps-lock-hidden.html [ Skip ] >+ >+imported/w3c/web-platform-tests/pointerevents [ Pass ] >diff --git a/LayoutTests/platform/ios/TestExpectations b/LayoutTests/platform/ios/TestExpectations >index d5c4f174a20de6c4e64ad9de2b55a6cf6d1f6902..263908a972ebe7d64c29c718015fd9e5bf0c5c27 100644 >--- a/LayoutTests/platform/ios/TestExpectations >+++ b/LayoutTests/platform/ios/TestExpectations >@@ -3230,3 +3230,6 @@ webkit.org/b/192250 imported/w3c/web-platform-tests/service-workers/service-work > webkit.org/b/192398 imported/w3c/web-platform-tests/service-workers/service-worker/update-registration-with-type.https.html [ Pass Failure ] > > webkit.org/b/191704 imported/w3c/web-platform-tests/service-workers/service-worker/windowclient-navigate.https.html [ Pass Failure ] >+ >+css3/touch-action [ Pass ] >+css3/touch-action/touch-action-manipulation-fast-clicks.html [ Skip ]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dino
:
review+
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193314
:
358788
|
358795
|
358935
| 358937 |
358958