Changeset 266016 in webkit
- Timestamp:
- Aug 21, 2020, 3:49:12 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r266010 r266016 1 2020-08-21 Simon Fraser <simon.fraser@apple.com> 2 3 Add some FIXMEs in the EventHandler wheel event handling code for all the things that are wrong 4 https://bugs.webkit.org/show_bug.cgi?id=215741 5 6 Reviewed by Wenson Hsieh. 7 8 There is much confusing code here. Trying to document the issues I've found. 9 10 * page/EventHandler.cpp: 11 (WebCore::EventHandler::handleWheelEvent): 12 * page/mac/EventHandlerMac.mm: 13 (WebCore::findEnclosingScrollableContainer): 14 (WebCore::EventHandler::determineWheelEventTarget): 15 (WebCore::EventHandler::processWheelEventForScrolling): 16 * page/scrolling/mac/ScrollingCoordinatorMac.mm: 17 (WebCore::ScrollingCoordinatorMac::handleWheelEvent): 18 1 19 2020-08-21 Rob Buis <rbuis@igalia.com> 2 20 -
trunk/Source/WebCore/page/EventHandler.cpp
r265881 r266016 2918 2918 document->hitTest(request, result); 2919 2919 2920 // FIXME: Why do we have track all three of targetElement, scrollableContainer and ScrollableArea? 2920 2921 RefPtr<Element> element = result.targetElement(); 2921 2922 RefPtr<ContainerNode> scrollableContainer; 2922 2923 WeakPtr<ScrollableArea> scrollableArea; 2923 2924 bool isOverWidget = result.isOverWidget(); 2925 2926 // FIXME: Using the value of isOverWidget from the latching state triggers double-recursion into subframes. 2927 // FIXME: Despite doing this up-front search for the correct scrollable area, we dispatch events via elements which 2928 // itself finds and tries to scroll overflow scrollers. 2924 2929 determineWheelEventTarget(event, result, element, scrollableContainer, scrollableArea, isOverWidget); 2925 2930 … … 2955 2960 scrollableArea->setScrollShouldClearLatchedState(false); 2956 2961 2962 // FIXME: processWheelEventForScrolling() is only called for FrameView scrolling, not overflow scrolling, which is confusing. 2957 2963 bool handledEvent = processWheelEventForScrolling(event, scrollableContainer.get(), scrollableArea); 2958 2964 processWheelEventForScrollSnap(event, scrollableArea); -
trunk/Source/WebCore/page/mac/EventHandlerMac.mm
r264247 r266016 808 808 return candidate; 809 809 810 // FIXME: This needs to have the same axis bias that we use in other latching code. 810 811 auto deltaX = wheelEvent.deltaX(); 811 812 auto deltaY = wheelEvent.deltaY(); … … 975 976 scrollableArea = scrollableAreaForContainerNode(*scrollableContainer); 976 977 else { 978 // FIXME: Why does this assume the body? What if we hit an iframe inside an overflow:scroll? 977 979 scrollableContainer = view->frame().document()->bodyOrFrameset(); 978 980 scrollableArea = makeWeakPtr(static_cast<ScrollableArea&>(*view)); … … 1010 1012 } 1011 1013 1014 // FIXME: This can use a stale laching state, before we just pushed or cleared. 1012 1015 if (!wheelEvent.shouldResetLatching() && latchingState && latchingState->wheelEventElement()) { 1013 1016 if (latchingIsLockedToPlatformFrame(m_frame)) … … 1080 1083 } 1081 1084 1082 if (!latchingState->startedGestureAtScrollLimit()) 1085 if (!latchingState->startedGestureAtScrollLimit()) { 1086 // FIXME: This set 'view' to a FrameView that is not this EventHandler's FrameView, which then gets scrolled from here, which is wrong. 1083 1087 view = frameViewForLatchingState(m_frame, *latchingState); 1088 } 1084 1089 1085 1090 ASSERT(view); -
trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm
r265820 r266016 83 83 84 84 LOG_WITH_STREAM(Scrolling, stream << "ScrollingCoordinatorMac::handleWheelEvent - sending event to scrolling thread"); 85 86 // FIXME: Over on the scrolling thread, we'll hit-test the layers and possibly send the event to a node 87 // which we've already discounted on the main thread. This needs to target a specific node. 85 88 86 89 RefPtr<ThreadedScrollingTree> threadedScrollingTree = downcast<ThreadedScrollingTree>(scrollingTree());
Note:
See TracChangeset
for help on using the changeset viewer.