WebKit Bugzilla
Attachment 360095 Details for
Bug 193819
: Use ENABLE_POINTER_EVENTS 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-193819-20190125114240.patch (text/plain), 10.79 KB, created by
Antoine Quint
on 2019-01-25 02:42:42 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2019-01-25 02:42:42 PST
Size:
10.79 KB
patch
obsolete
>Subversion Revision: 240471 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 38a6769e4ea7ddf5e3e3f307f13f170876c21223..1aff0e07b6f43a6d065171bea2315e11053d60b6 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,30 @@ >+2019-01-25 Antoine Quint <graouts@apple.com> >+ >+ Use ENABLE_POINTER_EVENTS for the touch-action property >+ https://bugs.webkit.org/show_bug.cgi?id=193819 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Since we've added an ENABLE_POINTER_EVENTS we should be using it for anything related to the implementation of the >+ Pointer Events specification of which the touch-action property is a part. >+ >+ * css/CSSComputedStyleDeclaration.cpp: >+ (WebCore::ComputedStyleExtractor::valueForPropertyinStyle): >+ * css/CSSPrimitiveValueMappings.h: >+ * css/CSSProperties.json: >+ * css/CSSValueKeywords.in: >+ * css/StyleBuilderConverter.h: >+ * css/parser/CSSPropertyParser.cpp: >+ (WebCore::CSSPropertyParser::parseSingleValue): >+ * dom/Element.cpp: >+ (WebCore::Element::allowsDoubleTapGesture const): >+ * platform/TouchAction.h: >+ * rendering/style/RenderStyle.h: >+ * rendering/style/StyleRareNonInheritedData.cpp: >+ (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): >+ (WebCore::StyleRareNonInheritedData::operator== const): >+ * rendering/style/StyleRareNonInheritedData.h: >+ > 2019-01-24 Zalan Bujtas <zalan@apple.com> > > [LFC][BFC][MarginCollapsing] Refactor MarginCollapse::updateCollapsedMarginAfter >diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >index b4b103b4cafd3ab729d7e08088eff2f6c4453c87..5aaae72fe550249bd0f6bd73580638f67da28a38 100644 >--- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >+++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >@@ -1747,7 +1747,7 @@ static Ref<CSSPrimitiveValue> valueForFamily(const AtomicString& family) > return CSSValuePool::singleton().createFontFamilyValue(family); > } > >-#if ENABLE(TOUCH_EVENTS) >+#if ENABLE(POINTER_EVENTS) > static Ref<CSSValue> touchActionFlagsToCSSValue(OptionSet<TouchAction> touchActions) > { > auto& cssValuePool = CSSValuePool::singleton(); >@@ -3762,6 +3762,8 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyinStyle(const RenderSty > #if ENABLE(TOUCH_EVENTS) > case CSSPropertyWebkitTapHighlightColor: > return currentColorOrValidColor(&style, style.tapHighlightColor()); >+#endif >+#if ENABLE(POINTER_EVENTS) > case CSSPropertyTouchAction: > return touchActionFlagsToCSSValue(style.touchActions()); > #endif >diff --git a/Source/WebCore/css/CSSPrimitiveValueMappings.h b/Source/WebCore/css/CSSPrimitiveValueMappings.h >index efd8423db44d25710d8491f58ebd5c1fad5dac3b..d09f49f44379105776002cbdc9f05470647e6d74 100644 >--- a/Source/WebCore/css/CSSPrimitiveValueMappings.h >+++ b/Source/WebCore/css/CSSPrimitiveValueMappings.h >@@ -5236,7 +5236,7 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextZoom textZoom) > m_value.valueID = CSSValueNormal; > } > >-#if ENABLE(TOUCH_EVENTS) >+#if ENABLE(POINTER_EVENTS) > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TouchAction touchAction) > : CSSValue(PrimitiveClass) > { >diff --git a/Source/WebCore/css/CSSProperties.json b/Source/WebCore/css/CSSProperties.json >index 976fa3946140fefc6aff7ddbf6e20747c5a04b49..e9f945a7b0052eca0a0146510a64e2cadbfc5c26 100644 >--- a/Source/WebCore/css/CSSProperties.json >+++ b/Source/WebCore/css/CSSProperties.json >@@ -6934,7 +6934,7 @@ > ], > "codegen-properties": { > "name-for-methods": "TouchActions", >- "enable-if": "ENABLE_TOUCH_EVENTS", >+ "enable-if": "ENABLE_POINTER_EVENTS", > "converter": "TouchAction" > }, > "specification": { >diff --git a/Source/WebCore/css/CSSValueKeywords.in b/Source/WebCore/css/CSSValueKeywords.in >index 09321901bf599b3c4d064c84b9f420474b7da6cb..d8d3d2d544b787fc97c426073a62b9ca678ef4de 100644 >--- a/Source/WebCore/css/CSSValueKeywords.in >+++ b/Source/WebCore/css/CSSValueKeywords.in >@@ -1352,7 +1352,7 @@ style > scroll-position > //contents > >-#if defined(ENABLE_TOUCH_EVENTS) && ENABLE_TOUCH_EVENTS >+#if defined(ENABLE_POINTER_EVENTS) && ENABLE_POINTER_EVENTS > // touch-action > // auto > // none >diff --git a/Source/WebCore/css/StyleBuilderConverter.h b/Source/WebCore/css/StyleBuilderConverter.h >index 80d81aa6f8509aab27ef2f23c9e61114d4211c55..50a5f50ab1539d537715492eb886b073ddde1f91 100644 >--- a/Source/WebCore/css/StyleBuilderConverter.h >+++ b/Source/WebCore/css/StyleBuilderConverter.h >@@ -117,6 +117,8 @@ public: > #endif > #if ENABLE(TOUCH_EVENTS) > static Color convertTapHighlightColor(StyleResolver&, const CSSValue&); >+#endif >+#if ENABLE(POINTER_EVENTS) > static OptionSet<TouchAction> convertTouchAction(StyleResolver&, const CSSValue&); > #endif > #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING) >@@ -1347,7 +1349,9 @@ inline Color StyleBuilderConverter::convertTapHighlightColor(StyleResolver& styl > { > return styleResolver.colorFromPrimitiveValue(downcast<CSSPrimitiveValue>(value)); > } >+#endif > >+#if ENABLE(POINTER_EVENTS) > inline OptionSet<TouchAction> StyleBuilderConverter::convertTouchAction(StyleResolver&, const CSSValue& value) > { > if (is<CSSPrimitiveValue>(value)) >diff --git a/Source/WebCore/css/parser/CSSPropertyParser.cpp b/Source/WebCore/css/parser/CSSPropertyParser.cpp >index 1f795d9032171bfded08548ab1eb8c2735c56b17..b39fd1c5d5b0da785c488f351d329622a56107f8 100644 >--- a/Source/WebCore/css/parser/CSSPropertyParser.cpp >+++ b/Source/WebCore/css/parser/CSSPropertyParser.cpp >@@ -1347,7 +1347,7 @@ static RefPtr<CSSValue> consumeClip(CSSParserTokenRange& range, CSSParserMode cs > return CSSValuePool::singleton().createValue(WTFMove(rect)); > } > >-#if ENABLE(TOUCH_EVENTS) >+#if ENABLE(POINTER_EVENTS) > static RefPtr<CSSValue> consumeTouchAction(CSSParserTokenRange& range) > { > CSSValueID id = range.peek().id(); >@@ -4038,7 +4038,7 @@ RefPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSPropertyID property, CSS > #endif > case CSSPropertyClip: > return consumeClip(m_range, m_context.mode); >-#if ENABLE(TOUCH_EVENTS) >+#if ENABLE(POINTER_EVENTS) > case CSSPropertyTouchAction: > return consumeTouchAction(m_range); > #endif >diff --git a/Source/WebCore/dom/Element.cpp b/Source/WebCore/dom/Element.cpp >index b2f13d022c09873252479cbeaa5086270a842bd6..ea5493a5a2cd5feadd66c0f6d7b3450f70fc13a2 100644 >--- a/Source/WebCore/dom/Element.cpp >+++ b/Source/WebCore/dom/Element.cpp >@@ -1665,8 +1665,10 @@ URL Element::absoluteLinkURL() const > #if ENABLE(TOUCH_EVENTS) > bool Element::allowsDoubleTapGesture() const > { >+#if ENABLE(POINTER_EVENTS) > if (renderStyle() && renderStyle()->touchActions() != TouchAction::Auto) > return false; >+#endif > > Element* parent = parentElement(); > return !parent || parent->allowsDoubleTapGesture(); >diff --git a/Source/WebCore/platform/TouchAction.h b/Source/WebCore/platform/TouchAction.h >index 8682b7fc4677589d819f92f9d5496c3ca53e3f1f..b0cb476e88974898ddcc7bee05e1454d4c3031f8 100644 >--- a/Source/WebCore/platform/TouchAction.h >+++ b/Source/WebCore/platform/TouchAction.h >@@ -25,6 +25,8 @@ > > #pragma once > >+#if ENABLE(POINTER_EVENTS) >+ > namespace WebCore { > > enum class TouchAction : uint8_t { >@@ -37,3 +39,5 @@ enum class TouchAction : uint8_t { > }; > > } >+ >+#endif // ENABLE(POINTER_EVENTS) >diff --git a/Source/WebCore/rendering/style/RenderStyle.h b/Source/WebCore/rendering/style/RenderStyle.h >index 3d87fbd48dc6237ffe2c519a8b0c4524b7a41c95..324efe58cd09e9e44ac86209c8a3249816d02c43 100644 >--- a/Source/WebCore/rendering/style/RenderStyle.h >+++ b/Source/WebCore/rendering/style/RenderStyle.h >@@ -704,7 +704,7 @@ public: > int initialLetterDrop() const { return initialLetter().width(); } > int initialLetterHeight() const { return initialLetter().height(); } > >-#if ENABLE(TOUCH_EVENTS) >+#if ENABLE(POINTER_EVENTS) > OptionSet<TouchAction> touchActions() const { return OptionSet<TouchAction>::fromRaw(m_rareNonInheritedData->touchActions); } > #endif > >@@ -1223,7 +1223,7 @@ public: > > void setInitialLetter(const IntSize& size) { SET_VAR(m_rareNonInheritedData, initialLetter, size); } > >-#if ENABLE(TOUCH_EVENTS) >+#if ENABLE(POINTER_EVENTS) > void setTouchActions(OptionSet<TouchAction> touchActions) { SET_VAR(m_rareNonInheritedData, touchActions, touchActions.toRaw()); } > #endif > >@@ -1619,7 +1619,7 @@ public: > > static WillChangeData* initialWillChange() { return nullptr; } > >-#if ENABLE(TOUCH_EVENTS) >+#if ENABLE(POINTER_EVENTS) > static TouchAction initialTouchActions() { return TouchAction::Auto; } > #endif > >diff --git a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp b/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp >index b66c328fcb594cc3b2aa9856b1ffc11eb313a5e0..19e3372e13c44bf3cd6abf2b39a9b6e5b86c6cee 100644 >--- a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp >+++ b/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp >@@ -76,7 +76,7 @@ StyleRareNonInheritedData::StyleRareNonInheritedData() > , justifyItems(RenderStyle::initialJustifyItems()) > , justifySelf(RenderStyle::initialSelfAlignment()) > , customProperties(StyleCustomPropertyData::create()) >-#if ENABLE(TOUCH_EVENTS) >+#if ENABLE(POINTER_EVENTS) > , touchActions(static_cast<unsigned>(RenderStyle::initialTouchActions())) > #endif > , pageSizeType(PAGE_SIZE_AUTO) >@@ -170,7 +170,7 @@ inline StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonIn > , justifySelf(o.justifySelf) > , customProperties(o.customProperties) > , customPaintWatchedProperties(o.customPaintWatchedProperties ? std::make_unique<HashSet<String>>(*o.customPaintWatchedProperties) : nullptr) >-#if ENABLE(TOUCH_EVENTS) >+#if ENABLE(POINTER_EVENTS) > , touchActions(o.touchActions) > #endif > , pageSizeType(o.pageSizeType) >@@ -285,7 +285,7 @@ bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c > && borderFit == o.borderFit > && textCombine == o.textCombine > && textDecorationStyle == o.textDecorationStyle >-#if ENABLE(TOUCH_EVENTS) >+#if ENABLE(POINTER_EVENTS) > && touchActions == o.touchActions > #endif > #if ENABLE(CSS_COMPOSITING) >diff --git a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h b/Source/WebCore/rendering/style/StyleRareNonInheritedData.h >index 311124046ee5ea35345cca16681e8c146c7fb8c8..2133b885c328f05856006f15c8c1e4b9b4c1e97a 100644 >--- a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h >+++ b/Source/WebCore/rendering/style/StyleRareNonInheritedData.h >@@ -174,7 +174,7 @@ public: > DataRef<StyleCustomPropertyData> customProperties; > std::unique_ptr<HashSet<String>> customPaintWatchedProperties; > >-#if ENABLE(TOUCH_EVENTS) >+#if ENABLE(POINTER_EVENTS) > unsigned touchActions : 5; // TouchAction > #endif >
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:
koivisto
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193819
: 360095