Changeset 169409 in webkit
- Timestamp:
- May 27, 2014, 9:44:51 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 7 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r169408 r169409 1 2014-05-27 Simon Fraser <simon.fraser@apple.com> 2 3 Instantiate a ScrollingTreeMac on Mac 4 https://bugs.webkit.org/show_bug.cgi?id=133332 5 6 Reviewed by Tim Horton. 7 8 Mac previously instantiated a ThreadedScrollingTree, but this has no platform 9 knowledge. To support future expansion, create a ScrollingTreeMac subclass and 10 instantiate that on Mac. 11 12 Also protect ScrollingCoordinatorMac in PLATFORM(MAC) #ifdefs and remove it from the 13 EXCLUDED_SOURCE_FILE_NAMES list in the xcconfig file, following general trends. 14 15 * Configurations/WebCore.xcconfig: 16 * WebCore.xcodeproj/project.pbxproj: 17 * page/scrolling/ThreadedScrollingTree.cpp: 18 (WebCore::ThreadedScrollingTree::create): Deleted. 19 * page/scrolling/ThreadedScrollingTree.h: 20 * page/scrolling/mac/ScrollingCoordinatorMac.h: 21 * page/scrolling/mac/ScrollingCoordinatorMac.mm: 22 (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac): 23 * page/scrolling/mac/ScrollingTreeMac.cpp: Copied from Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h. 24 (ScrollingTreeMac::create): 25 (ScrollingTreeMac::ScrollingTreeMac): 26 * page/scrolling/mac/ScrollingTreeMac.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h. 27 1 28 2014-05-27 Simon Fraser <simon.fraser@apple.com> 2 29 -
trunk/Source/WebCore/Configurations/WebCore.xcconfig
r169395 r169409 113 113 114 114 EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(PLATFORM_NAME)); 115 EXCLUDED_SOURCE_FILE_NAMES_iphoneos = *.tiff *Cursor.png AccessibilityObjectMac.mm AXObjectCacheMac.mm ColorMac.mm Cursor.cpp CursorMac.mm DataTransferMac.mm EditorMac.mm EventHandlerMac.mm EventLoopMac.mm GeolocationServiceMac.mm GraphicsContext3DOpenGLES.cpp IconDatabase.cpp IconMac.mm KillRingMac.mm LocalCurrentGraphicsContext.mm MIMETypeRegistryMac.mm MediaPlayerPrivateQTKit.mm NSScrollerImpDetails.mm NetworkStateNotifierMac.cpp PasteboardMac.mm PlatformEventFactoryMac.mm PlatformMouseEventMac.mm PlatformPasteboardMac.mm PlatformScreenMac.mm PlatformSpeechSynthesizerMac.mm PluginMainThreadScheduler.cpp RunLoopMac.mm SSLKeyGeneratorMac.cpp Scroll ingCoordinatorMac.mm ScrollViewMac.mm ScrollbarThemeMac.mm SharedTimerMac.mm SoundMac.mm SystemTimeMac.cpp ThemeMac.mm ThreadCheck.mm UserAgentMac.mm WebAccessibilityObjectWrapperMac.mm WebCoreSystemInterface.mm WebCoreURLResponse.mm WebCoreView.m WebFontCache.mm WebVideoFullscreenController.mm WebVideoFullscreenHUDWindowController.mm WebWindowAnimation.mm WidgetMac.mm DisplayRefreshMonitorMac.cpp;115 EXCLUDED_SOURCE_FILE_NAMES_iphoneos = *.tiff *Cursor.png AccessibilityObjectMac.mm AXObjectCacheMac.mm ColorMac.mm Cursor.cpp CursorMac.mm DataTransferMac.mm EditorMac.mm EventHandlerMac.mm EventLoopMac.mm GeolocationServiceMac.mm GraphicsContext3DOpenGLES.cpp IconDatabase.cpp IconMac.mm KillRingMac.mm LocalCurrentGraphicsContext.mm MIMETypeRegistryMac.mm MediaPlayerPrivateQTKit.mm NSScrollerImpDetails.mm NetworkStateNotifierMac.cpp PasteboardMac.mm PlatformEventFactoryMac.mm PlatformMouseEventMac.mm PlatformPasteboardMac.mm PlatformScreenMac.mm PlatformSpeechSynthesizerMac.mm PluginMainThreadScheduler.cpp RunLoopMac.mm SSLKeyGeneratorMac.cpp ScrollViewMac.mm ScrollbarThemeMac.mm SharedTimerMac.mm SoundMac.mm SystemTimeMac.cpp ThemeMac.mm ThreadCheck.mm UserAgentMac.mm WebAccessibilityObjectWrapperMac.mm WebCoreSystemInterface.mm WebCoreURLResponse.mm WebCoreView.m WebFontCache.mm WebVideoFullscreenController.mm WebVideoFullscreenHUDWindowController.mm WebWindowAnimation.mm WidgetMac.mm DisplayRefreshMonitorMac.cpp; 116 116 EXCLUDED_SOURCE_FILE_NAMES_iphonesimulator = $(EXCLUDED_SOURCE_FILE_NAMES_iphoneos); 117 117 EXCLUDED_SOURCE_FILE_NAMES_macosx = *IOS.h *IOS.cpp *IOS.mm JSTouch* JSGesture* DOMGesture* DOMTouch* KillRingNone.cpp WAKAppKitStubs.h WAKClipView.h WAKResponder.h WAKScrollView.h WAKView.h WAKViewPrivate.h WAKWindow.h WKContentObservation.h WKGraphics.h WKTypes.h WKUtilities.h WKView.h WKViewPrivate.h WebCoreThread.h WebCoreThreadMessage.h WebCoreThreadRun.h WebCoreThreadSystemInterface.h; -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r169299 r169409 555 555 0FDA7C261883333200C954B5 /* JSWebKitPlaybackTargetAvailabilityEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FDA7C241883333200C954B5 /* JSWebKitPlaybackTargetAvailabilityEvent.cpp */; }; 556 556 0FDA7C271883333200C954B5 /* JSWebKitPlaybackTargetAvailabilityEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FDA7C251883333200C954B5 /* JSWebKitPlaybackTargetAvailabilityEvent.h */; }; 557 0FE5806319327A6200DE32EB /* ScrollingTreeMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FE5806119327A6200DE32EB /* ScrollingTreeMac.cpp */; }; 558 0FE5806419327A6200DE32EB /* ScrollingTreeMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FE5806219327A6200DE32EB /* ScrollingTreeMac.h */; }; 557 559 0FE71405142170B800DB33BA /* ScrollbarThemeMock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FE71403142170B800DB33BA /* ScrollbarThemeMock.cpp */; }; 558 560 0FE71406142170B800DB33BA /* ScrollbarThemeMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FE71404142170B800DB33BA /* ScrollbarThemeMock.h */; }; … … 7443 7445 0FDA7C241883333200C954B5 /* JSWebKitPlaybackTargetAvailabilityEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitPlaybackTargetAvailabilityEvent.cpp; sourceTree = "<group>"; }; 7444 7446 0FDA7C251883333200C954B5 /* JSWebKitPlaybackTargetAvailabilityEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebKitPlaybackTargetAvailabilityEvent.h; sourceTree = "<group>"; }; 7447 0FE5806119327A6200DE32EB /* ScrollingTreeMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollingTreeMac.cpp; sourceTree = "<group>"; }; 7448 0FE5806219327A6200DE32EB /* ScrollingTreeMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingTreeMac.h; sourceTree = "<group>"; }; 7445 7449 0FE71403142170B800DB33BA /* ScrollbarThemeMock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollbarThemeMock.cpp; sourceTree = "<group>"; }; 7446 7450 0FE71404142170B800DB33BA /* ScrollbarThemeMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollbarThemeMock.h; sourceTree = "<group>"; }; … … 15057 15061 93C4A4131629DF5A00C3EB6E /* ScrollingTreeFrameScrollingNodeMac.h */, 15058 15062 93C4A4141629DF5A00C3EB6E /* ScrollingTreeFrameScrollingNodeMac.mm */, 15063 0FE5806219327A6200DE32EB /* ScrollingTreeMac.h */, 15064 0FE5806119327A6200DE32EB /* ScrollingTreeMac.cpp */, 15059 15065 0FB88908167D2FA10010CDA5 /* ScrollingTreeStickyNode.h */, 15060 15066 0FB88909167D2FA10010CDA5 /* ScrollingTreeStickyNode.mm */, … … 26462 26468 0B9056F90F2685F30095FF6A /* WorkerThreadableLoader.h in Headers */, 26463 26469 97AABD2D14FA09D5007457AE /* WorkerThreadableWebSocketChannel.h in Headers */, 26470 0FE5806419327A6200DE32EB /* ScrollingTreeMac.h in Headers */, 26464 26471 93309E24099E64920056E581 /* WrapContentsInDummySpanCommand.h in Headers */, 26465 26472 9BAF3B2412C1A39800014BF1 /* WritingDirection.h in Headers */, … … 27668 27675 A81369CD097374F600D74463 /* HTMLInputElement.cpp in Sources */, 27669 27676 93309DE5099E64920056E581 /* HTMLInterchange.cpp in Sources */, 27677 0FE5806319327A6200DE32EB /* ScrollingTreeMac.cpp in Sources */, 27670 27678 A81369E5097374F600D74463 /* HTMLKeygenElement.cpp in Sources */, 27671 27679 A81369E3097374F600D74463 /* HTMLLabelElement.cpp in Sources */, -
trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp
r164358 r169409 40 40 41 41 namespace WebCore { 42 43 RefPtr<ThreadedScrollingTree> ThreadedScrollingTree::create(AsyncScrollingCoordinator* scrollingCoordinator)44 {45 return adoptRef(new ThreadedScrollingTree(scrollingCoordinator));46 }47 42 48 43 ThreadedScrollingTree::ThreadedScrollingTree(AsyncScrollingCoordinator* scrollingCoordinator) -
trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h
r164358 r169409 44 44 class ThreadedScrollingTree : public ScrollingTree { 45 45 public: 46 static RefPtr<ThreadedScrollingTree> create(AsyncScrollingCoordinator*);47 48 46 virtual ~ThreadedScrollingTree(); 49 47 … … 59 57 virtual void invalidate() override; 60 58 61 pr ivate:59 protected: 62 60 explicit ThreadedScrollingTree(AsyncScrollingCoordinator*); 63 virtual bool isThreadedScrollingTree() const override { return true; }64 61 65 62 virtual PassOwnPtr<ScrollingTreeNode> createNode(ScrollingNodeType, ScrollingNodeID) override; … … 69 66 virtual void handleWheelEventPhase(PlatformWheelEventPhase) override; 70 67 #endif 68 69 private: 70 virtual bool isThreadedScrollingTree() const override { return true; } 71 71 72 72 RefPtr<AsyncScrollingCoordinator> m_scrollingCoordinator; -
trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h
r162139 r169409 27 27 #define ScrollingCoordinatorMac_h 28 28 29 #if ENABLE(ASYNC_SCROLLING) 29 #if ENABLE(ASYNC_SCROLLING) && PLATFORM(MAC) 30 30 31 31 #include "AsyncScrollingCoordinator.h" … … 65 65 } // namespace WebCore 66 66 67 #endif // ENABLE(ASYNC_SCROLLING) 67 #endif // ENABLE(ASYNC_SCROLLING) && PLATFORM(MAC) 68 68 69 69 #endif // ScrollingCoordinatorMac_h -
trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm
r169063 r169409 26 26 #include "config.h" 27 27 28 #if ENABLE(ASYNC_SCROLLING) 28 #if ENABLE(ASYNC_SCROLLING) && PLATFORM(MAC) 29 29 30 30 #import "ScrollingCoordinatorMac.h" … … 39 39 #include "ScrollingTreeFixedNode.h" 40 40 #include "ScrollingTreeFrameScrollingNodeMac.h" 41 #include "ScrollingTreeMac.h" 41 42 #include "ScrollingTreeStickyNode.h" 42 #include "ThreadedScrollingTree.h"43 43 #include "TiledBacking.h" 44 44 #include <wtf/Functional.h> … … 57 57 , m_scrollingStateTreeCommitterTimer(this, &ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired) 58 58 { 59 setScrollingTree( ThreadedScrollingTree::create(this));59 setScrollingTree(ScrollingTreeMac::create(this)); 60 60 } 61 61 … … 163 163 } // namespace WebCore 164 164 165 #endif // ENABLE(ASYNC_SCROLLING) 165 #endif // ENABLE(ASYNC_SCROLLING) && PLATFORM(MAC) -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.cpp
r169408 r169409 1 1 /* 2 * Copyright (C) 201 2Apple Inc. All rights reserved.2 * Copyright (C) 2014 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #i fndef ScrollingCoordinatorMac_h27 # define ScrollingCoordinatorMac_h26 #include "config.h" 27 #include "ScrollingTreeMac.h" 28 28 29 #if ENABLE(ASYNC_SCROLLING) 29 #if ENABLE(ASYNC_SCROLLING) && PLATFORM(MAC) 30 30 31 #include "AsyncScrollingCoordinator.h" 31 using namespace WebCore; 32 32 33 namespace WebCore { 33 RefPtr<ScrollingTreeMac> ScrollingTreeMac::create(AsyncScrollingCoordinator* scrollingCoordinator) 34 { 35 return adoptRef(new ScrollingTreeMac(scrollingCoordinator)); 36 } 34 37 35 class Scrollbar; 36 class ScrollingStateNode; 37 class ScrollingStateScrollingNode; 38 class ScrollingStateTree; 39 class ThreadedScrollingTree; 38 ScrollingTreeMac::ScrollingTreeMac(AsyncScrollingCoordinator* scrollingCoordinator) 39 : ThreadedScrollingTree(scrollingCoordinator) 40 { 41 } 40 42 41 class ScrollingCoordinatorMac : public AsyncScrollingCoordinator { 42 public: 43 explicit ScrollingCoordinatorMac(Page*); 44 virtual ~ScrollingCoordinatorMac(); 45 46 virtual void pageDestroyed(); 47 48 virtual void commitTreeStateIfNeeded() override; 49 50 // Handle the wheel event on the scrolling thread. Returns whether the event was handled or not. 51 virtual bool handleWheelEvent(FrameView*, const PlatformWheelEvent&) override; 52 53 private: 54 virtual PassOwnPtr<ScrollingTreeNode> createScrollingTreeNode(ScrollingNodeType, ScrollingNodeID) override; 55 virtual void scheduleTreeStateCommit() override; 56 57 void scrollingStateTreeCommitterTimerFired(Timer<ScrollingCoordinatorMac>*); 58 void commitTreeState(); 59 60 void updateTiledScrollingIndicator(); 61 62 Timer<ScrollingCoordinatorMac> m_scrollingStateTreeCommitterTimer; 63 }; 64 65 } // namespace WebCore 66 67 #endif // ENABLE(ASYNC_SCROLLING) 68 69 #endif // ScrollingCoordinatorMac_h 43 #endif // ENABLE(ASYNC_SCROLLING) && PLATFORM(MAC) -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.h
r169408 r169409 1 1 /* 2 * Copyright (C) 201 2Apple Inc. All rights reserved.2 * Copyright (C) 2014 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #ifndef Scrolling CoordinatorMac_h27 #define Scrolling CoordinatorMac_h26 #ifndef ScrollingTreeMac_h 27 #define ScrollingTreeMac_h 28 28 29 #if ENABLE(ASYNC_SCROLLING) 29 #if ENABLE(ASYNC_SCROLLING) && PLATFORM(MAC) 30 30 31 #include " AsyncScrollingCoordinator.h"31 #include "ThreadedScrollingTree.h" 32 32 33 33 namespace WebCore { 34 34 35 class Scrollbar; 36 class ScrollingStateNode; 37 class ScrollingStateScrollingNode; 38 class ScrollingStateTree; 39 class ThreadedScrollingTree; 40 41 class ScrollingCoordinatorMac : public AsyncScrollingCoordinator { 35 class ScrollingTreeMac : public ThreadedScrollingTree { 42 36 public: 43 explicit ScrollingCoordinatorMac(Page*); 44 virtual ~ScrollingCoordinatorMac(); 45 46 virtual void pageDestroyed(); 47 48 virtual void commitTreeStateIfNeeded() override; 49 50 // Handle the wheel event on the scrolling thread. Returns whether the event was handled or not. 51 virtual bool handleWheelEvent(FrameView*, const PlatformWheelEvent&) override; 52 37 static RefPtr<ScrollingTreeMac> create(AsyncScrollingCoordinator*); 38 53 39 private: 54 virtual PassOwnPtr<ScrollingTreeNode> createScrollingTreeNode(ScrollingNodeType, ScrollingNodeID) override; 55 virtual void scheduleTreeStateCommit() override; 56 57 void scrollingStateTreeCommitterTimerFired(Timer<ScrollingCoordinatorMac>*); 58 void commitTreeState(); 59 60 void updateTiledScrollingIndicator(); 61 62 Timer<ScrollingCoordinatorMac> m_scrollingStateTreeCommitterTimer; 40 explicit ScrollingTreeMac(AsyncScrollingCoordinator*); 63 41 }; 64 42 65 43 } // namespace WebCore 66 44 67 #endif // ENABLE(ASYNC_SCROLLING) 45 #endif // ENABLE(ASYNC_SCROLLING) && PLATFORM(MAC) 68 46 69 #endif // Scrolling CoordinatorMac_h47 #endif // ScrollingTreeMac_h
Note:
See TracChangeset
for help on using the changeset viewer.