Changeset 177848 in webkit for trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp
- Timestamp:
- Jan 1, 2015, 1:20:21 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp
r174351 r177848 123 123 #if ENABLE(ASYNC_SCROLLING) 124 124 MutexLocker locker(m_scrollingTreesMutex); 125 if ( ThreadedScrollingTree*scrollingTree = m_scrollingTrees.get(pageID)) {125 if (RefPtr<ThreadedScrollingTree> scrollingTree = m_scrollingTrees.get(pageID)) { 126 126 // FIXME: It's pretty horrible that we're updating the back/forward state here. 127 127 // WebCore should always know the current state and know when it changes so the 128 128 // scrolling tree can be notified. 129 129 // We only need to do this at the beginning of the gesture. 130 if (platformWheelEvent.phase() == PlatformWheelEventPhaseBegan) 131 ScrollingThread::dispatch(bind(&ThreadedScrollingTree::setCanRubberBandState, scrollingTree, canRubberBandAtLeft, canRubberBandAtRight, canRubberBandAtTop, canRubberBandAtBottom)); 130 if (platformWheelEvent.phase() == PlatformWheelEventPhaseBegan) { 131 ScrollingThread::dispatch([scrollingTree, canRubberBandAtLeft, canRubberBandAtRight, canRubberBandAtTop, canRubberBandAtBottom] { 132 scrollingTree->setCanRubberBandState(canRubberBandAtLeft, canRubberBandAtRight, canRubberBandAtTop, canRubberBandAtBottom); 133 }); 134 } 132 135 133 136 ScrollingTree::EventResult result = scrollingTree->tryToHandleWheelEvent(platformWheelEvent); … … 144 147 #endif 145 148 146 RunLoop::main().dispatch(bind(&EventDispatcher::dispatchWheelEvent, this, pageID, wheelEvent)); 149 RefPtr<EventDispatcher> eventDispatcher(this); 150 RunLoop::main().dispatch([eventDispatcher, pageID, wheelEvent] { 151 eventDispatcher->dispatchWheelEvent(pageID, wheelEvent); 152 }); 147 153 } 148 154 … … 183 189 } 184 190 185 if (updateListWasEmpty) 186 RunLoop::main().dispatch(bind(&EventDispatcher::dispatchTouchEvents, this)); 191 if (updateListWasEmpty) { 192 RefPtr<EventDispatcher> eventDispatcher(this); 193 RunLoop::main().dispatch([eventDispatcher] { 194 eventDispatcher->dispatchTouchEvents(); 195 }); 196 } 187 197 } 188 198
Note:
See TracChangeset
for help on using the changeset viewer.