Changeset 240472 in webkit
- Timestamp:
- Jan 25, 2019 3:36:57 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r240467 r240472 1 2019-01-25 Antoine Quint <graouts@apple.com> 2 3 Use ENABLE_POINTER_EVENTS for the touch-action property 4 https://bugs.webkit.org/show_bug.cgi?id=193819 5 6 Reviewed by Antti Koivisto. 7 8 Since we've added an ENABLE_POINTER_EVENTS we should be using it for anything related to the implementation of the 9 Pointer Events specification of which the touch-action property is a part. 10 11 * css/CSSComputedStyleDeclaration.cpp: 12 (WebCore::ComputedStyleExtractor::valueForPropertyinStyle): 13 * css/CSSPrimitiveValueMappings.h: 14 * css/CSSProperties.json: 15 * css/CSSValueKeywords.in: 16 * css/StyleBuilderConverter.h: 17 * css/parser/CSSPropertyParser.cpp: 18 (WebCore::CSSPropertyParser::parseSingleValue): 19 * dom/Element.cpp: 20 (WebCore::Element::allowsDoubleTapGesture const): 21 * platform/TouchAction.h: 22 * rendering/style/RenderStyle.h: 23 * rendering/style/StyleRareNonInheritedData.cpp: 24 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): 25 (WebCore::StyleRareNonInheritedData::operator== const): 26 * rendering/style/StyleRareNonInheritedData.h: 27 1 28 2019-01-24 Zalan Bujtas <zalan@apple.com> 2 29 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r240334 r240472 1748 1748 } 1749 1749 1750 #if ENABLE( TOUCH_EVENTS)1750 #if ENABLE(POINTER_EVENTS) 1751 1751 static Ref<CSSValue> touchActionFlagsToCSSValue(OptionSet<TouchAction> touchActions) 1752 1752 { … … 3763 3763 case CSSPropertyWebkitTapHighlightColor: 3764 3764 return currentColorOrValidColor(&style, style.tapHighlightColor()); 3765 #endif 3766 #if ENABLE(POINTER_EVENTS) 3765 3767 case CSSPropertyTouchAction: 3766 3768 return touchActionFlagsToCSSValue(style.touchActions()); -
trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h
r239978 r240472 5237 5237 } 5238 5238 5239 #if ENABLE( TOUCH_EVENTS)5239 #if ENABLE(POINTER_EVENTS) 5240 5240 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TouchAction touchAction) 5241 5241 : CSSValue(PrimitiveClass) -
trunk/Source/WebCore/css/CSSProperties.json
r240334 r240472 6935 6935 "codegen-properties": { 6936 6936 "name-for-methods": "TouchActions", 6937 "enable-if": "ENABLE_ TOUCH_EVENTS",6937 "enable-if": "ENABLE_POINTER_EVENTS", 6938 6938 "converter": "TouchAction" 6939 6939 }, -
trunk/Source/WebCore/css/CSSValueKeywords.in
r239978 r240472 1353 1353 //contents 1354 1354 1355 #if defined(ENABLE_ TOUCH_EVENTS) && ENABLE_TOUCH_EVENTS1355 #if defined(ENABLE_POINTER_EVENTS) && ENABLE_POINTER_EVENTS 1356 1356 // touch-action 1357 1357 // auto -
trunk/Source/WebCore/css/StyleBuilderConverter.h
r239978 r240472 118 118 #if ENABLE(TOUCH_EVENTS) 119 119 static Color convertTapHighlightColor(StyleResolver&, const CSSValue&); 120 #endif 121 #if ENABLE(POINTER_EVENTS) 120 122 static OptionSet<TouchAction> convertTouchAction(StyleResolver&, const CSSValue&); 121 123 #endif … … 1348 1350 return styleResolver.colorFromPrimitiveValue(downcast<CSSPrimitiveValue>(value)); 1349 1351 } 1350 1352 #endif 1353 1354 #if ENABLE(POINTER_EVENTS) 1351 1355 inline OptionSet<TouchAction> StyleBuilderConverter::convertTouchAction(StyleResolver&, const CSSValue& value) 1352 1356 { -
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
r240334 r240472 1348 1348 } 1349 1349 1350 #if ENABLE( TOUCH_EVENTS)1350 #if ENABLE(POINTER_EVENTS) 1351 1351 static RefPtr<CSSValue> consumeTouchAction(CSSParserTokenRange& range) 1352 1352 { … … 4039 4039 case CSSPropertyClip: 4040 4040 return consumeClip(m_range, m_context.mode); 4041 #if ENABLE( TOUCH_EVENTS)4041 #if ENABLE(POINTER_EVENTS) 4042 4042 case CSSPropertyTouchAction: 4043 4043 return consumeTouchAction(m_range); -
trunk/Source/WebCore/dom/Element.cpp
r240237 r240472 1666 1666 bool Element::allowsDoubleTapGesture() const 1667 1667 { 1668 #if ENABLE(POINTER_EVENTS) 1668 1669 if (renderStyle() && renderStyle()->touchActions() != TouchAction::Auto) 1669 1670 return false; 1671 #endif 1670 1672 1671 1673 Element* parent = parentElement(); -
trunk/Source/WebCore/platform/TouchAction.h
r239978 r240472 26 26 #pragma once 27 27 28 #if ENABLE(POINTER_EVENTS) 29 28 30 namespace WebCore { 29 31 … … 38 40 39 41 } 42 43 #endif // ENABLE(POINTER_EVENTS) -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r239978 r240472 705 705 int initialLetterHeight() const { return initialLetter().height(); } 706 706 707 #if ENABLE( TOUCH_EVENTS)707 #if ENABLE(POINTER_EVENTS) 708 708 OptionSet<TouchAction> touchActions() const { return OptionSet<TouchAction>::fromRaw(m_rareNonInheritedData->touchActions); } 709 709 #endif … … 1224 1224 void setInitialLetter(const IntSize& size) { SET_VAR(m_rareNonInheritedData, initialLetter, size); } 1225 1225 1226 #if ENABLE( TOUCH_EVENTS)1226 #if ENABLE(POINTER_EVENTS) 1227 1227 void setTouchActions(OptionSet<TouchAction> touchActions) { SET_VAR(m_rareNonInheritedData, touchActions, touchActions.toRaw()); } 1228 1228 #endif … … 1620 1620 static WillChangeData* initialWillChange() { return nullptr; } 1621 1621 1622 #if ENABLE( TOUCH_EVENTS)1622 #if ENABLE(POINTER_EVENTS) 1623 1623 static TouchAction initialTouchActions() { return TouchAction::Auto; } 1624 1624 #endif -
trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
r239978 r240472 77 77 , justifySelf(RenderStyle::initialSelfAlignment()) 78 78 , customProperties(StyleCustomPropertyData::create()) 79 #if ENABLE( TOUCH_EVENTS)79 #if ENABLE(POINTER_EVENTS) 80 80 , touchActions(static_cast<unsigned>(RenderStyle::initialTouchActions())) 81 81 #endif … … 171 171 , customProperties(o.customProperties) 172 172 , customPaintWatchedProperties(o.customPaintWatchedProperties ? std::make_unique<HashSet<String>>(*o.customPaintWatchedProperties) : nullptr) 173 #if ENABLE( TOUCH_EVENTS)173 #if ENABLE(POINTER_EVENTS) 174 174 , touchActions(o.touchActions) 175 175 #endif … … 286 286 && textCombine == o.textCombine 287 287 && textDecorationStyle == o.textDecorationStyle 288 #if ENABLE( TOUCH_EVENTS)288 #if ENABLE(POINTER_EVENTS) 289 289 && touchActions == o.touchActions 290 290 #endif -
trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h
r239978 r240472 175 175 std::unique_ptr<HashSet<String>> customPaintWatchedProperties; 176 176 177 #if ENABLE( TOUCH_EVENTS)177 #if ENABLE(POINTER_EVENTS) 178 178 unsigned touchActions : 5; // TouchAction 179 179 #endif
Note: See TracChangeset
for help on using the changeset viewer.