Changeset 261253 in webkit
- Timestamp:
- May 6, 2020 3:43:00 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r261251 r261253 1 2020-05-06 Ryan Haddad <ryanhaddad@apple.com> 2 3 Unreviewed, reverting r261239. 4 5 Caused fast/events/wheel-event-outside-body.html to assert on 6 macOS WK1 7 8 Reverted changeset: 9 10 "Add basic support for generating accurate wheel event 11 listener region" 12 https://bugs.webkit.org/show_bug.cgi?id=211512 13 https://trac.webkit.org/changeset/261239 14 1 15 2020-05-06 Tim Horton <timothy_horton@apple.com> 2 16 -
trunk/Source/WebCore/ChangeLog
r261252 r261253 1 2020-05-06 Ryan Haddad <ryanhaddad@apple.com> 2 3 Unreviewed, reverting r261239. 4 5 Caused fast/events/wheel-event-outside-body.html to assert on 6 macOS WK1 7 8 Reverted changeset: 9 10 "Add basic support for generating accurate wheel event 11 listener region" 12 https://bugs.webkit.org/show_bug.cgi?id=211512 13 https://trac.webkit.org/changeset/261239 14 1 15 2020-05-06 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/Source/WebCore/dom/Node.h
r261239 r261253 483 483 #endif 484 484 485 using EventTarget::eventTargetData;486 485 EventTargetData* eventTargetData() final; 487 486 EventTargetData* eventTargetDataConcurrently() final; -
trunk/Source/WebCore/rendering/EventRegion.cpp
r261239 r261253 113 113 114 114 uniteTouchActions(region, style.effectiveTouchActions()); 115 uniteEventListeners(region, style.eventListenerRegionTypes());116 115 117 116 #if ENABLE(EDITABLE_REGION) … … 222 221 } 223 222 224 void EventRegion::uniteEventListeners(const Region& region, OptionSet<EventListenerRegionType> eventListenerRegionTypes)225 {226 if (eventListenerRegionTypes.contains(EventListenerRegionType::Wheel))227 m_wheelEventListenerRegion.unite(region);228 if (eventListenerRegionTypes.contains(EventListenerRegionType::NonPassiveWheel))229 m_nonPassiveWheelEventListenerRegion.unite(region);230 }231 232 223 #if ENABLE(EDITABLE_REGION) 233 224 … … 252 243 ts << indent << "(" << toTouchAction(i); 253 244 ts << indent << m_touchActionRegions[i]; 254 ts << indent << ")\n";255 }256 ts << indent << ")\n";257 }258 259 if (!m_wheelEventListenerRegion.isEmpty()) {260 ts << indent << "(wheel event listener region" << m_wheelEventListenerRegion;261 if (!m_nonPassiveWheelEventListenerRegion.isEmpty()) {262 TextStream::IndentScope indentScope(ts);263 ts << indent << "(non-passive" << m_nonPassiveWheelEventListenerRegion;264 245 ts << indent << ")\n"; 265 246 } -
trunk/Source/WebCore/rendering/EventRegion.h
r261239 r261253 28 28 #include "AffineTransform.h" 29 29 #include "Region.h" 30 #include "RenderStyleConstants.h"31 30 #include "TouchAction.h" 32 31 #include <wtf/OptionSet.h> … … 78 77 bool hasTouchActions() const { return !m_touchActionRegions.isEmpty(); } 79 78 WEBCORE_EXPORT OptionSet<TouchAction> touchActionsForPoint(const IntPoint&) const; 79 80 80 const Region* regionForTouchAction(TouchAction) const; 81 81 … … 94 94 private: 95 95 void uniteTouchActions(const Region&, OptionSet<TouchAction>); 96 void uniteEventListeners(const Region&, OptionSet<EventListenerRegionType>);97 96 98 97 Region m_region; 99 98 Vector<Region> m_touchActionRegions; 100 Region m_wheelEventListenerRegion;101 Region m_nonPassiveWheelEventListenerRegion;102 99 #if ENABLE(EDITABLE_REGION) 103 100 Region m_editableRegion; -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r261239 r261253 1669 1669 return true; 1670 1670 #endif 1671 #if !PLATFORM(IOS_FAMILY)1672 if (renderer().document().wheelEventTargets())1673 return true;1674 #endif1675 1671 if (m_owningLayer.isRenderViewLayer()) 1676 1672 return false; -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r261239 r261253 692 692 int initialLetterHeight() const { return initialLetter().height(); } 693 693 694 OptionSet<TouchAction> touchActions() const { return m_rareNonInheritedData->touchActions; }694 OptionSet<TouchAction> touchActions() const { return OptionSet<TouchAction>::fromRaw(m_rareNonInheritedData->touchActions); } 695 695 // 'touch-action' behavior depends on values in ancestors. We use an additional inherited property to implement that. 696 OptionSet<TouchAction> effectiveTouchActions() const { return m_rareInheritedData->effectiveTouchActions; } 697 OptionSet<EventListenerRegionType> eventListenerRegionTypes() const { return m_rareInheritedData->eventListenerRegionTypes; } 696 OptionSet<TouchAction> effectiveTouchActions() const { return OptionSet<TouchAction>::fromRaw(m_rareInheritedData->effectiveTouchActions); } 698 697 699 698 #if ENABLE(CSS_SCROLL_SNAP) … … 1228 1227 void setInitialLetter(const IntSize& size) { SET_VAR(m_rareNonInheritedData, initialLetter, size); } 1229 1228 1230 void setTouchActions(OptionSet<TouchAction> touchActions) { SET_VAR(m_rareNonInheritedData, touchActions, touchActions); } 1231 void setEffectiveTouchActions(OptionSet<TouchAction> touchActions) { SET_VAR(m_rareInheritedData, effectiveTouchActions, touchActions); } 1232 void setEventListenerRegionTypes(OptionSet<EventListenerRegionType> eventListenerTypes) { SET_VAR(m_rareInheritedData, eventListenerRegionTypes, eventListenerTypes); } 1229 void setTouchActions(OptionSet<TouchAction> touchActions) { SET_VAR(m_rareNonInheritedData, touchActions, touchActions.toRaw()); } 1230 void setEffectiveTouchActions(OptionSet<TouchAction> touchActions) { SET_VAR(m_rareInheritedData, effectiveTouchActions, touchActions.toRaw()); } 1233 1231 1234 1232 #if ENABLE(CSS_SCROLL_SNAP) -
trunk/Source/WebCore/rendering/style/RenderStyleConstants.h
r261239 r261253 1179 1179 Fallback, 1180 1180 Optional 1181 };1182 1183 enum class EventListenerRegionType : uint8_t {1184 Wheel = 1 << 0,1185 NonPassiveWheel = 1 << 1,1186 1181 }; 1187 1182 -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp
r261239 r261253 134 134 , hasSetStrokeWidth(false) 135 135 , hasSetStrokeColor(false) 136 , effectiveTouchActions( RenderStyle::initialTouchActions())136 , effectiveTouchActions(static_cast<unsigned>(RenderStyle::initialTouchActions())) 137 137 , strokeWidth(RenderStyle::initialStrokeWidth()) 138 138 , strokeColor(RenderStyle::initialStrokeColor()) … … 229 229 , hasSetStrokeColor(o.hasSetStrokeColor) 230 230 , effectiveTouchActions(o.effectiveTouchActions) 231 , eventListenerRegionTypes(o.eventListenerRegionTypes)232 231 , strokeWidth(o.strokeWidth) 233 232 , strokeColor(o.strokeColor) … … 351 350 && hasSetStrokeColor == o.hasSetStrokeColor 352 351 && effectiveTouchActions == o.effectiveTouchActions 353 && eventListenerRegionTypes == o.eventListenerRegionTypes354 352 && strokeWidth == o.strokeWidth 355 353 && strokeColor == o.strokeColor -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h
r261239 r261253 31 31 #include "TextDecorationThickness.h" 32 32 #include "TextUnderlineOffset.h" 33 #include "TouchAction.h"34 33 #include <wtf/DataRef.h> 35 34 #include <wtf/RefCounted.h> … … 156 155 unsigned hasSetStrokeColor : 1; 157 156 158 OptionSet<TouchAction> effectiveTouchActions; 159 OptionSet<EventListenerRegionType> eventListenerRegionTypes; 157 unsigned effectiveTouchActions : 6; // OptionSet<TouchAction> 160 158 161 159 Length strokeWidth; -
trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
r261239 r261253 82 82 , justifySelf(RenderStyle::initialSelfAlignment()) 83 83 , customProperties(StyleCustomPropertyData::create()) 84 , touchActions( RenderStyle::initialTouchActions())84 , touchActions(static_cast<unsigned>(RenderStyle::initialTouchActions())) 85 85 , pageSizeType(PAGE_SIZE_AUTO) 86 86 , transformStyle3D(static_cast<unsigned>(RenderStyle::initialTransformStyle3D())) -
trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h
r261239 r261253 174 174 std::unique_ptr<HashSet<String>> customPaintWatchedProperties; 175 175 176 OptionSet<TouchAction> touchActions;176 unsigned touchActions : 6; // TouchAction 177 177 178 178 unsigned pageSizeType : 2; // PageSizeType -
trunk/Source/WebCore/style/StyleAdjuster.cpp
r261239 r261253 34 34 #include "CSSFontSelector.h" 35 35 #include "Element.h" 36 #include "EventNames.h"37 36 #include "FrameView.h" 38 37 #include "HTMLDivElement.h" … … 194 193 } 195 194 196 static OptionSet<EventListenerRegionType> computeEventListenerRegionTypes(const Element& element, OptionSet<EventListenerRegionType> parentTypes)197 {198 #if !PLATFORM(IOS_FAMILY)199 if (!element.hasEventListeners())200 return parentTypes;201 202 auto types = parentTypes;203 204 auto findListeners = [&](auto& eventName, auto type, auto nonPassiveType) {205 auto* eventListenerVector = element.eventTargetData()->eventListenerMap.find(eventName);206 if (!eventListenerVector)207 return;208 209 types.add(type);210 211 auto isPassiveOnly = [&] {212 for (auto& listener : *eventListenerVector) {213 if (!listener->isPassive())214 return false;215 }216 return true;217 }();218 219 if (!isPassiveOnly)220 types.add(nonPassiveType);221 };222 223 findListeners(eventNames().wheelEvent, EventListenerRegionType::Wheel, EventListenerRegionType::NonPassiveWheel);224 findListeners(eventNames().mousewheelEvent, EventListenerRegionType::Wheel, EventListenerRegionType::NonPassiveWheel);225 226 return types;227 #else228 UNUSED_PARAM(element);229 UNUSED_PARAM(parentTypes);230 return { };231 #endif232 }233 234 195 void Adjuster::adjust(RenderStyle& style, const RenderStyle* userAgentAppearanceStyle) const 235 196 { … … 476 437 477 438 style.setEffectiveTouchActions(computeEffectiveTouchActions(style, m_parentStyle.effectiveTouchActions())); 478 479 if (m_element)480 style.setEventListenerRegionTypes(computeEventListenerRegionTypes(*m_element, m_parentStyle.eventListenerRegionTypes()));481 439 482 440 #if ENABLE(TEXT_AUTOSIZING)
Note: See TracChangeset
for help on using the changeset viewer.