Changeset 274091 in webkit
- Timestamp:
- Mar 8, 2021 12:16:20 PM (17 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/events/wheel/redispatched-wheel-event-expected.txt (added)
-
LayoutTests/fast/events/wheel/redispatched-wheel-event.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/dom/Event.cpp (modified) (2 diffs)
-
Source/WebCore/dom/Event.h (modified) (3 diffs)
-
Source/WebCore/dom/EventDispatcher.cpp (modified) (2 diffs)
-
Source/WebCore/dom/Node.cpp (modified) (1 diff)
-
Source/WebCore/page/EventHandler.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r274088 r274091 1 2021-03-08 Simon Fraser <simon.fraser@apple.com> 2 3 Trackpad scrolling in the web inspector timeline is broken 4 https://bugs.webkit.org/show_bug.cgi?id=222853 5 rdar://73509018 6 7 Reviewed by Sam Weinig. 8 9 * fast/events/wheel/redispatched-wheel-event-expected.txt: Added. 10 * fast/events/wheel/redispatched-wheel-event.html: Added. 11 1 12 2021-03-08 ChangSeok Oh <changseok@webkit.org> 2 13 -
trunk/Source/WebCore/ChangeLog
r274087 r274091 1 2021-03-08 Simon Fraser <simon.fraser@apple.com> 2 3 Trackpad scrolling in the web inspector timeline is broken 4 https://bugs.webkit.org/show_bug.cgi?id=222853 5 rdar://73509018 6 7 Reviewed by Sam Weinig. 8 9 Commit r266333 or thereabouts broke trackpad scrolling in the inspector timeline. 10 11 This scrolling works via a wheel event handler on a non-scrollable element that 12 dispatches a copy of the wheel event to a proxy overflow:scroll in script. This 13 broke the default wheel event handling path. 14 15 Fix by having EventHandler::defaultWheelEventHandler() only respect latching and 16 m_currentWheelEventAllowsScrolling (which is set based on WheelEventProcessingSteps 17 from the scrolling thread) for user events, i.e. those with an underlying native event. 18 19 Also make Event loggable, and add some braces. 20 21 Test: fast/events/wheel/redispatched-wheel-event.html 22 23 * dom/Event.cpp: 24 (WebCore::Event::debugDescription const): 25 (WebCore::operator<<): 26 * dom/Event.h: 27 * dom/EventDispatcher.cpp: 28 (WebCore::EventDispatcher::dispatchEvent): 29 * dom/Node.cpp: 30 (WebCore::Node::defaultEventHandler): This clause needs braces. 31 * page/EventHandler.cpp: 32 (WebCore::EventHandler::defaultWheelEventHandler): 33 1 34 2021-03-08 John Wilander <wilander@apple.com> 2 35 -
trunk/Source/WebCore/dom/Event.cpp
r269500 r274091 33 33 #include "UserGestureIndicator.h" 34 34 #include "WorkerGlobalScope.h" 35 #include <wtf/HexNumber.h> 35 36 #include <wtf/IsoMallocInlines.h> 37 #include <wtf/text/StringBuilder.h> 38 #include <wtf/text/TextStream.h> 36 39 37 40 namespace WebCore { … … 182 185 } 183 186 187 String Event::debugDescription() const 188 { 189 return makeString(type(), " phase ", eventPhase(), bubbles() ? " bubbles " : " ", cancelable() ? "cancelable " : " ", "0x"_s, hex(reinterpret_cast<uintptr_t>(this), Lowercase)); 190 } 191 192 TextStream& operator<<(TextStream& ts, const Event& event) 193 { 194 ts << event.debugDescription(); 195 return ts; 196 } 197 184 198 } // namespace WebCore -
trunk/Source/WebCore/dom/Event.h
r269546 r274091 32 32 #include <wtf/TypeCasts.h> 33 33 #include <wtf/text/AtomString.h> 34 35 namespace WTF { 36 class TextStream; 37 } 34 38 35 39 namespace WebCore { … … 144 148 virtual void setRelatedTarget(EventTarget*) { } 145 149 150 virtual String debugDescription() const; 151 146 152 protected: 147 153 explicit Event(IsTrusted = IsTrusted::No); … … 209 215 } 210 216 217 WTF::TextStream& operator<<(WTF::TextStream&, const Event&); 218 211 219 } // namespace WebCore 212 220 -
trunk/Source/WebCore/dom/EventDispatcher.cpp
r273477 r274091 44 44 #include "TextEvent.h" 45 45 #include "TouchEvent.h" 46 #include <wtf/text/TextStream.h> 46 47 47 48 namespace WebCore { … … 145 146 ASSERT_WITH_SECURITY_IMPLICATION(ScriptDisallowedScope::InMainThread::isEventDispatchAllowedInSubtree(node)); 146 147 147 LOG (Events, "EventDispatcher::dispatchEvent %s on node %s", event.type().string().utf8().data(), node.nodeName().utf8().data());148 LOG_WITH_STREAM(Events, stream << "EventDispatcher::dispatchEvent " << event << " on node " << node); 148 149 149 150 auto protectedNode = makeRef(node); -
trunk/Source/WebCore/dom/Node.cpp
r273477 r274091 2467 2467 startNode = startNode->parentOrShadowHostNode(); 2468 2468 2469 if (startNode && startNode->renderer()) 2469 if (startNode && startNode->renderer()) { 2470 2470 if (Frame* frame = document().frame()) 2471 2471 frame->eventHandler().defaultWheelEventHandler(startNode, downcast<WheelEvent>(event)); 2472 } 2472 2473 #if ENABLE(TOUCH_EVENTS) && PLATFORM(IOS_FAMILY) 2473 2474 } else if (is<TouchEvent>(event) && eventNames().isTouchRelatedEventType(document(), eventType)) { -
trunk/Source/WebCore/page/EventHandler.cpp
r273812 r274091 3076 3076 return; 3077 3077 3078 if (!m_currentWheelEventAllowsScrolling) 3078 auto platformEvent = wheelEvent.underlyingPlatformEvent(); 3079 bool isUserEvent = platformEvent.hasValue(); 3080 3081 if (isUserEvent && !m_currentWheelEventAllowsScrolling) 3079 3082 return; 3080 3083 … … 3102 3105 return; 3103 3106 3104 if ( latchedScroller) {3107 if (isUserEvent && latchedScroller) { 3105 3108 if (latchedScroller == m_frame.view()) { 3106 3109 // FrameView scrolling is handled via processWheelEventForScrolling(). … … 3108 3111 } 3109 3112 3110 auto platformEvent = wheelEvent.underlyingPlatformEvent();3111 3113 if (platformEvent) { 3112 3114 auto copiedEvent = platformEvent->copyWithDeltasAndVelocity(filteredPlatformDelta.width(), filteredPlatformDelta.height(), filteredVelocity);
Note: See TracChangeset
for help on using the changeset viewer.