Changeset 106723 in webkit
- Timestamp:
- Feb 3, 2012 5:56:42 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r106722 r106723 1 2012-02-03 Anders Carlsson <andersca@apple.com> 2 3 WebKit2 should dispatch wheel events to the new ScrollingTree class 4 https://bugs.webkit.org/show_bug.cgi?id=77795 5 6 Reviewed by Andreas Kling. 7 8 * WebCore.exp.in: 9 Add new symbols needed by WebKit2. 10 11 * WebCore.xcodeproj/project.pbxproj: 12 Make ScrollingTree.h private so it can be included by WebKit2. 13 14 * page/scrolling/ScrollingCoordinator.cpp: 15 (WebCore::ScrollingCoordinator::scrollingTree): 16 * page/scrolling/ScrollingCoordinator.h: 17 Add a scrolling tree getter. 18 1 19 2012-02-03 Dmitry Lomov <dslomov@google.com> 2 20 -
trunk/Source/WebCore/WebCore.exp.in
r106706 r106723 2067 2067 2068 2068 #if ENABLE(THREADED_SCROLLING) 2069 __ZN7WebCore13ScrollingTree21tryToHandleWheelEventERKNS_18PlatformWheelEventE 2070 __ZN7WebCore13ScrollingTreeD1Ev 2069 2071 __ZN7WebCore20ScrollingCoordinator16handleWheelEventERKNS_18PlatformWheelEventE 2070 2072 __ZN7WebCore20ScrollingCoordinatorD1Ev 2071 2073 __ZN7WebCore4Page20scrollingCoordinatorEv 2074 __ZNK7WebCore20ScrollingCoordinator13scrollingTreeEv 2072 2075 2073 2076 #if ENABLE(GESTURE_EVENTS) -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r106696 r106723 490 490 1AA8799011CBE846003C664F /* PluginStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA8798F11CBE846003C664F /* PluginStrategy.h */; settings = {ATTRIBUTES = (Private, ); }; }; 491 491 1AAADDA314DB409F00AF64B3 /* ScrollingTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAADDA114DB409F00AF64B3 /* ScrollingTree.cpp */; }; 492 1AAADDA414DB409F00AF64B3 /* ScrollingTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAADDA214DB409F00AF64B3 /* ScrollingTree.h */; };492 1AAADDA414DB409F00AF64B3 /* ScrollingTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAADDA214DB409F00AF64B3 /* ScrollingTree.h */; settings = {ATTRIBUTES = (Private, ); }; }; 493 493 1AAADDBE14DC640700AF64B3 /* ScrollingTreeState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAADDBC14DC640600AF64B3 /* ScrollingTreeState.cpp */; }; 494 494 1AAADDBF14DC640700AF64B3 /* ScrollingTreeState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAADDBD14DC640600AF64B3 /* ScrollingTreeState.h */; }; -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
r106696 r106723 74 74 } 75 75 76 ScrollingTree* ScrollingCoordinator::scrollingTree() const 77 { 78 ASSERT(m_scrollingTree); 79 return m_scrollingTree.get(); 80 } 81 76 82 bool ScrollingCoordinator::coordinatesScrollingForFrameView(FrameView* frameView) const 77 83 { -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h
r106690 r106723 59 59 60 60 void pageDestroyed(); 61 62 ScrollingTree* scrollingTree() const; 61 63 62 64 // Return whether this scrolling coordinator handles scrolling for the given frame view. -
trunk/Source/WebKit2/ChangeLog
r106717 r106723 1 2012-02-03 Anders Carlsson <andersca@apple.com> 2 3 WebKit2 should dispatch wheel events to the new ScrollingTree class 4 https://bugs.webkit.org/show_bug.cgi?id=77795 5 6 Reviewed by Andreas Kling. 7 8 Replace all uses of ScrollingCoordinator with ScrollingTree instead. 9 Also, don't try to handle gesture events on the scrolling thread anymore; 10 we don't need to to that right now. 11 12 * WebProcess/WebPage/EventDispatcher.cpp: 13 (WebKit::EventDispatcher::addScrollingTreeForPage): 14 (WebKit::EventDispatcher::removeScrollingTreeForPage): 15 (WebKit::EventDispatcher::wheelEvent): 16 (WebKit::EventDispatcher::gestureEvent): 17 * WebProcess/WebPage/EventDispatcher.h: 18 (WebCore): 19 (EventDispatcher): 20 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 21 (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): 22 (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea): 23 1 24 2012-02-03 Alexey Proskuryakov <ap@apple.com> 2 25 -
trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp
r105475 r106723 38 38 #if ENABLE(THREADED_SCROLLING) 39 39 #include <WebCore/ScrollingCoordinator.h> 40 #include <WebCore/ScrollingTree.h> 40 41 #endif 41 42 … … 53 54 54 55 #if ENABLE(THREADED_SCROLLING) 55 void EventDispatcher::addScrolling CoordinatorForPage(WebPage* webPage)56 void EventDispatcher::addScrollingTreeForPage(WebPage* webPage) 56 57 { 57 MutexLocker locker(m_scrolling CoordinatorsMutex);58 MutexLocker locker(m_scrollingTreesMutex); 58 59 59 60 ASSERT(webPage->corePage()->scrollingCoordinator()); 60 ASSERT(!m_scrolling Coordinators.contains(webPage->pageID()));61 m_scrolling Coordinators.set(webPage->pageID(), webPage->corePage()->scrollingCoordinator());61 ASSERT(!m_scrollingTrees.contains(webPage->pageID())); 62 m_scrollingTrees.set(webPage->pageID(), webPage->corePage()->scrollingCoordinator()->scrollingTree()); 62 63 } 63 64 64 void EventDispatcher::removeScrolling CoordinatorForPage(WebPage* webPage)65 void EventDispatcher::removeScrollingTreeForPage(WebPage* webPage) 65 66 { 66 MutexLocker locker(m_scrolling CoordinatorsMutex);67 ASSERT(m_scrolling Coordinators.contains(webPage->pageID()));67 MutexLocker locker(m_scrollingTreesMutex); 68 ASSERT(m_scrollingTrees.contains(webPage->pageID())); 68 69 69 m_scrolling Coordinators.remove(webPage->pageID());70 m_scrollingTrees.remove(webPage->pageID()); 70 71 } 71 72 #endif … … 82 83 { 83 84 #if ENABLE(THREADED_SCROLLING) 84 MutexLocker locker(m_scrolling CoordinatorsMutex);85 if (Scrolling Coordinator* scrollingCoordinator = m_scrollingCoordinators.get(pageID).get()) {85 MutexLocker locker(m_scrollingTreesMutex); 86 if (ScrollingTree* scrollingTree = m_scrollingTrees.get(pageID).get()) { 86 87 PlatformWheelEvent platformWheelEvent = platform(wheelEvent); 87 88 88 if (scrolling Coordinator->handleWheelEvent(platformWheelEvent)) {89 if (scrollingTree->tryToHandleWheelEvent(platformWheelEvent)) { 89 90 sendDidHandleEvent(pageID, wheelEvent); 90 91 return; … … 99 100 void EventDispatcher::gestureEvent(CoreIPC::Connection*, uint64_t pageID, const WebGestureEvent& gestureEvent) 100 101 { 101 #if ENABLE(THREADED_SCROLLING)102 MutexLocker locker(m_scrollingCoordinatorsMutex);103 if (ScrollingCoordinator* scrollingCoordinator = m_scrollingCoordinators.get(pageID).get()) {104 PlatformGestureEvent platformGestureEvent = platform(gestureEvent);105 106 if (scrollingCoordinator->handleGestureEvent(platformGestureEvent)) {107 sendDidHandleEvent(pageID, gestureEvent);108 return;109 }110 }111 #endif112 113 102 RunLoop::main()->dispatch(bind(&EventDispatcher::dispatchGestureEvent, this, pageID, gestureEvent)); 114 103 } -
trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.h
r104623 r106723 34 34 35 35 namespace WebCore { 36 class Scrolling Coordinator;36 class ScrollingTree; 37 37 } 38 38 … … 55 55 56 56 #if ENABLE(THREADED_SCROLLING) 57 void addScrolling CoordinatorForPage(WebPage*);58 void removeScrolling CoordinatorForPage(WebPage*);57 void addScrollingTreeForPage(WebPage*); 58 void removeScrollingTreeForPage(WebPage*); 59 59 #endif 60 60 … … 81 81 void sendDidHandleEvent(uint64_t pageID, const WebEvent&); 82 82 83 Mutex m_scrolling CoordinatorsMutex;84 HashMap<uint64_t, RefPtr<WebCore::Scrolling Coordinator> > m_scrollingCoordinators;83 Mutex m_scrollingTreesMutex; 84 HashMap<uint64_t, RefPtr<WebCore::ScrollingTree> > m_scrollingTrees; 85 85 #endif 86 86 }; -
trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
r105008 r106723 67 67 page->settings()->setScrollingCoordinatorEnabled(true); 68 68 69 WebProcess::shared().eventDispatcher().addScrolling CoordinatorForPage(webPage);69 WebProcess::shared().eventDispatcher().addScrollingTreeForPage(webPage); 70 70 #endif 71 71 … … 89 89 { 90 90 #if ENABLE(THREADED_SCROLLING) 91 WebProcess::shared().eventDispatcher().removeScrolling CoordinatorForPage(m_webPage);91 WebProcess::shared().eventDispatcher().removeScrollingTreeForPage(m_webPage); 92 92 #endif 93 93
Note: See TracChangeset
for help on using the changeset viewer.