Changeset 106609 in webkit
- Timestamp:
- Feb 2, 2012 6:04:51 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r106607 r106609 1 2012-02-02 Anders Carlsson <andersca@apple.com> 2 3 Add ScrollingTree class 4 https://bugs.webkit.org/show_bug.cgi?id=77695 5 6 Reviewed by Andreas Kling. 7 8 * WebCore.xcodeproj/project.pbxproj: 9 Add new files. 10 11 * page/scrolling/ScrollingCoordinator.cpp: 12 (WebCore::ScrollingCoordinator::ScrollingCoordinator): 13 Create a scrolling tree. 14 15 (WebCore::ScrollingCoordinator::~ScrollingCoordinator): 16 Assert that the scrolling tree is null. 17 18 (WebCore::ScrollingCoordinator::pageDestroyed): 19 Null out the scrolling tree member variable and tell it to invalidate itself. 20 21 * page/scrolling/ScrollingTree.cpp: Added. 22 23 (WebCore::ScrollingTree::invalidate): 24 Null out the scrolling coordinator, breaking the reference cycle between the scrolling 25 coordinator and the scrolling tree. 26 27 * page/scrolling/ScrollingTree.h: Added. 28 1 29 2012-02-02 Tim Dresser <tdresser@chromium.org> 2 30 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r106565 r106609 489 489 1AA84F05143BA7BD0051D153 /* ScrollElasticityController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA84F03143BA7BD0051D153 /* ScrollElasticityController.h */; }; 490 490 1AA8799011CBE846003C664F /* PluginStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA8798F11CBE846003C664F /* PluginStrategy.h */; settings = {ATTRIBUTES = (Private, ); }; }; 491 1AAADDA314DB409F00AF64B3 /* ScrollingTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAADDA114DB409F00AF64B3 /* ScrollingTree.cpp */; }; 492 1AAADDA414DB409F00AF64B3 /* ScrollingTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAADDA214DB409F00AF64B3 /* ScrollingTree.h */; }; 491 493 1AB1AE7A0C051FDE00139F4F /* zoomInCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AB1AE780C051FDE00139F4F /* zoomInCursor.png */; }; 492 494 1AB1AE7B0C051FDE00139F4F /* zoomOutCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AB1AE790C051FDE00139F4F /* zoomOutCursor.png */; }; … … 7205 7207 1AA84F03143BA7BD0051D153 /* ScrollElasticityController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollElasticityController.h; sourceTree = "<group>"; }; 7206 7208 1AA8798F11CBE846003C664F /* PluginStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginStrategy.h; sourceTree = "<group>"; }; 7209 1AAADDA114DB409F00AF64B3 /* ScrollingTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollingTree.cpp; sourceTree = "<group>"; }; 7210 1AAADDA214DB409F00AF64B3 /* ScrollingTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingTree.h; sourceTree = "<group>"; }; 7207 7211 1AB1AE780C051FDE00139F4F /* zoomInCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = zoomInCursor.png; sourceTree = "<group>"; }; 7208 7212 1AB1AE790C051FDE00139F4F /* zoomOutCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = zoomOutCursor.png; sourceTree = "<group>"; }; … … 13920 13924 1AF62F2014DAFE790041556C /* ScrollingThread.cpp */, 13921 13925 1AF62F2114DAFE790041556C /* ScrollingThread.h */, 13926 1AAADDA114DB409F00AF64B3 /* ScrollingTree.cpp */, 13927 1AAADDA214DB409F00AF64B3 /* ScrollingTree.h */, 13922 13928 ); 13923 13929 path = scrolling; … … 24099 24105 1AF62EE814DA22A70041556C /* ScrollingCoordinator.h in Headers */, 24100 24106 1AF62F2614DAFEA10041556C /* ScrollingThread.h in Headers */, 24107 1AAADDA414DB409F00AF64B3 /* ScrollingTree.h in Headers */, 24101 24108 ); 24102 24109 runOnlyForDeploymentPostprocessing = 0; … … 27027 27034 1AF62F2414DAFE910041556C /* ScrollingThreadMac.mm in Sources */, 27028 27035 1AF62F2514DAFE9E0041556C /* ScrollingThread.cpp in Sources */, 27036 1AAADDA314DB409F00AF64B3 /* ScrollingTree.cpp in Sources */, 27029 27037 ); 27030 27038 runOnlyForDeploymentPostprocessing = 0; -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
r106565 r106609 37 37 #include "ScrollAnimator.h" 38 38 #include "ScrollingThread.h" 39 #include "ScrollingTree.h" 39 40 #include <wtf/Functional.h> 40 41 #include <wtf/MainThread.h> … … 50 51 ScrollingCoordinator::ScrollingCoordinator(Page* page) 51 52 : m_page(page) 53 , m_scrollingTree(ScrollingTree::create(this)) 52 54 , m_didDispatchDidUpdateMainFrameScrollPosition(false) 53 55 { … … 57 59 { 58 60 ASSERT(!m_page); 61 ASSERT(!m_scrollingTree); 59 62 } 60 63 … … 63 66 ASSERT(m_page); 64 67 m_page = 0; 68 69 // Invalidating the scrolling tree will break the reference cycle between the ScrollingCoordinator and ScrollingTree objects. 70 ScrollingThread::dispatch(bind(&ScrollingTree::invalidate, m_scrollingTree.release())); 65 71 } 66 72 -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h
r106565 r106609 45 45 class Page; 46 46 class PlatformWheelEvent; 47 class ScrollingTree; 47 48 48 49 #if ENABLE(GESTURE_EVENTS) … … 97 98 private: 98 99 Page* m_page; 100 RefPtr<ScrollingTree> m_scrollingTree; 99 101 100 102 Mutex m_mainFrameGeometryMutex;
Note: See TracChangeset
for help on using the changeset viewer.