Changeset 160944 in webkit
- Timestamp:
- Dec 20, 2013, 4:35:44 PM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 51 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r160899 r160944 1 2013-12-20 Simon Fraser <simon.fraser@apple.com> 2 3 Change "threaded scrolling" terminology to "asynchronous scrolling" 4 https://bugs.webkit.org/show_bug.cgi?id=126094 5 6 Reviewed by Tim Horton. 7 8 Rename ENABLE_THREADED_SCROLLING to ENABLE_ASYNC_SCROLLING. 9 10 * wtf/FeatureDefines.h: 11 1 12 2013-12-20 Tamas Gergely <tgergely.u-szeged@partner.samsung.com> 2 13 -
trunk/Source/WTF/wtf/FeatureDefines.h
r160733 r160944 199 199 #endif 200 200 201 #if !defined(ENABLE_ THREADED_SCROLLING)202 #define ENABLE_ THREADED_SCROLLING 1201 #if !defined(ENABLE_ASYNC_SCROLLING) 202 #define ENABLE_ASYNC_SCROLLING 1 203 203 #endif 204 204 … … 805 805 #endif 806 806 807 #if !defined(ENABLE_ THREADED_SCROLLING)808 #define ENABLE_ THREADED_SCROLLING 0807 #if !defined(ENABLE_ASYNC_SCROLLING) 808 #define ENABLE_ASYNC_SCROLLING 0 809 809 #endif 810 810 -
trunk/Source/WebCore/ChangeLog
r160943 r160944 1 2013-12-20 Simon Fraser <simon.fraser@apple.com> 2 3 Change "threaded scrolling" terminology to "asynchronous scrolling" 4 https://bugs.webkit.org/show_bug.cgi?id=126094 5 6 Reviewed by Tim Horton. 7 8 Rename ENABLE_THREADED_SCROLLING to ENABLE_ASYNC_SCROLLING, and change 9 references to "main thread scrolling" to "synchronous scrolling". 10 11 In a few places, functions with names like shouldUpdateScrollLayerPositionOnMainThread() 12 were actually returning SynchronousScrollingReasons, so rename them appropriately. 13 14 * WebCore.exp.in: 15 * page/FrameView.cpp: 16 (WebCore::FrameView::shouldUpdateCompositingLayersAfterScrolling): 17 (WebCore::FrameView::isRubberBandInProgress): 18 (WebCore::FrameView::requestScrollPositionUpdate): 19 (WebCore::FrameView::updatesScrollLayerPositionOnMainThread): 20 (WebCore::FrameView::wheelEvent): 21 * page/Page.cpp: 22 (WebCore::Page::synchronousScrollingReasonsAsText): 23 * page/Page.h: 24 * page/scrolling/ScrollingCoordinator.cpp: 25 (WebCore::ScrollingCoordinator::create): 26 (WebCore::ScrollingCoordinator::ScrollingCoordinator): 27 (WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange): 28 (WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange): 29 (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange): 30 (WebCore::ScrollingCoordinator::synchronousScrollingReasons): 31 (WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons): 32 (WebCore::ScrollingCoordinator::setForceSynchronousScrollLayerPositionUpdates): 33 (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText): 34 * page/scrolling/ScrollingCoordinator.h: 35 (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously): 36 (WebCore::ScrollingCoordinator::setSynchronousScrollingReasons): 37 * page/scrolling/ScrollingStateFixedNode.cpp: 38 * page/scrolling/ScrollingStateFixedNode.h: 39 * page/scrolling/ScrollingStateNode.cpp: 40 * page/scrolling/ScrollingStateNode.h: 41 * page/scrolling/ScrollingStateScrollingNode.cpp: 42 (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode): 43 (WebCore::ScrollingStateScrollingNode::setSynchronousScrollingReasons): 44 (WebCore::ScrollingStateScrollingNode::dumpProperties): 45 * page/scrolling/ScrollingStateScrollingNode.h: Awkward "ReasonsForSynchronousScrolling" to avoid 46 conflict with the enum called SynchronousScrollingReasons. 47 * page/scrolling/ScrollingStateStickyNode.cpp: 48 * page/scrolling/ScrollingStateStickyNode.h: 49 * page/scrolling/ScrollingStateTree.cpp: 50 * page/scrolling/ScrollingStateTree.h: 51 * page/scrolling/ScrollingThread.cpp: 52 * page/scrolling/ScrollingThread.h: 53 * page/scrolling/ScrollingTree.cpp: 54 * page/scrolling/ScrollingTree.h: 55 * page/scrolling/ScrollingTreeNode.cpp: 56 * page/scrolling/ScrollingTreeNode.h: 57 * page/scrolling/ScrollingTreeScrollingNode.cpp: 58 (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode): 59 (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren): 60 * page/scrolling/ScrollingTreeScrollingNode.h: 61 (WebCore::ScrollingTreeScrollingNode::synchronousScrollingReasons): 62 (WebCore::ScrollingTreeScrollingNode::shouldUpdateScrollLayerPositionSynchronously): 63 * page/scrolling/mac/ScrollingCoordinatorMac.h: 64 * page/scrolling/mac/ScrollingCoordinatorMac.mm: 65 (WebCore::ScrollingCoordinatorMac::setSynchronousScrollingReasons): 66 (WebCore::ScrollingCoordinatorMac::commitTreeState): 67 * page/scrolling/mac/ScrollingStateNodeMac.mm: 68 * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm: 69 * page/scrolling/mac/ScrollingThreadMac.mm: 70 * page/scrolling/mac/ScrollingTreeFixedNode.h: 71 * page/scrolling/mac/ScrollingTreeFixedNode.mm: 72 * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h: 73 * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm: 74 (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren): 75 (WebCore::ScrollingTreeScrollingNodeMac::scrollPosition): 76 (WebCore::ScrollingTreeScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints): 77 (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition): 78 (WebCore::logThreadedScrollingMode): 79 * page/scrolling/mac/ScrollingTreeStickyNode.h: 80 * page/scrolling/mac/ScrollingTreeStickyNode.mm: 81 * platform/Scrollbar.cpp: 82 (WebCore::Scrollbar::supportsUpdateOnSecondaryThread): 83 * platform/graphics/TiledBacking.h: 84 * platform/graphics/ca/mac/TileController.mm: 85 (WebCore::TileController::TileController): 86 (WebCore::TileController::updateTileCoverageMap): 87 * platform/mac/MemoryPressureHandlerMac.mm: 88 (WebCore::MemoryPressureHandler::releaseMemory): 89 * rendering/RenderLayer.cpp: 90 (WebCore::RenderLayer::setupFontSubpixelQuantization): 91 * rendering/RenderLayerBacking.cpp: 92 (WebCore::computeTileCoverage): 93 * testing/Internals.cpp: 94 (WebCore::Internals::mainThreadScrollingReasons): 95 * testing/Internals.idl: 96 1 97 2013-12-20 Tim Horton <timothy_horton@apple.com> 2 98 -
trunk/Source/WebCore/WebCore.exp.in
r160923 r160944 998 998 __ZN7WebCore4Page31setCustomHTMLTokenizerChunkSizeEi 999 999 __ZN7WebCore4Page31setCustomHTMLTokenizerTimeDelayEd 1000 __ZN7WebCore4Page3 2mainThreadScrollingReasonsAsTextEv1000 __ZN7WebCore4Page33synchronousScrollingReasonsAsTextEv 1001 1001 __ZN7WebCore4Page32setMemoryCacheClientCallsEnabledEb 1002 1002 __ZN7WebCore4Page35resumeActiveDOMObjectsAndAnimationsEv … … 2862 2862 #endif 2863 2863 2864 #if ENABLE( THREADED_SCROLLING)2864 #if ENABLE(ASYNC_SCROLLING) 2865 2865 __ZN7WebCore13ScrollingTree21setCanRubberBandStateEbbbb 2866 2866 __ZN7WebCore13ScrollingTree21tryToHandleWheelEventERKNS_18PlatformWheelEventE … … 2869 2869 __ZN7WebCore15ScrollingThread15dispatchBarrierERKN3WTF8FunctionIFvvEEE 2870 2870 __ZN7WebCore15ScrollingThread8dispatchERKN3WTF8FunctionIFvvEEE 2871 __ZN7WebCore20ScrollingCoordinator4 4setForceMainThreadScrollLayerPositionUpdatesEb2871 __ZN7WebCore20ScrollingCoordinator45setForceSynchronousScrollLayerPositionUpdatesEb 2872 2872 __ZN7WebCore4Page20scrollingCoordinatorEv 2873 2873 #endif -
trunk/Source/WebCore/page/FrameView.cpp
r160847 r160944 1975 1975 bool FrameView::shouldUpdateCompositingLayersAfterScrolling() const 1976 1976 { 1977 #if ENABLE( THREADED_SCROLLING)1977 #if ENABLE(ASYNC_SCROLLING) 1978 1978 // If the scrolling thread is updating the fixed elements, then the FrameView should not update them as well. 1979 1979 … … 1992 1992 return true; 1993 1993 1994 if (scrollingCoordinator->shouldUpdateScrollLayerPosition OnMainThread())1994 if (scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously()) 1995 1995 return true; 1996 1996 … … 2025 2025 if (Page* page = frame().page()) { 2026 2026 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator()) { 2027 if (!scrollingCoordinator->shouldUpdateScrollLayerPosition OnMainThread())2027 if (!scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously()) 2028 2028 return scrollingCoordinator->isRubberBandInProgress(); 2029 2029 } … … 2040 2040 bool FrameView::requestScrollPositionUpdate(const IntPoint& position) 2041 2041 { 2042 #if ENABLE( THREADED_SCROLLING)2042 #if ENABLE(ASYNC_SCROLLING) 2043 2043 if (TiledBacking* tiledBacking = this->tiledBacking()) { 2044 2044 IntRect visibleRect = visibleContentRect(); … … 2990 2990 if (Page* page = frame().page()) { 2991 2991 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator()) 2992 return scrollingCoordinator->shouldUpdateScrollLayerPosition OnMainThread();2992 return scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously(); 2993 2993 } 2994 2994 … … 4004 4004 return false; 4005 4005 4006 #if ENABLE( THREADED_SCROLLING)4006 #if ENABLE(ASYNC_SCROLLING) 4007 4007 if (Page* page = frame().page()) { 4008 4008 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator()) { -
trunk/Source/WebCore/page/Page.cpp
r160370 r160944 280 280 } 281 281 282 String Page:: mainThreadScrollingReasonsAsText()282 String Page::synchronousScrollingReasonsAsText() 283 283 { 284 284 if (Document* document = m_mainFrame->document()) … … 286 286 287 287 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator()) 288 return scrollingCoordinator-> mainThreadScrollingReasonsAsText();288 return scrollingCoordinator->synchronousScrollingReasonsAsText(); 289 289 290 290 return String(); -
trunk/Source/WebCore/page/Page.h
r160599 r160944 207 207 208 208 String scrollingStateTreeAsText(); 209 String mainThreadScrollingReasonsAsText();209 String synchronousScrollingReasonsAsText(); 210 210 PassRefPtr<ClientRectList> nonFastScrollableRects(const Frame*); 211 211 -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
r157361 r160944 46 46 #endif 47 47 48 #if ENABLE( THREADED_SCROLLING)48 #if ENABLE(ASYNC_SCROLLING) 49 49 #include "ScrollingCoordinatorMac.h" 50 50 #endif … … 62 62 PassRefPtr<ScrollingCoordinator> ScrollingCoordinator::create(Page* page) 63 63 { 64 #if USE(ACCELERATED_COMPOSITING) && ENABLE( THREADED_SCROLLING)64 #if USE(ACCELERATED_COMPOSITING) && ENABLE(ASYNC_SCROLLING) 65 65 return adoptRef(new ScrollingCoordinatorMac(page)); 66 66 #endif … … 82 82 , m_scheduledUpdateIsProgrammaticScroll(false) 83 83 , m_scheduledScrollingLayerPositionAction(SyncScrollingLayerPosition) 84 , m_force MainThreadScrollLayerPositionUpdates(false)84 , m_forceSynchronousScrollLayerPositionUpdates(false) 85 85 { 86 86 } … … 183 183 return; 184 184 185 updateS houldUpdateScrollLayerPositionOnMainThread();185 updateSynchronousScrollingReasons(); 186 186 } 187 187 … … 194 194 return; 195 195 196 updateS houldUpdateScrollLayerPositionOnMainThread();196 updateSynchronousScrollingReasons(); 197 197 } 198 198 … … 272 272 frameViewLayoutUpdated(frameView); 273 273 recomputeWheelEventHandlerCountForFrameView(frameView); 274 updateS houldUpdateScrollLayerPositionOnMainThread();274 updateSynchronousScrollingReasons(); 275 275 } 276 276 … … 393 393 } 394 394 395 MainThreadScrollingReasons ScrollingCoordinator::mainThreadScrollingReasons() const395 SynchronousScrollingReasons ScrollingCoordinator::synchronousScrollingReasons() const 396 396 { 397 397 FrameView* frameView = m_page->mainFrame().view(); 398 398 if (!frameView) 399 return static_cast< MainThreadScrollingReasons>(0);400 401 MainThreadScrollingReasons mainThreadScrollingReasons = (MainThreadScrollingReasons)0;402 403 if (m_force MainThreadScrollLayerPositionUpdates)404 mainThreadScrollingReasons |= ForcedOnMainThread;399 return static_cast<SynchronousScrollingReasons>(0); 400 401 SynchronousScrollingReasons synchronousScrollingReasons = (SynchronousScrollingReasons)0; 402 403 if (m_forceSynchronousScrollLayerPositionUpdates) 404 synchronousScrollingReasons |= ForcedOnMainThread; 405 405 if (frameView->hasSlowRepaintObjects()) 406 mainThreadScrollingReasons |= HasSlowRepaintObjects;406 synchronousScrollingReasons |= HasSlowRepaintObjects; 407 407 if (!supportsFixedPositionLayers() && frameView->hasViewportConstrainedObjects()) 408 mainThreadScrollingReasons |= HasViewportConstrainedObjectsWithoutSupportingFixedLayers;408 synchronousScrollingReasons |= HasViewportConstrainedObjectsWithoutSupportingFixedLayers; 409 409 if (supportsFixedPositionLayers() && hasVisibleSlowRepaintViewportConstrainedObjects(frameView)) 410 mainThreadScrollingReasons |= HasNonLayerViewportConstrainedObjects;410 synchronousScrollingReasons |= HasNonLayerViewportConstrainedObjects; 411 411 if (m_page->mainFrame().document() && m_page->mainFrame().document()->isImageDocument()) 412 mainThreadScrollingReasons |= IsImageDocument;413 414 return mainThreadScrollingReasons;415 } 416 417 void ScrollingCoordinator::updateS houldUpdateScrollLayerPositionOnMainThread()418 { 419 setS houldUpdateScrollLayerPositionOnMainThread(mainThreadScrollingReasons());420 } 421 422 void ScrollingCoordinator::setForce MainThreadScrollLayerPositionUpdates(bool forceMainThreadScrollLayerPositionUpdates)423 { 424 if (m_force MainThreadScrollLayerPositionUpdates == forceMainThreadScrollLayerPositionUpdates)425 return; 426 427 m_force MainThreadScrollLayerPositionUpdates = forceMainThreadScrollLayerPositionUpdates;428 updateS houldUpdateScrollLayerPositionOnMainThread();412 synchronousScrollingReasons |= IsImageDocument; 413 414 return synchronousScrollingReasons; 415 } 416 417 void ScrollingCoordinator::updateSynchronousScrollingReasons() 418 { 419 setSynchronousScrollingReasons(synchronousScrollingReasons()); 420 } 421 422 void ScrollingCoordinator::setForceSynchronousScrollLayerPositionUpdates(bool forceSynchronousScrollLayerPositionUpdates) 423 { 424 if (m_forceSynchronousScrollLayerPositionUpdates == forceSynchronousScrollLayerPositionUpdates) 425 return; 426 427 m_forceSynchronousScrollLayerPositionUpdates = forceSynchronousScrollLayerPositionUpdates; 428 updateSynchronousScrollingReasons(); 429 429 } 430 430 … … 440 440 } 441 441 442 String ScrollingCoordinator:: mainThreadScrollingReasonsAsText(MainThreadScrollingReasons reasons)442 String ScrollingCoordinator::synchronousScrollingReasonsAsText(SynchronousScrollingReasons reasons) 443 443 { 444 444 StringBuilder stringBuilder; … … 460 460 } 461 461 462 String ScrollingCoordinator:: mainThreadScrollingReasonsAsText() const463 { 464 return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons());462 String ScrollingCoordinator::synchronousScrollingReasonsAsText() const 463 { 464 return synchronousScrollingReasonsAsText(synchronousScrollingReasons()); 465 465 } 466 466 -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h
r160652 r160944 35 35 #include <wtf/Forward.h> 36 36 37 #if ENABLE( THREADED_SCROLLING)37 #if ENABLE(ASYNC_SCROLLING) 38 38 #include <wtf/HashMap.h> 39 39 #include <wtf/ThreadSafeRefCounted.h> … … 47 47 namespace WebCore { 48 48 49 typedef unsigned MainThreadScrollingReasons;49 typedef unsigned SynchronousScrollingReasons; 50 50 typedef uint64_t ScrollingNodeID; 51 51 … … 61 61 class ViewportConstraints; 62 62 63 #if ENABLE( THREADED_SCROLLING)63 #if ENABLE(ASYNC_SCROLLING) 64 64 class ScrollingTree; 65 65 #endif … … 108 108 virtual void pageDestroyed(); 109 109 110 #if ENABLE( THREADED_SCROLLING)110 #if ENABLE(ASYNC_SCROLLING) 111 111 virtual ScrollingTree* scrollingTree() const { return 0; } 112 112 #endif … … 141 141 142 142 // Force all scroll layer position updates to happen on the main thread. 143 void setForce MainThreadScrollLayerPositionUpdates(bool);143 void setForceSynchronousScrollLayerPositionUpdates(bool); 144 144 145 145 // These virtual functions are currently unique to the threaded scrolling architecture. … … 173 173 }; 174 174 175 MainThreadScrollingReasons mainThreadScrollingReasons() const;176 bool shouldUpdateScrollLayerPosition OnMainThread() const { return mainThreadScrollingReasons() != 0; }175 SynchronousScrollingReasons synchronousScrollingReasons() const; 176 bool shouldUpdateScrollLayerPositionSynchronously() const { return synchronousScrollingReasons(); } 177 177 178 178 virtual void willDestroyScrollableArea(ScrollableArea*) { } … … 181 181 virtual void setLayerIsContainerForFixedPositionLayers(GraphicsLayer*, bool) { } 182 182 183 static String mainThreadScrollingReasonsAsText(MainThreadScrollingReasons);184 String mainThreadScrollingReasonsAsText() const;183 static String synchronousScrollingReasonsAsText(SynchronousScrollingReasons); 184 String synchronousScrollingReasonsAsText() const; 185 185 186 186 Region computeNonFastScrollableRegion(const Frame*, const IntPoint& frameLocation) const; … … 205 205 private: 206 206 virtual void recomputeWheelEventHandlerCountForFrameView(FrameView*) { } 207 virtual void setS houldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons) { }207 virtual void setSynchronousScrollingReasons(SynchronousScrollingReasons) { } 208 208 209 209 virtual bool hasVisibleSlowRepaintViewportConstrainedObjects(FrameView*) const; 210 void updateS houldUpdateScrollLayerPositionOnMainThread();210 void updateSynchronousScrollingReasons(); 211 211 212 212 void updateMainFrameScrollPositionTimerFired(Timer<ScrollingCoordinator>*); … … 217 217 SetOrSyncScrollingLayerPosition m_scheduledScrollingLayerPositionAction; 218 218 219 bool m_force MainThreadScrollLayerPositionUpdates;219 bool m_forceSynchronousScrollLayerPositionUpdates; 220 220 }; 221 221 -
trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp
r148298 r160944 32 32 #include <wtf/OwnPtr.h> 33 33 34 #if ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)34 #if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) 35 35 36 36 namespace WebCore { … … 114 114 } // namespace WebCore 115 115 116 #endif // ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)116 #endif // ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) -
trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.h
r159207 r160944 27 27 #define ScrollingStateFixedNode_h 28 28 29 #if ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)29 #if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) 30 30 31 31 #include "ScrollingConstraints.h" … … 70 70 } // namespace WebCore 71 71 72 #endif // ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)72 #endif // ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) 73 73 74 74 #endif // ScrollingStateFixedNode_h -
trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp
r158183 r160944 27 27 #include "ScrollingStateNode.h" 28 28 29 #if ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)29 #if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) 30 30 31 31 #include "ScrollingStateFixedNode.h" … … 157 157 } // namespace WebCore 158 158 159 #endif // ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)159 #endif // ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) -
trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h
r159207 r160944 27 27 #define ScrollingStateNode_h 28 28 29 #if ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)29 #if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) 30 30 31 31 #include "PlatformLayer.h" … … 120 120 } // namespace WebCore 121 121 122 #endif // ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)122 #endif // ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) 123 123 124 124 #endif // ScrollingStateNode_h -
trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp
r160652 r160944 27 27 #include "ScrollingStateScrollingNode.h" 28 28 29 #if ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)29 #if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) 30 30 31 31 #include "ScrollingStateTree.h" … … 51 51 , m_frameScaleFactor(1) 52 52 , m_wheelEventHandlerCount(0) 53 , m_s houldUpdateScrollLayerPositionOnMainThread(0)53 , m_synchronousScrollingReasons(0) 54 54 , m_behaviorForFixed(StickToDocumentBounds) 55 55 , m_headerHeight(0) … … 72 72 , m_frameScaleFactor(stateNode.frameScaleFactor()) 73 73 , m_wheelEventHandlerCount(stateNode.wheelEventHandlerCount()) 74 , m_s houldUpdateScrollLayerPositionOnMainThread(stateNode.shouldUpdateScrollLayerPositionOnMainThread())74 , m_synchronousScrollingReasons(stateNode.synchronousScrollingReasons()) 75 75 , m_behaviorForFixed(stateNode.scrollBehaviorForFixedElements()) 76 76 , m_headerHeight(stateNode.headerHeight()) … … 164 164 } 165 165 166 void ScrollingStateScrollingNode::setS houldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons reasons)167 { 168 if (m_s houldUpdateScrollLayerPositionOnMainThread== reasons)169 return; 170 171 m_s houldUpdateScrollLayerPositionOnMainThread= reasons;172 setPropertyChanged( ShouldUpdateScrollLayerPositionOnMainThread);166 void ScrollingStateScrollingNode::setSynchronousScrollingReasons(SynchronousScrollingReasons reasons) 167 { 168 if (m_synchronousScrollingReasons == reasons) 169 return; 170 171 m_synchronousScrollingReasons = reasons; 172 setPropertyChanged(ReasonsForSynchronousScrolling); 173 173 m_scrollingStateTree->setHasChangedProperties(true); 174 174 } … … 231 231 } 232 232 233 if (m_s houldUpdateScrollLayerPositionOnMainThread) {234 writeIndent(ts, indent + 1); 235 ts << "(Scrolling on main thread because: " << ScrollingCoordinator:: mainThreadScrollingReasonsAsText(m_shouldUpdateScrollLayerPositionOnMainThread) << ")\n";233 if (m_synchronousScrollingReasons) { 234 writeIndent(ts, indent + 1); 235 ts << "(Scrolling on main thread because: " << ScrollingCoordinator::synchronousScrollingReasonsAsText(m_synchronousScrollingReasons) << ")\n"; 236 236 } 237 237 … … 249 249 } // namespace WebCore 250 250 251 #endif // ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)251 #endif // ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) -
trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h
r160652 r160944 27 27 #define ScrollingStateScrollingNode_h 28 28 29 #if ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)29 #if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) 30 30 31 31 #include "IntRect.h" … … 57 57 NonFastScrollableRegion, 58 58 WheelEventHandlerCount, 59 ShouldUpdateScrollLayerPositionOnMainThread,59 ReasonsForSynchronousScrolling, 60 60 RequestedScrollPosition, 61 61 CounterScrollingLayer, … … 86 86 void setWheelEventHandlerCount(unsigned); 87 87 88 MainThreadScrollingReasons shouldUpdateScrollLayerPositionOnMainThread() const { return m_shouldUpdateScrollLayerPositionOnMainThread; }89 void setS houldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons);88 SynchronousScrollingReasons synchronousScrollingReasons() const { return m_synchronousScrollingReasons; } 89 void setSynchronousScrollingReasons(SynchronousScrollingReasons); 90 90 91 91 const ScrollableAreaParameters& scrollableAreaParameters() const { return m_scrollableAreaParameters; } … … 154 154 float m_frameScaleFactor; 155 155 unsigned m_wheelEventHandlerCount; 156 MainThreadScrollingReasons m_shouldUpdateScrollLayerPositionOnMainThread;156 SynchronousScrollingReasons m_synchronousScrollingReasons; 157 157 ScrollBehaviorForFixedElements m_behaviorForFixed; 158 158 int m_headerHeight; … … 166 166 } // namespace WebCore 167 167 168 #endif // ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)168 #endif // ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) 169 169 170 170 #endif // ScrollingStateScrollingNode_h -
trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.cpp
r152998 r160944 27 27 #include "ScrollingStateStickyNode.h" 28 28 29 #if ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)29 #if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) 30 30 31 31 #include "GraphicsLayer.h" … … 133 133 } // namespace WebCore 134 134 135 #endif // ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)135 #endif // ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) -
trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.h
r159207 r160944 27 27 #define ScrollingStateStickyNode_h 28 28 29 #if ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)29 #if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) 30 30 31 31 #include "ScrollingConstraints.h" … … 70 70 } // namespace WebCore 71 71 72 #endif // ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)72 #endif // ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) 73 73 74 74 #endif // ScrollingStateStickyNode_h -
trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp
r151581 r160944 27 27 #include "ScrollingStateTree.h" 28 28 29 #if ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)29 #if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) 30 30 31 31 #include "ScrollingStateFixedNode.h" … … 187 187 } // namespace WebCore 188 188 189 #endif // ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)189 #endif // ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) -
trunk/Source/WebCore/page/scrolling/ScrollingStateTree.h
r151581 r160944 27 27 #define ScrollingStateTree_h 28 28 29 #if ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)29 #if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) 30 30 31 31 #include "ScrollingStateScrollingNode.h" … … 83 83 } // namespace WebCore 84 84 85 #endif // ENABLE( THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)85 #endif // ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS) 86 86 87 87 #endif // ScrollingStateTree_h -
trunk/Source/WebCore/page/scrolling/ScrollingThread.cpp
r157653 r160944 27 27 #include "ScrollingThread.h" 28 28 29 #if ENABLE( THREADED_SCROLLING)29 #if ENABLE(ASYNC_SCROLLING) 30 30 31 31 #include <wtf/MainThread.h> … … 120 120 } // namespace WebCore 121 121 122 #endif // ENABLE( THREADED_SCROLLING)122 #endif // ENABLE(ASYNC_SCROLLING) -
trunk/Source/WebCore/page/scrolling/ScrollingThread.h
r157653 r160944 27 27 #define ScrollingThread_h 28 28 29 #if ENABLE( THREADED_SCROLLING)29 #if ENABLE(ASYNC_SCROLLING) 30 30 31 31 #include <wtf/Functional.h> … … 86 86 } // namespace WebCore 87 87 88 #endif // ENABLE( THREADED_SCROLLING)88 #endif // ENABLE(ASYNC_SCROLLING) 89 89 90 90 #endif // ScrollingThread_h -
trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp
r160742 r160944 27 27 #include "ScrollingTree.h" 28 28 29 #if ENABLE( THREADED_SCROLLING)29 #if ENABLE(ASYNC_SCROLLING) 30 30 31 31 #include "PlatformWheelEvent.h" … … 362 362 } // namespace WebCore 363 363 364 #endif // ENABLE( THREADED_SCROLLING)364 #endif // ENABLE(ASYNC_SCROLLING) -
trunk/Source/WebCore/page/scrolling/ScrollingTree.h
r160742 r160944 27 27 #define ScrollingTree_h 28 28 29 #if ENABLE( THREADED_SCROLLING)29 #if ENABLE(ASYNC_SCROLLING) 30 30 31 31 #include "PlatformWheelEvent.h" … … 146 146 } // namespace WebCore 147 147 148 #endif // ENABLE( THREADED_SCROLLING)148 #endif // ENABLE(ASYNC_SCROLLING) 149 149 150 150 #endif // ScrollingTree_h -
trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp
r158893 r160944 27 27 #include "ScrollingTreeNode.h" 28 28 29 #if ENABLE( THREADED_SCROLLING)29 #if ENABLE(ASYNC_SCROLLING) 30 30 31 31 #include "ScrollingStateTree.h" … … 75 75 } // namespace WebCore 76 76 77 #endif // ENABLE( THREADED_SCROLLING)77 #endif // ENABLE(ASYNC_SCROLLING) -
trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.h
r158893 r160944 27 27 #define ScrollingTreeNode_h 28 28 29 #if ENABLE( THREADED_SCROLLING)29 #if ENABLE(ASYNC_SCROLLING) 30 30 31 31 #include "IntRect.h" … … 74 74 } // namespace WebCore 75 75 76 #endif // ENABLE( THREADED_SCROLLING)76 #endif // ENABLE(ASYNC_SCROLLING) 77 77 78 78 #endif // ScrollingTreeNode_h -
trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp
r160652 r160944 27 27 #include "ScrollingTreeScrollingNode.h" 28 28 29 #if ENABLE( THREADED_SCROLLING)29 #if ENABLE(ASYNC_SCROLLING) 30 30 31 31 #include "ScrollingStateTree.h" … … 39 39 , m_headerHeight(0) 40 40 , m_footerHeight(0) 41 , m_s houldUpdateScrollLayerPositionOnMainThread(0)41 , m_synchronousScrollingReasons(0) 42 42 , m_behaviorForFixed(StickToDocumentBounds) 43 43 { … … 72 72 m_frameScaleFactor = state->frameScaleFactor(); 73 73 74 if (state->hasChangedProperty(ScrollingStateScrollingNode:: ShouldUpdateScrollLayerPositionOnMainThread))75 m_s houldUpdateScrollLayerPositionOnMainThread = state->shouldUpdateScrollLayerPositionOnMainThread();74 if (state->hasChangedProperty(ScrollingStateScrollingNode::ReasonsForSynchronousScrolling)) 75 m_synchronousScrollingReasons = state->synchronousScrollingReasons(); 76 76 77 77 if (state->hasChangedProperty(ScrollingStateScrollingNode::HeaderHeight)) … … 87 87 } // namespace WebCore 88 88 89 #endif // ENABLE( THREADED_SCROLLING)89 #endif // ENABLE(ASYNC_SCROLLING) -
trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h
r160652 r160944 27 27 #define ScrollingTreeScrollingNode_h 28 28 29 #if ENABLE( THREADED_SCROLLING)29 #if ENABLE(ASYNC_SCROLLING) 30 30 31 31 #include "IntRect.h" … … 54 54 virtual void setScrollPosition(const IntPoint&) = 0; 55 55 56 MainThreadScrollingReasons shouldUpdateScrollLayerPositionOnMainThread() const { return m_shouldUpdateScrollLayerPositionOnMainThread; } 56 SynchronousScrollingReasons synchronousScrollingReasons() const { return m_synchronousScrollingReasons; } 57 bool shouldUpdateScrollLayerPositionSynchronously() const { return m_synchronousScrollingReasons; } 57 58 58 59 protected: … … 97 98 int m_footerHeight; 98 99 99 MainThreadScrollingReasons m_shouldUpdateScrollLayerPositionOnMainThread;100 SynchronousScrollingReasons m_synchronousScrollingReasons; 100 101 ScrollBehaviorForFixedElements m_behaviorForFixed; 101 102 }; … … 103 104 } // namespace WebCore 104 105 105 #endif // ENABLE( THREADED_SCROLLING)106 #endif // ENABLE(ASYNC_SCROLLING) 106 107 107 108 #endif // ScrollingTreeScrollingNode_h -
trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h
r160652 r160944 27 27 #define ScrollingCoordinatorMac_h 28 28 29 #if ENABLE( THREADED_SCROLLING)29 #if ENABLE(ASYNC_SCROLLING) 30 30 31 31 #include "ScrollingCoordinator.h" … … 92 92 93 93 virtual void recomputeWheelEventHandlerCountForFrameView(FrameView*); 94 virtual void setS houldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons);94 virtual void setSynchronousScrollingReasons(SynchronousScrollingReasons); 95 95 96 96 virtual bool hasVisibleSlowRepaintViewportConstrainedObjects(FrameView*) const { return false; } … … 121 121 } // namespace WebCore 122 122 123 #endif // ENABLE( THREADED_SCROLLING)123 #endif // ENABLE(ASYNC_SCROLLING) 124 124 125 125 #endif // ScrollingCoordinatorMac_h -
trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm
r160652 r160944 26 26 #include "config.h" 27 27 28 #if ENABLE( THREADED_SCROLLING)28 #if ENABLE(ASYNC_SCROLLING) 29 29 30 30 #import "ScrollingCoordinatorMac.h" … … 313 313 } 314 314 315 void ScrollingCoordinatorMac::setS houldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons reasons)315 void ScrollingCoordinatorMac::setSynchronousScrollingReasons(SynchronousScrollingReasons reasons) 316 316 { 317 317 if (!m_scrollingStateTree->rootStateNode()) … … 323 323 if (reasons) 324 324 updateMainFrameScrollLayerPosition(); 325 m_scrollingStateTree->rootStateNode()->setS houldUpdateScrollLayerPositionOnMainThread(reasons);325 m_scrollingStateTree->rootStateNode()->setSynchronousScrollingReasons(reasons); 326 326 scheduleTreeStateCommit(); 327 327 } … … 428 428 429 429 ScrollingModeIndication indicatorMode; 430 if (shouldUpdateScrollLayerPosition OnMainThread())431 indicatorMode = MainThreadScrollingBecauseOfStyleIndication;430 if (shouldUpdateScrollLayerPositionSynchronously()) 431 indicatorMode = SynchronousScrollingBecauseOfStyleIndication; 432 432 else if (m_scrollingStateTree->rootStateNode() && m_scrollingStateTree->rootStateNode()->wheelEventHandlerCount()) 433 indicatorMode = MainThreadScrollingBecauseOfEventHandlersIndication;433 indicatorMode = SynchronousScrollingBecauseOfEventHandlersIndication; 434 434 else 435 indicatorMode = ThreadedScrollingIndication;435 indicatorMode = AsyncScrollingIndication; 436 436 437 437 tiledBacking->setScrollingModeIndication(indicatorMode); … … 448 448 } // namespace WebCore 449 449 450 #endif // ENABLE( THREADED_SCROLLING)450 #endif // ENABLE(ASYNC_SCROLLING) -
trunk/Source/WebCore/page/scrolling/mac/ScrollingStateNodeMac.mm
r148298 r160944 30 30 #include "ScrollingStateTree.h" 31 31 32 #if ENABLE( THREADED_SCROLLING)32 #if ENABLE(ASYNC_SCROLLING) 33 33 34 34 namespace WebCore { … … 60 60 } // namespace WebCore 61 61 62 #endif 62 #endif // ENABLE(ASYNC_SCROLLING) -
trunk/Source/WebCore/page/scrolling/mac/ScrollingStateScrollingNodeMac.mm
r158391 r160944 32 32 #include "ScrollingStateTree.h" 33 33 34 #if ENABLE( THREADED_SCROLLING)34 #if ENABLE(ASYNC_SCROLLING) 35 35 36 36 namespace WebCore { … … 118 118 } // namespace WebCore 119 119 120 #endif // ENABLE( THREADED_SCROLLING)120 #endif // ENABLE(ASYNC_SCROLLING) -
trunk/Source/WebCore/page/scrolling/mac/ScrollingThreadMac.mm
r126326 r160944 27 27 #include "ScrollingThread.h" 28 28 29 #if ENABLE( THREADED_SCROLLING)29 #if ENABLE(ASYNC_SCROLLING) 30 30 31 31 namespace WebCore { … … 71 71 } // namespace WebCore 72 72 73 #endif // ENABLE( THREADED_SCROLLING)73 #endif // ENABLE(ASYNC_SCROLLING) -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.h
r158893 r160944 27 27 #define ScrollingTreeFixedNode_h 28 28 29 #if ENABLE( THREADED_SCROLLING)29 #if ENABLE(ASYNC_SCROLLING) 30 30 31 31 #include "ScrollingConstraints.h" … … 57 57 } // namespace WebCore 58 58 59 #endif // ENABLE( THREADED_SCROLLING)59 #endif // ENABLE(ASYNC_SCROLLING) 60 60 61 61 #endif // ScrollingTreeFixedNode_h -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.mm
r158893 r160944 27 27 #include "ScrollingTreeFixedNode.h" 28 28 29 #if ENABLE( THREADED_SCROLLING)29 #if ENABLE(ASYNC_SCROLLING) 30 30 31 31 #include "ScrollingStateFixedNode.h" … … 86 86 } // namespace WebCore 87 87 88 #endif // ENABLE( THREADED_SCROLLING)88 #endif // ENABLE(ASYNC_SCROLLING) -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.h
r160898 r160944 27 27 #define ScrollingTreeScrollingNodeMac_h 28 28 29 #if ENABLE( THREADED_SCROLLING)29 #if ENABLE(ASYNC_SCROLLING) 30 30 31 31 #include "ScrollElasticityController.h" … … 95 95 } // namespace WebCore 96 96 97 #endif // ENABLE( THREADED_SCROLLING)97 #endif // ENABLE(ASYNC_SCROLLING) 98 98 99 99 #endif // ScrollingTreeScrollingNodeMac_h -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm
r160898 r160944 27 27 #import "ScrollingTreeScrollingNodeMac.h" 28 28 29 #if ENABLE( THREADED_SCROLLING)29 #if ENABLE(ASYNC_SCROLLING) 30 30 31 31 #import "FrameView.h" … … 47 47 namespace WebCore { 48 48 49 static void logThreadedScrollingMode(unsigned mainThreadScrollingReasons);49 static void logThreadedScrollingMode(unsigned synchronousScrollingReasons); 50 50 static void logWheelEventHandlerCountChanged(unsigned); 51 51 … … 93 93 } 94 94 95 if (scrollingStateNode->hasChangedProperty(ScrollingStateScrollingNode::ShouldUpdateScrollLayerPositionOnMainThread)) { 96 unsigned mainThreadScrollingReasons = this->shouldUpdateScrollLayerPositionOnMainThread(); 97 98 if (mainThreadScrollingReasons) { 95 if (scrollingStateNode->hasChangedProperty(ScrollingStateScrollingNode::ReasonsForSynchronousScrolling)) { 96 if (shouldUpdateScrollLayerPositionSynchronously()) { 99 97 // We're transitioning to the slow "update scroll layer position on the main thread" mode. 100 98 // Initialize the probable main thread scroll position with the current scroll layer position. … … 108 106 109 107 if (scrollingTree().scrollingPerformanceLoggingEnabled()) 110 logThreadedScrollingMode( mainThreadScrollingReasons);108 logThreadedScrollingMode(synchronousScrollingReasons()); 111 109 } 112 110 … … 293 291 IntPoint ScrollingTreeScrollingNodeMac::scrollPosition() const 294 292 { 295 if (shouldUpdateScrollLayerPosition OnMainThread())293 if (shouldUpdateScrollLayerPositionSynchronously()) 296 294 return m_probableMainThreadScrollPosition; 297 295 … … 316 314 updateMainFramePinState(scrollPosition); 317 315 318 if (shouldUpdateScrollLayerPosition OnMainThread()) {316 if (shouldUpdateScrollLayerPositionSynchronously()) { 319 317 m_probableMainThreadScrollPosition = scrollPosition; 320 318 scrollingTree().updateMainFrameScrollPosition(scrollPosition, SetScrollingLayerPosition); … … 328 326 void ScrollingTreeScrollingNodeMac::setScrollLayerPosition(const IntPoint& position) 329 327 { 330 ASSERT(!shouldUpdateScrollLayerPosition OnMainThread());328 ASSERT(!shouldUpdateScrollLayerPositionSynchronously()); 331 329 m_scrollLayer.get().position = CGPointMake(-position.x() + scrollOrigin().x(), -position.y() + scrollOrigin().y()); 332 330 … … 461 459 } 462 460 463 static void logThreadedScrollingMode(unsigned mainThreadScrollingReasons)464 { 465 if ( mainThreadScrollingReasons) {461 static void logThreadedScrollingMode(unsigned synchronousScrollingReasons) 462 { 463 if (synchronousScrollingReasons) { 466 464 StringBuilder reasonsDescription; 467 465 468 if ( mainThreadScrollingReasons & ScrollingCoordinator::ForcedOnMainThread)466 if (synchronousScrollingReasons & ScrollingCoordinator::ForcedOnMainThread) 469 467 reasonsDescription.append("forced,"); 470 if ( mainThreadScrollingReasons & ScrollingCoordinator::HasSlowRepaintObjects)468 if (synchronousScrollingReasons & ScrollingCoordinator::HasSlowRepaintObjects) 471 469 reasonsDescription.append("slow-repaint objects,"); 472 if ( mainThreadScrollingReasons & ScrollingCoordinator::HasViewportConstrainedObjectsWithoutSupportingFixedLayers)470 if (synchronousScrollingReasons & ScrollingCoordinator::HasViewportConstrainedObjectsWithoutSupportingFixedLayers) 473 471 reasonsDescription.append("viewport-constrained objects,"); 474 if ( mainThreadScrollingReasons & ScrollingCoordinator::HasNonLayerViewportConstrainedObjects)472 if (synchronousScrollingReasons & ScrollingCoordinator::HasNonLayerViewportConstrainedObjects) 475 473 reasonsDescription.append("non-layer viewport-constrained objects,"); 476 if ( mainThreadScrollingReasons & ScrollingCoordinator::IsImageDocument)474 if (synchronousScrollingReasons & ScrollingCoordinator::IsImageDocument) 477 475 reasonsDescription.append("image document,"); 478 476 … … 492 490 } // namespace WebCore 493 491 494 #endif // ENABLE( THREADED_SCROLLING)492 #endif // ENABLE(ASYNC_SCROLLING) -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.h
r158893 r160944 27 27 #define ScrollingTreeStickyNode_h 28 28 29 #if ENABLE( THREADED_SCROLLING)29 #if ENABLE(ASYNC_SCROLLING) 30 30 31 31 #include "ScrollingConstraints.h" … … 57 57 } // namespace WebCore 58 58 59 #endif // ENABLE( THREADED_SCROLLING)59 #endif // ENABLE(ASYNC_SCROLLING) 60 60 61 61 #endif // ScrollingTreeStickyNode_h -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.mm
r158893 r160944 27 27 #include "ScrollingTreeStickyNode.h" 28 28 29 #if ENABLE( THREADED_SCROLLING)29 #if ENABLE(ASYNC_SCROLLING) 30 30 31 31 #include "ScrollingStateStickyNode.h" … … 90 90 } // namespace WebCore 91 91 92 #endif // ENABLE( THREADED_SCROLLING)92 #endif // ENABLE(ASYNC_SCROLLING) -
trunk/Source/WebCore/platform/Scrollbar.cpp
r159027 r160944 548 548 // It's unfortunate that this needs to be done with an ifdef. Ideally there would be able to feature-detect 549 549 // the necessary support within AppKit. 550 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 && ENABLE( THREADED_SCROLLING)550 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 && ENABLE(ASYNC_SCROLLING) 551 551 return m_scrollableArea ? !m_scrollableArea->updatesScrollLayerPositionOnMainThread() : false; 552 552 #else -
trunk/Source/WebCore/platform/graphics/TiledBacking.h
r159645 r160944 35 35 36 36 enum ScrollingModeIndication { 37 MainThreadScrollingBecauseOfStyleIndication,38 MainThreadScrollingBecauseOfEventHandlersIndication,39 ThreadedScrollingIndication37 SynchronousScrollingBecauseOfStyleIndication, 38 SynchronousScrollingBecauseOfEventHandlersIndication, 39 AsyncScrollingIndication 40 40 }; 41 41 -
trunk/Source/WebCore/platform/graphics/ca/mac/TileController.mm
r160179 r160944 71 71 , m_hasTilesWithTemporaryScaleFactor(false) 72 72 , m_tileDebugBorderWidth(0) 73 , m_indicatorMode( ThreadedScrollingIndication)73 , m_indicatorMode(AsyncScrollingIndication) 74 74 { 75 75 m_tileContainerLayer = m_tileCacheLayer->createCompatibleLayer(PlatformCALayer::LayerTypeLayer, nullptr); … … 964 964 Color visibleRectIndicatorColor; 965 965 switch (m_indicatorMode) { 966 case MainThreadScrollingBecauseOfStyleIndication:966 case SynchronousScrollingBecauseOfStyleIndication: 967 967 visibleRectIndicatorColor = Color(255, 0, 0); 968 968 break; 969 case MainThreadScrollingBecauseOfEventHandlersIndication:969 case SynchronousScrollingBecauseOfEventHandlersIndication: 970 970 visibleRectIndicatorColor = Color(255, 255, 0); 971 971 break; 972 case ThreadedScrollingIndication:972 case AsyncScrollingIndication: 973 973 visibleRectIndicatorColor = Color(0, 200, 0); 974 974 break; -
trunk/Source/WebCore/platform/mac/MemoryPressureHandlerMac.mm
r160370 r160944 172 172 StorageThread::releaseFastMallocFreeMemoryInAllThreads(); 173 173 WorkerThread::releaseFastMallocFreeMemoryInAllThreads(); 174 #if ENABLE( THREADED_SCROLLING)174 #if ENABLE(ASYNC_SCROLLING) 175 175 ScrollingThread::dispatch(bind(WTF::releaseFastMallocFreeMemory)); 176 176 #endif -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r160847 r160944 3899 3899 3900 3900 bool scrollingOnMainThread = true; 3901 #if ENABLE( THREADED_SCROLLING)3901 #if ENABLE(ASYNC_SCROLLING) 3902 3902 if (Page* page = renderer().frame().page()) { 3903 3903 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator()) 3904 scrollingOnMainThread = scrollingCoordinator->shouldUpdateScrollLayerPosition OnMainThread();3904 scrollingOnMainThread = scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously(); 3905 3905 } 3906 3906 #endif -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r160894 r160944 239 239 // Ask our TiledBacking for large tiles unless the only reason we're main-thread-scrolling 240 240 // is a page overlay (find-in-page, the Web Inspector highlight mechanism, etc.). 241 if (scrollingCoordinator-> mainThreadScrollingReasons() & ~ScrollingCoordinator::ForcedOnMainThread)241 if (scrollingCoordinator->synchronousScrollingReasons() & ~ScrollingCoordinator::ForcedOnMainThread) 242 242 tileCoverage |= TiledBacking::CoverageForSlowScrolling; 243 243 } -
trunk/Source/WebCore/testing/Internals.cpp
r160908 r160944 1705 1705 return String(); 1706 1706 1707 return page-> mainThreadScrollingReasonsAsText();1707 return page->synchronousScrollingReasonsAsText(); 1708 1708 } 1709 1709 -
trunk/Source/WebCore/testing/Internals.idl
r159520 r160944 171 171 172 172 [RaisesException] DOMString scrollingStateTreeAsText(); 173 [RaisesException] DOMString mainThreadScrollingReasons(); 173 [RaisesException] DOMString mainThreadScrollingReasons(); // FIXME: rename to synchronousScrollingReasons(). 174 174 [RaisesException] ClientRectList nonFastScrollableRects(); 175 175 -
trunk/Source/WebKit2/ChangeLog
r160940 r160944 1 2013-12-20 Simon Fraser <simon.fraser@apple.com> 2 3 Change "threaded scrolling" terminology to "asynchronous scrolling" 4 https://bugs.webkit.org/show_bug.cgi?id=126094 5 6 Reviewed by Tim Horton. 7 8 Rename ENABLE_THREADED_SCROLLING to ENABLE_ASYNC_SCROLLING, and change 9 references to "main thread scrolling" to "synchronous scrolling". 10 11 * WebProcess/WebPage/EventDispatcher.cpp: 12 (WebKit::EventDispatcher::wheelEvent): 13 * WebProcess/WebPage/EventDispatcher.h: 14 * WebProcess/WebPage/WebPage.cpp: 15 (WebKit::WebPage::WebPage): 16 (WebKit::WebPage::~WebPage): 17 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 18 (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay): 19 (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay): 20 (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): 21 (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition): 22 1 23 2013-12-20 Ricky Mondello <rmondello@apple.com> 2 24 -
trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp
r160742 r160944 37 37 #include <wtf/RunLoop.h> 38 38 39 #if ENABLE( THREADED_SCROLLING)39 #if ENABLE(ASYNC_SCROLLING) 40 40 #include <WebCore/ScrollingCoordinator.h> 41 41 #include <WebCore/ScrollingThread.h> … … 61 61 } 62 62 63 #if ENABLE( THREADED_SCROLLING)63 #if ENABLE(ASYNC_SCROLLING) 64 64 void EventDispatcher::addScrollingTreeForPage(WebPage* webPage) 65 65 { … … 87 87 void EventDispatcher::wheelEvent(uint64_t pageID, const WebWheelEvent& wheelEvent, bool canRubberBandAtLeft, bool canRubberBandAtRight, bool canRubberBandAtTop, bool canRubberBandAtBottom) 88 88 { 89 #if ENABLE( THREADED_SCROLLING)89 #if ENABLE(ASYNC_SCROLLING) 90 90 MutexLocker locker(m_scrollingTreesMutex); 91 91 if (ScrollingTree* scrollingTree = m_scrollingTrees.get(pageID)) { … … 126 126 } 127 127 128 #if ENABLE( THREADED_SCROLLING)128 #if ENABLE(ASYNC_SCROLLING) 129 129 void EventDispatcher::sendDidReceiveEvent(uint64_t pageID, const WebEvent& event, bool didHandleEvent) 130 130 { -
trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.h
r160742 r160944 48 48 ~EventDispatcher(); 49 49 50 #if ENABLE( THREADED_SCROLLING)50 #if ENABLE(ASYNC_SCROLLING) 51 51 void addScrollingTreeForPage(WebPage*); 52 52 void removeScrollingTreeForPage(WebPage*); … … 67 67 void dispatchWheelEvent(uint64_t pageID, const WebWheelEvent&); 68 68 69 #if ENABLE( THREADED_SCROLLING)69 #if ENABLE(ASYNC_SCROLLING) 70 70 void sendDidReceiveEvent(uint64_t pageID, const WebEvent&, bool didHandleEvent); 71 71 #endif … … 73 73 RefPtr<WorkQueue> m_queue; 74 74 75 #if ENABLE( THREADED_SCROLLING)75 #if ENABLE(ASYNC_SCROLLING) 76 76 Mutex m_scrollingTreesMutex; 77 77 HashMap<uint64_t, RefPtr<WebCore::ScrollingTree>> m_scrollingTrees; -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r160908 r160944 318 318 m_drawingArea->setPaintingEnabled(false); 319 319 320 #if ENABLE( THREADED_SCROLLING)320 #if ENABLE(ASYNC_SCROLLING) 321 321 m_useThreadedScrolling = parameters.store.getBoolValueForKey(WebPreferencesKey::threadedScrollingEnabledKey()); 322 322 if (!m_drawingArea->supportsThreadedScrolling()) … … 424 424 #endif 425 425 426 #if ENABLE( THREADED_SCROLLING)426 #if ENABLE(ASYNC_SCROLLING) 427 427 if (m_useThreadedScrolling) 428 428 WebProcess::shared().eventDispatcher().addScrollingTreeForPage(this); … … 437 437 ASSERT(!m_page); 438 438 439 #if ENABLE( THREADED_SCROLLING)439 #if ENABLE(ASYNC_SCROLLING) 440 440 if (m_useThreadedScrolling) 441 441 WebProcess::shared().eventDispatcher().removeScrollingTreeForPage(this); -
trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
r160923 r160944 53 53 #import <wtf/MainThread.h> 54 54 55 #if ENABLE( THREADED_SCROLLING)55 #if ENABLE(ASYNC_SCROLLING) 56 56 #import <WebCore/ScrollingCoordinator.h> 57 57 #import <WebCore/ScrollingThread.h> … … 188 188 void TiledCoreAnimationDrawingArea::didInstallPageOverlay(PageOverlay* pageOverlay) 189 189 { 190 #if ENABLE( THREADED_SCROLLING)190 #if ENABLE(ASYNC_SCROLLING) 191 191 if (ScrollingCoordinator* scrollingCoordinator = m_webPage->corePage()->scrollingCoordinator()) 192 scrollingCoordinator->setForce MainThreadScrollLayerPositionUpdates(true);192 scrollingCoordinator->setForceSynchronousScrollLayerPositionUpdates(true); 193 193 #endif 194 194 … … 204 204 return; 205 205 206 #if ENABLE( THREADED_SCROLLING)206 #if ENABLE(ASYNC_SCROLLING) 207 207 if (Page* page = m_webPage->corePage()) { 208 208 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator()) 209 scrollingCoordinator->setForce MainThreadScrollLayerPositionUpdates(false);209 scrollingCoordinator->setForceSynchronousScrollLayerPositionUpdates(false); 210 210 } 211 211 #endif … … 243 243 Settings& settings = m_webPage->corePage()->settings(); 244 244 245 #if ENABLE( THREADED_SCROLLING)245 #if ENABLE(ASYNC_SCROLLING) 246 246 if (ScrollingCoordinator* scrollingCoordinator = m_webPage->corePage()->scrollingCoordinator()) { 247 247 bool scrollingPerformanceLoggingEnabled = m_webPage->scrollingPerformanceLoggingEnabled(); … … 304 304 Function<void ()> function = functionRef; 305 305 306 #if ENABLE( THREADED_SCROLLING)306 #if ENABLE(ASYNC_SCROLLING) 307 307 if (!m_webPage->corePage()->scrollingCoordinator()) { 308 308 function();
Note:
See TracChangeset
for help on using the changeset viewer.