Changeset 160944 in webkit


Ignore:
Timestamp:
Dec 20, 2013 4:35:44 PM (10 years ago)
Author:
Simon Fraser
Message:

Change "threaded scrolling" terminology to "asynchronous scrolling"
https://bugs.webkit.org/show_bug.cgi?id=126094

Source/WebCore:

Reviewed by Tim Horton.

Rename ENABLE_THREADED_SCROLLING to ENABLE_ASYNC_SCROLLING, and change
references to "main thread scrolling" to "synchronous scrolling".

In a few places, functions with names like shouldUpdateScrollLayerPositionOnMainThread()
were actually returning SynchronousScrollingReasons, so rename them appropriately.

  • WebCore.exp.in:
  • page/FrameView.cpp:

(WebCore::FrameView::shouldUpdateCompositingLayersAfterScrolling):
(WebCore::FrameView::isRubberBandInProgress):
(WebCore::FrameView::requestScrollPositionUpdate):
(WebCore::FrameView::updatesScrollLayerPositionOnMainThread):
(WebCore::FrameView::wheelEvent):

  • page/Page.cpp:

(WebCore::Page::synchronousScrollingReasonsAsText):

  • page/Page.h:
  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::create):
(WebCore::ScrollingCoordinator::ScrollingCoordinator):
(WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
(WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
(WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::ScrollingCoordinator::synchronousScrollingReasons):
(WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
(WebCore::ScrollingCoordinator::setForceSynchronousScrollLayerPositionUpdates):
(WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):

  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously):
(WebCore::ScrollingCoordinator::setSynchronousScrollingReasons):

  • page/scrolling/ScrollingStateFixedNode.cpp:
  • page/scrolling/ScrollingStateFixedNode.h:
  • page/scrolling/ScrollingStateNode.cpp:
  • page/scrolling/ScrollingStateNode.h:
  • page/scrolling/ScrollingStateScrollingNode.cpp:

(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setSynchronousScrollingReasons):
(WebCore::ScrollingStateScrollingNode::dumpProperties):

  • page/scrolling/ScrollingStateScrollingNode.h: Awkward "ReasonsForSynchronousScrolling" to avoid

conflict with the enum called SynchronousScrollingReasons.

  • page/scrolling/ScrollingStateStickyNode.cpp:
  • page/scrolling/ScrollingStateStickyNode.h:
  • page/scrolling/ScrollingStateTree.cpp:
  • page/scrolling/ScrollingStateTree.h:
  • page/scrolling/ScrollingThread.cpp:
  • page/scrolling/ScrollingThread.h:
  • page/scrolling/ScrollingTree.cpp:
  • page/scrolling/ScrollingTree.h:
  • page/scrolling/ScrollingTreeNode.cpp:
  • page/scrolling/ScrollingTreeNode.h:
  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
(WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):

  • page/scrolling/ScrollingTreeScrollingNode.h:

(WebCore::ScrollingTreeScrollingNode::synchronousScrollingReasons):
(WebCore::ScrollingTreeScrollingNode::shouldUpdateScrollLayerPositionSynchronously):

  • page/scrolling/mac/ScrollingCoordinatorMac.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::setSynchronousScrollingReasons):
(WebCore::ScrollingCoordinatorMac::commitTreeState):

  • page/scrolling/mac/ScrollingStateNodeMac.mm:
  • page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
  • page/scrolling/mac/ScrollingThreadMac.mm:
  • page/scrolling/mac/ScrollingTreeFixedNode.h:
  • page/scrolling/mac/ScrollingTreeFixedNode.mm:
  • page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
  • page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:

(WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
(WebCore::ScrollingTreeScrollingNodeMac::scrollPosition):
(WebCore::ScrollingTreeScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
(WebCore::logThreadedScrollingMode):

  • page/scrolling/mac/ScrollingTreeStickyNode.h:
  • page/scrolling/mac/ScrollingTreeStickyNode.mm:
  • platform/Scrollbar.cpp:

(WebCore::Scrollbar::supportsUpdateOnSecondaryThread):

  • platform/graphics/TiledBacking.h:
  • platform/graphics/ca/mac/TileController.mm:

(WebCore::TileController::TileController):
(WebCore::TileController::updateTileCoverageMap):

  • platform/mac/MemoryPressureHandlerMac.mm:

(WebCore::MemoryPressureHandler::releaseMemory):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::setupFontSubpixelQuantization):

  • rendering/RenderLayerBacking.cpp:

(WebCore::computeTileCoverage):

  • testing/Internals.cpp:

(WebCore::Internals::mainThreadScrollingReasons):

  • testing/Internals.idl:

Source/WebKit2:

Reviewed by Tim Horton.

Rename ENABLE_THREADED_SCROLLING to ENABLE_ASYNC_SCROLLING, and change
references to "main thread scrolling" to "synchronous scrolling".

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::wheelEvent):

  • WebProcess/WebPage/EventDispatcher.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage):
(WebKit::WebPage::~WebPage):

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
(WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
(WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):

Source/WTF:

Reviewed by Tim Horton.

Rename ENABLE_THREADED_SCROLLING to ENABLE_ASYNC_SCROLLING.

  • wtf/FeatureDefines.h:
Location:
trunk/Source
Files:
51 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r160899 r160944  
     12013-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
    1122013-12-20  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
    213
  • trunk/Source/WTF/wtf/FeatureDefines.h

    r160733 r160944  
    199199#endif
    200200
    201 #if !defined(ENABLE_THREADED_SCROLLING)
    202 #define ENABLE_THREADED_SCROLLING 1
     201#if !defined(ENABLE_ASYNC_SCROLLING)
     202#define ENABLE_ASYNC_SCROLLING 1
    203203#endif
    204204
     
    805805#endif
    806806
    807 #if !defined(ENABLE_THREADED_SCROLLING)
    808 #define ENABLE_THREADED_SCROLLING 0
     807#if !defined(ENABLE_ASYNC_SCROLLING)
     808#define ENABLE_ASYNC_SCROLLING 0
    809809#endif
    810810
  • trunk/Source/WebCore/ChangeLog

    r160943 r160944  
     12013-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
    1972013-12-20  Tim Horton  <timothy_horton@apple.com>
    298
  • trunk/Source/WebCore/WebCore.exp.in

    r160923 r160944  
    998998__ZN7WebCore4Page31setCustomHTMLTokenizerChunkSizeEi
    999999__ZN7WebCore4Page31setCustomHTMLTokenizerTimeDelayEd
    1000 __ZN7WebCore4Page32mainThreadScrollingReasonsAsTextEv
     1000__ZN7WebCore4Page33synchronousScrollingReasonsAsTextEv
    10011001__ZN7WebCore4Page32setMemoryCacheClientCallsEnabledEb
    10021002__ZN7WebCore4Page35resumeActiveDOMObjectsAndAnimationsEv
     
    28622862#endif
    28632863
    2864 #if ENABLE(THREADED_SCROLLING)
     2864#if ENABLE(ASYNC_SCROLLING)
    28652865__ZN7WebCore13ScrollingTree21setCanRubberBandStateEbbbb
    28662866__ZN7WebCore13ScrollingTree21tryToHandleWheelEventERKNS_18PlatformWheelEventE
     
    28692869__ZN7WebCore15ScrollingThread15dispatchBarrierERKN3WTF8FunctionIFvvEEE
    28702870__ZN7WebCore15ScrollingThread8dispatchERKN3WTF8FunctionIFvvEEE
    2871 __ZN7WebCore20ScrollingCoordinator44setForceMainThreadScrollLayerPositionUpdatesEb
     2871__ZN7WebCore20ScrollingCoordinator45setForceSynchronousScrollLayerPositionUpdatesEb
    28722872__ZN7WebCore4Page20scrollingCoordinatorEv
    28732873#endif
  • trunk/Source/WebCore/page/FrameView.cpp

    r160847 r160944  
    19751975bool FrameView::shouldUpdateCompositingLayersAfterScrolling() const
    19761976{
    1977 #if ENABLE(THREADED_SCROLLING)
     1977#if ENABLE(ASYNC_SCROLLING)
    19781978    // If the scrolling thread is updating the fixed elements, then the FrameView should not update them as well.
    19791979
     
    19921992        return true;
    19931993
    1994     if (scrollingCoordinator->shouldUpdateScrollLayerPositionOnMainThread())
     1994    if (scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously())
    19951995        return true;
    19961996
     
    20252025    if (Page* page = frame().page()) {
    20262026        if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator()) {
    2027             if (!scrollingCoordinator->shouldUpdateScrollLayerPositionOnMainThread())
     2027            if (!scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously())
    20282028                return scrollingCoordinator->isRubberBandInProgress();
    20292029        }
     
    20402040bool FrameView::requestScrollPositionUpdate(const IntPoint& position)
    20412041{
    2042 #if ENABLE(THREADED_SCROLLING)
     2042#if ENABLE(ASYNC_SCROLLING)
    20432043    if (TiledBacking* tiledBacking = this->tiledBacking()) {
    20442044        IntRect visibleRect = visibleContentRect();
     
    29902990    if (Page* page = frame().page()) {
    29912991        if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator())
    2992             return scrollingCoordinator->shouldUpdateScrollLayerPositionOnMainThread();
     2992            return scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously();
    29932993    }
    29942994
     
    40044004        return false;
    40054005
    4006 #if ENABLE(THREADED_SCROLLING)
     4006#if ENABLE(ASYNC_SCROLLING)
    40074007    if (Page* page = frame().page()) {
    40084008        if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator()) {
  • trunk/Source/WebCore/page/Page.cpp

    r160370 r160944  
    280280}
    281281
    282 String Page::mainThreadScrollingReasonsAsText()
     282String Page::synchronousScrollingReasonsAsText()
    283283{
    284284    if (Document* document = m_mainFrame->document())
     
    286286
    287287    if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
    288         return scrollingCoordinator->mainThreadScrollingReasonsAsText();
     288        return scrollingCoordinator->synchronousScrollingReasonsAsText();
    289289
    290290    return String();
  • trunk/Source/WebCore/page/Page.h

    r160599 r160944  
    207207
    208208    String scrollingStateTreeAsText();
    209     String mainThreadScrollingReasonsAsText();
     209    String synchronousScrollingReasonsAsText();
    210210    PassRefPtr<ClientRectList> nonFastScrollableRects(const Frame*);
    211211
  • trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp

    r157361 r160944  
    4646#endif
    4747
    48 #if ENABLE(THREADED_SCROLLING)
     48#if ENABLE(ASYNC_SCROLLING)
    4949#include "ScrollingCoordinatorMac.h"
    5050#endif
     
    6262PassRefPtr<ScrollingCoordinator> ScrollingCoordinator::create(Page* page)
    6363{
    64 #if USE(ACCELERATED_COMPOSITING) && ENABLE(THREADED_SCROLLING)
     64#if USE(ACCELERATED_COMPOSITING) && ENABLE(ASYNC_SCROLLING)
    6565    return adoptRef(new ScrollingCoordinatorMac(page));
    6666#endif
     
    8282    , m_scheduledUpdateIsProgrammaticScroll(false)
    8383    , m_scheduledScrollingLayerPositionAction(SyncScrollingLayerPosition)
    84     , m_forceMainThreadScrollLayerPositionUpdates(false)
     84    , m_forceSynchronousScrollLayerPositionUpdates(false)
    8585{
    8686}
     
    183183        return;
    184184
    185     updateShouldUpdateScrollLayerPositionOnMainThread();
     185    updateSynchronousScrollingReasons();
    186186}
    187187
     
    194194        return;
    195195
    196     updateShouldUpdateScrollLayerPositionOnMainThread();
     196    updateSynchronousScrollingReasons();
    197197}
    198198
     
    272272    frameViewLayoutUpdated(frameView);
    273273    recomputeWheelEventHandlerCountForFrameView(frameView);
    274     updateShouldUpdateScrollLayerPositionOnMainThread();
     274    updateSynchronousScrollingReasons();
    275275}
    276276
     
    393393}
    394394
    395 MainThreadScrollingReasons ScrollingCoordinator::mainThreadScrollingReasons() const
     395SynchronousScrollingReasons ScrollingCoordinator::synchronousScrollingReasons() const
    396396{
    397397    FrameView* frameView = m_page->mainFrame().view();
    398398    if (!frameView)
    399         return static_cast<MainThreadScrollingReasons>(0);
    400 
    401     MainThreadScrollingReasons mainThreadScrollingReasons = (MainThreadScrollingReasons)0;
    402 
    403     if (m_forceMainThreadScrollLayerPositionUpdates)
    404         mainThreadScrollingReasons |= ForcedOnMainThread;
     399        return static_cast<SynchronousScrollingReasons>(0);
     400
     401    SynchronousScrollingReasons synchronousScrollingReasons = (SynchronousScrollingReasons)0;
     402
     403    if (m_forceSynchronousScrollLayerPositionUpdates)
     404        synchronousScrollingReasons |= ForcedOnMainThread;
    405405    if (frameView->hasSlowRepaintObjects())
    406         mainThreadScrollingReasons |= HasSlowRepaintObjects;
     406        synchronousScrollingReasons |= HasSlowRepaintObjects;
    407407    if (!supportsFixedPositionLayers() && frameView->hasViewportConstrainedObjects())
    408         mainThreadScrollingReasons |= HasViewportConstrainedObjectsWithoutSupportingFixedLayers;
     408        synchronousScrollingReasons |= HasViewportConstrainedObjectsWithoutSupportingFixedLayers;
    409409    if (supportsFixedPositionLayers() && hasVisibleSlowRepaintViewportConstrainedObjects(frameView))
    410         mainThreadScrollingReasons |= HasNonLayerViewportConstrainedObjects;
     410        synchronousScrollingReasons |= HasNonLayerViewportConstrainedObjects;
    411411    if (m_page->mainFrame().document() && m_page->mainFrame().document()->isImageDocument())
    412         mainThreadScrollingReasons |= IsImageDocument;
    413 
    414     return mainThreadScrollingReasons;
    415 }
    416 
    417 void ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThread()
    418 {
    419     setShouldUpdateScrollLayerPositionOnMainThread(mainThreadScrollingReasons());
    420 }
    421 
    422 void ScrollingCoordinator::setForceMainThreadScrollLayerPositionUpdates(bool forceMainThreadScrollLayerPositionUpdates)
    423 {
    424     if (m_forceMainThreadScrollLayerPositionUpdates == forceMainThreadScrollLayerPositionUpdates)
    425         return;
    426 
    427     m_forceMainThreadScrollLayerPositionUpdates = forceMainThreadScrollLayerPositionUpdates;
    428     updateShouldUpdateScrollLayerPositionOnMainThread();
     412        synchronousScrollingReasons |= IsImageDocument;
     413
     414    return synchronousScrollingReasons;
     415}
     416
     417void ScrollingCoordinator::updateSynchronousScrollingReasons()
     418{
     419    setSynchronousScrollingReasons(synchronousScrollingReasons());
     420}
     421
     422void ScrollingCoordinator::setForceSynchronousScrollLayerPositionUpdates(bool forceSynchronousScrollLayerPositionUpdates)
     423{
     424    if (m_forceSynchronousScrollLayerPositionUpdates == forceSynchronousScrollLayerPositionUpdates)
     425        return;
     426
     427    m_forceSynchronousScrollLayerPositionUpdates = forceSynchronousScrollLayerPositionUpdates;
     428    updateSynchronousScrollingReasons();
    429429}
    430430
     
    440440}
    441441
    442 String ScrollingCoordinator::mainThreadScrollingReasonsAsText(MainThreadScrollingReasons reasons)
     442String ScrollingCoordinator::synchronousScrollingReasonsAsText(SynchronousScrollingReasons reasons)
    443443{
    444444    StringBuilder stringBuilder;
     
    460460}
    461461
    462 String ScrollingCoordinator::mainThreadScrollingReasonsAsText() const
    463 {
    464     return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons());
     462String ScrollingCoordinator::synchronousScrollingReasonsAsText() const
     463{
     464    return synchronousScrollingReasonsAsText(synchronousScrollingReasons());
    465465}
    466466
  • trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h

    r160652 r160944  
    3535#include <wtf/Forward.h>
    3636
    37 #if ENABLE(THREADED_SCROLLING)
     37#if ENABLE(ASYNC_SCROLLING)
    3838#include <wtf/HashMap.h>
    3939#include <wtf/ThreadSafeRefCounted.h>
     
    4747namespace WebCore {
    4848
    49 typedef unsigned MainThreadScrollingReasons;
     49typedef unsigned SynchronousScrollingReasons;
    5050typedef uint64_t ScrollingNodeID;
    5151
     
    6161class ViewportConstraints;
    6262
    63 #if ENABLE(THREADED_SCROLLING)
     63#if ENABLE(ASYNC_SCROLLING)
    6464class ScrollingTree;
    6565#endif
     
    108108    virtual void pageDestroyed();
    109109
    110 #if ENABLE(THREADED_SCROLLING)
     110#if ENABLE(ASYNC_SCROLLING)
    111111    virtual ScrollingTree* scrollingTree() const { return 0; }
    112112#endif
     
    141141
    142142    // Force all scroll layer position updates to happen on the main thread.
    143     void setForceMainThreadScrollLayerPositionUpdates(bool);
     143    void setForceSynchronousScrollLayerPositionUpdates(bool);
    144144
    145145    // These virtual functions are currently unique to the threaded scrolling architecture.
     
    173173    };
    174174
    175     MainThreadScrollingReasons mainThreadScrollingReasons() const;
    176     bool shouldUpdateScrollLayerPositionOnMainThread() const { return mainThreadScrollingReasons() != 0; }
     175    SynchronousScrollingReasons synchronousScrollingReasons() const;
     176    bool shouldUpdateScrollLayerPositionSynchronously() const { return synchronousScrollingReasons(); }
    177177
    178178    virtual void willDestroyScrollableArea(ScrollableArea*) { }
     
    181181    virtual void setLayerIsContainerForFixedPositionLayers(GraphicsLayer*, bool) { }
    182182
    183     static String mainThreadScrollingReasonsAsText(MainThreadScrollingReasons);
    184     String mainThreadScrollingReasonsAsText() const;
     183    static String synchronousScrollingReasonsAsText(SynchronousScrollingReasons);
     184    String synchronousScrollingReasonsAsText() const;
    185185
    186186    Region computeNonFastScrollableRegion(const Frame*, const IntPoint& frameLocation) const;
     
    205205private:
    206206    virtual void recomputeWheelEventHandlerCountForFrameView(FrameView*) { }
    207     virtual void setShouldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons) { }
     207    virtual void setSynchronousScrollingReasons(SynchronousScrollingReasons) { }
    208208
    209209    virtual bool hasVisibleSlowRepaintViewportConstrainedObjects(FrameView*) const;
    210     void updateShouldUpdateScrollLayerPositionOnMainThread();
     210    void updateSynchronousScrollingReasons();
    211211   
    212212    void updateMainFrameScrollPositionTimerFired(Timer<ScrollingCoordinator>*);
     
    217217    SetOrSyncScrollingLayerPosition m_scheduledScrollingLayerPositionAction;
    218218
    219     bool m_forceMainThreadScrollLayerPositionUpdates;
     219    bool m_forceSynchronousScrollLayerPositionUpdates;
    220220};
    221221
  • trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp

    r148298 r160944  
    3232#include <wtf/OwnPtr.h>
    3333
    34 #if ENABLE(THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)
     34#if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS)
    3535
    3636namespace WebCore {
     
    114114} // namespace WebCore
    115115
    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  
    2727#define ScrollingStateFixedNode_h
    2828
    29 #if ENABLE(THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)
     29#if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS)
    3030
    3131#include "ScrollingConstraints.h"
     
    7070} // namespace WebCore
    7171
    72 #endif // ENABLE(THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)
     72#endif // ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS)
    7373
    7474#endif // ScrollingStateFixedNode_h
  • trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp

    r158183 r160944  
    2727#include "ScrollingStateNode.h"
    2828
    29 #if ENABLE(THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)
     29#if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS)
    3030
    3131#include "ScrollingStateFixedNode.h"
     
    157157} // namespace WebCore
    158158
    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  
    2727#define ScrollingStateNode_h
    2828
    29 #if ENABLE(THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)
     29#if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS)
    3030
    3131#include "PlatformLayer.h"
     
    120120} // namespace WebCore
    121121
    122 #endif // ENABLE(THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)
     122#endif // ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS)
    123123
    124124#endif // ScrollingStateNode_h
  • trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp

    r160652 r160944  
    2727#include "ScrollingStateScrollingNode.h"
    2828
    29 #if ENABLE(THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)
     29#if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS)
    3030
    3131#include "ScrollingStateTree.h"
     
    5151    , m_frameScaleFactor(1)
    5252    , m_wheelEventHandlerCount(0)
    53     , m_shouldUpdateScrollLayerPositionOnMainThread(0)
     53    , m_synchronousScrollingReasons(0)
    5454    , m_behaviorForFixed(StickToDocumentBounds)
    5555    , m_headerHeight(0)
     
    7272    , m_frameScaleFactor(stateNode.frameScaleFactor())
    7373    , m_wheelEventHandlerCount(stateNode.wheelEventHandlerCount())
    74     , m_shouldUpdateScrollLayerPositionOnMainThread(stateNode.shouldUpdateScrollLayerPositionOnMainThread())
     74    , m_synchronousScrollingReasons(stateNode.synchronousScrollingReasons())
    7575    , m_behaviorForFixed(stateNode.scrollBehaviorForFixedElements())
    7676    , m_headerHeight(stateNode.headerHeight())
     
    164164}
    165165
    166 void ScrollingStateScrollingNode::setShouldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons reasons)
    167 {
    168     if (m_shouldUpdateScrollLayerPositionOnMainThread == reasons)
    169         return;
    170 
    171     m_shouldUpdateScrollLayerPositionOnMainThread = reasons;
    172     setPropertyChanged(ShouldUpdateScrollLayerPositionOnMainThread);
     166void ScrollingStateScrollingNode::setSynchronousScrollingReasons(SynchronousScrollingReasons reasons)
     167{
     168    if (m_synchronousScrollingReasons == reasons)
     169        return;
     170
     171    m_synchronousScrollingReasons = reasons;
     172    setPropertyChanged(ReasonsForSynchronousScrolling);
    173173    m_scrollingStateTree->setHasChangedProperties(true);
    174174}
     
    231231    }
    232232
    233     if (m_shouldUpdateScrollLayerPositionOnMainThread) {
    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";
    236236    }
    237237
     
    249249} // namespace WebCore
    250250
    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  
    2727#define ScrollingStateScrollingNode_h
    2828
    29 #if ENABLE(THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)
     29#if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS)
    3030
    3131#include "IntRect.h"
     
    5757        NonFastScrollableRegion,
    5858        WheelEventHandlerCount,
    59         ShouldUpdateScrollLayerPositionOnMainThread,
     59        ReasonsForSynchronousScrolling,
    6060        RequestedScrollPosition,
    6161        CounterScrollingLayer,
     
    8686    void setWheelEventHandlerCount(unsigned);
    8787
    88     MainThreadScrollingReasons shouldUpdateScrollLayerPositionOnMainThread() const { return m_shouldUpdateScrollLayerPositionOnMainThread; }
    89     void setShouldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons);
     88    SynchronousScrollingReasons synchronousScrollingReasons() const { return m_synchronousScrollingReasons; }
     89    void setSynchronousScrollingReasons(SynchronousScrollingReasons);
    9090
    9191    const ScrollableAreaParameters& scrollableAreaParameters() const { return m_scrollableAreaParameters; }
     
    154154    float m_frameScaleFactor;
    155155    unsigned m_wheelEventHandlerCount;
    156     MainThreadScrollingReasons m_shouldUpdateScrollLayerPositionOnMainThread;
     156    SynchronousScrollingReasons m_synchronousScrollingReasons;
    157157    ScrollBehaviorForFixedElements m_behaviorForFixed;
    158158    int m_headerHeight;
     
    166166} // namespace WebCore
    167167
    168 #endif // ENABLE(THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)
     168#endif // ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS)
    169169
    170170#endif // ScrollingStateScrollingNode_h
  • trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.cpp

    r152998 r160944  
    2727#include "ScrollingStateStickyNode.h"
    2828
    29 #if ENABLE(THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)
     29#if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS)
    3030
    3131#include "GraphicsLayer.h"
     
    133133} // namespace WebCore
    134134
    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  
    2727#define ScrollingStateStickyNode_h
    2828
    29 #if ENABLE(THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)
     29#if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS)
    3030
    3131#include "ScrollingConstraints.h"
     
    7070} // namespace WebCore
    7171
    72 #endif // ENABLE(THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)
     72#endif // ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS)
    7373
    7474#endif // ScrollingStateStickyNode_h
  • trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp

    r151581 r160944  
    2727#include "ScrollingStateTree.h"
    2828
    29 #if ENABLE(THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)
     29#if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS)
    3030
    3131#include "ScrollingStateFixedNode.h"
     
    187187} // namespace WebCore
    188188
    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  
    2727#define ScrollingStateTree_h
    2828
    29 #if ENABLE(THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)
     29#if ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS)
    3030
    3131#include "ScrollingStateScrollingNode.h"
     
    8383} // namespace WebCore
    8484
    85 #endif // ENABLE(THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)
     85#endif // ENABLE(ASYNC_SCROLLING) || USE(COORDINATED_GRAPHICS)
    8686
    8787#endif // ScrollingStateTree_h
  • trunk/Source/WebCore/page/scrolling/ScrollingThread.cpp

    r157653 r160944  
    2727#include "ScrollingThread.h"
    2828
    29 #if ENABLE(THREADED_SCROLLING)
     29#if ENABLE(ASYNC_SCROLLING)
    3030
    3131#include <wtf/MainThread.h>
     
    120120} // namespace WebCore
    121121
    122 #endif // ENABLE(THREADED_SCROLLING)
     122#endif // ENABLE(ASYNC_SCROLLING)
  • trunk/Source/WebCore/page/scrolling/ScrollingThread.h

    r157653 r160944  
    2727#define ScrollingThread_h
    2828
    29 #if ENABLE(THREADED_SCROLLING)
     29#if ENABLE(ASYNC_SCROLLING)
    3030
    3131#include <wtf/Functional.h>
     
    8686} // namespace WebCore
    8787
    88 #endif // ENABLE(THREADED_SCROLLING)
     88#endif // ENABLE(ASYNC_SCROLLING)
    8989
    9090#endif // ScrollingThread_h
  • trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp

    r160742 r160944  
    2727#include "ScrollingTree.h"
    2828
    29 #if ENABLE(THREADED_SCROLLING)
     29#if ENABLE(ASYNC_SCROLLING)
    3030
    3131#include "PlatformWheelEvent.h"
     
    362362} // namespace WebCore
    363363
    364 #endif // ENABLE(THREADED_SCROLLING)
     364#endif // ENABLE(ASYNC_SCROLLING)
  • trunk/Source/WebCore/page/scrolling/ScrollingTree.h

    r160742 r160944  
    2727#define ScrollingTree_h
    2828
    29 #if ENABLE(THREADED_SCROLLING)
     29#if ENABLE(ASYNC_SCROLLING)
    3030
    3131#include "PlatformWheelEvent.h"
     
    146146} // namespace WebCore
    147147
    148 #endif // ENABLE(THREADED_SCROLLING)
     148#endif // ENABLE(ASYNC_SCROLLING)
    149149
    150150#endif // ScrollingTree_h
  • trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp

    r158893 r160944  
    2727#include "ScrollingTreeNode.h"
    2828
    29 #if ENABLE(THREADED_SCROLLING)
     29#if ENABLE(ASYNC_SCROLLING)
    3030
    3131#include "ScrollingStateTree.h"
     
    7575} // namespace WebCore
    7676
    77 #endif // ENABLE(THREADED_SCROLLING)
     77#endif // ENABLE(ASYNC_SCROLLING)
  • trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.h

    r158893 r160944  
    2727#define ScrollingTreeNode_h
    2828
    29 #if ENABLE(THREADED_SCROLLING)
     29#if ENABLE(ASYNC_SCROLLING)
    3030
    3131#include "IntRect.h"
     
    7474} // namespace WebCore
    7575
    76 #endif // ENABLE(THREADED_SCROLLING)
     76#endif // ENABLE(ASYNC_SCROLLING)
    7777
    7878#endif // ScrollingTreeNode_h
  • trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp

    r160652 r160944  
    2727#include "ScrollingTreeScrollingNode.h"
    2828
    29 #if ENABLE(THREADED_SCROLLING)
     29#if ENABLE(ASYNC_SCROLLING)
    3030
    3131#include "ScrollingStateTree.h"
     
    3939    , m_headerHeight(0)
    4040    , m_footerHeight(0)
    41     , m_shouldUpdateScrollLayerPositionOnMainThread(0)
     41    , m_synchronousScrollingReasons(0)
    4242    , m_behaviorForFixed(StickToDocumentBounds)
    4343{
     
    7272        m_frameScaleFactor = state->frameScaleFactor();
    7373
    74     if (state->hasChangedProperty(ScrollingStateScrollingNode::ShouldUpdateScrollLayerPositionOnMainThread))
    75         m_shouldUpdateScrollLayerPositionOnMainThread = state->shouldUpdateScrollLayerPositionOnMainThread();
     74    if (state->hasChangedProperty(ScrollingStateScrollingNode::ReasonsForSynchronousScrolling))
     75        m_synchronousScrollingReasons = state->synchronousScrollingReasons();
    7676
    7777    if (state->hasChangedProperty(ScrollingStateScrollingNode::HeaderHeight))
     
    8787} // namespace WebCore
    8888
    89 #endif // ENABLE(THREADED_SCROLLING)
     89#endif // ENABLE(ASYNC_SCROLLING)
  • trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h

    r160652 r160944  
    2727#define ScrollingTreeScrollingNode_h
    2828
    29 #if ENABLE(THREADED_SCROLLING)
     29#if ENABLE(ASYNC_SCROLLING)
    3030
    3131#include "IntRect.h"
     
    5454    virtual void setScrollPosition(const IntPoint&) = 0;
    5555
    56     MainThreadScrollingReasons shouldUpdateScrollLayerPositionOnMainThread() const { return m_shouldUpdateScrollLayerPositionOnMainThread; }
     56    SynchronousScrollingReasons synchronousScrollingReasons() const { return m_synchronousScrollingReasons; }
     57    bool shouldUpdateScrollLayerPositionSynchronously() const { return m_synchronousScrollingReasons; }
    5758
    5859protected:
     
    9798    int m_footerHeight;
    9899
    99     MainThreadScrollingReasons m_shouldUpdateScrollLayerPositionOnMainThread;
     100    SynchronousScrollingReasons m_synchronousScrollingReasons;
    100101    ScrollBehaviorForFixedElements m_behaviorForFixed;
    101102};
     
    103104} // namespace WebCore
    104105
    105 #endif // ENABLE(THREADED_SCROLLING)
     106#endif // ENABLE(ASYNC_SCROLLING)
    106107
    107108#endif // ScrollingTreeScrollingNode_h
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h

    r160652 r160944  
    2727#define ScrollingCoordinatorMac_h
    2828
    29 #if ENABLE(THREADED_SCROLLING)
     29#if ENABLE(ASYNC_SCROLLING)
    3030
    3131#include "ScrollingCoordinator.h"
     
    9292
    9393    virtual void recomputeWheelEventHandlerCountForFrameView(FrameView*);
    94     virtual void setShouldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons);
     94    virtual void setSynchronousScrollingReasons(SynchronousScrollingReasons);
    9595
    9696    virtual bool hasVisibleSlowRepaintViewportConstrainedObjects(FrameView*) const { return false; }
     
    121121} // namespace WebCore
    122122
    123 #endif // ENABLE(THREADED_SCROLLING)
     123#endif // ENABLE(ASYNC_SCROLLING)
    124124
    125125#endif // ScrollingCoordinatorMac_h
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm

    r160652 r160944  
    2626#include "config.h"
    2727
    28 #if ENABLE(THREADED_SCROLLING)
     28#if ENABLE(ASYNC_SCROLLING)
    2929
    3030#import "ScrollingCoordinatorMac.h"
     
    313313}
    314314
    315 void ScrollingCoordinatorMac::setShouldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons reasons)
     315void ScrollingCoordinatorMac::setSynchronousScrollingReasons(SynchronousScrollingReasons reasons)
    316316{
    317317    if (!m_scrollingStateTree->rootStateNode())
     
    323323    if (reasons)
    324324        updateMainFrameScrollLayerPosition();
    325     m_scrollingStateTree->rootStateNode()->setShouldUpdateScrollLayerPositionOnMainThread(reasons);
     325    m_scrollingStateTree->rootStateNode()->setSynchronousScrollingReasons(reasons);
    326326    scheduleTreeStateCommit();
    327327}
     
    428428
    429429    ScrollingModeIndication indicatorMode;
    430     if (shouldUpdateScrollLayerPositionOnMainThread())
    431         indicatorMode = MainThreadScrollingBecauseOfStyleIndication;
     430    if (shouldUpdateScrollLayerPositionSynchronously())
     431        indicatorMode = SynchronousScrollingBecauseOfStyleIndication;
    432432    else if (m_scrollingStateTree->rootStateNode() && m_scrollingStateTree->rootStateNode()->wheelEventHandlerCount())
    433         indicatorMode =  MainThreadScrollingBecauseOfEventHandlersIndication;
     433        indicatorMode =  SynchronousScrollingBecauseOfEventHandlersIndication;
    434434    else
    435         indicatorMode = ThreadedScrollingIndication;
     435        indicatorMode = AsyncScrollingIndication;
    436436   
    437437    tiledBacking->setScrollingModeIndication(indicatorMode);
     
    448448} // namespace WebCore
    449449
    450 #endif // ENABLE(THREADED_SCROLLING)
     450#endif // ENABLE(ASYNC_SCROLLING)
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingStateNodeMac.mm

    r148298 r160944  
    3030#include "ScrollingStateTree.h"
    3131
    32 #if ENABLE(THREADED_SCROLLING)
     32#if ENABLE(ASYNC_SCROLLING)
    3333
    3434namespace WebCore {
     
    6060} // namespace WebCore
    6161
    62 #endif
     62#endif // ENABLE(ASYNC_SCROLLING)
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingStateScrollingNodeMac.mm

    r158391 r160944  
    3232#include "ScrollingStateTree.h"
    3333
    34 #if ENABLE(THREADED_SCROLLING)
     34#if ENABLE(ASYNC_SCROLLING)
    3535
    3636namespace WebCore {
     
    118118} // namespace WebCore
    119119
    120 #endif // ENABLE(THREADED_SCROLLING)
     120#endif // ENABLE(ASYNC_SCROLLING)
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingThreadMac.mm

    r126326 r160944  
    2727#include "ScrollingThread.h"
    2828
    29 #if ENABLE(THREADED_SCROLLING)
     29#if ENABLE(ASYNC_SCROLLING)
    3030
    3131namespace WebCore {
     
    7171} // namespace WebCore
    7272
    73 #endif // ENABLE(THREADED_SCROLLING)
     73#endif // ENABLE(ASYNC_SCROLLING)
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.h

    r158893 r160944  
    2727#define ScrollingTreeFixedNode_h
    2828
    29 #if ENABLE(THREADED_SCROLLING)
     29#if ENABLE(ASYNC_SCROLLING)
    3030
    3131#include "ScrollingConstraints.h"
     
    5757} // namespace WebCore
    5858
    59 #endif // ENABLE(THREADED_SCROLLING)
     59#endif // ENABLE(ASYNC_SCROLLING)
    6060
    6161#endif // ScrollingTreeFixedNode_h
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.mm

    r158893 r160944  
    2727#include "ScrollingTreeFixedNode.h"
    2828
    29 #if ENABLE(THREADED_SCROLLING)
     29#if ENABLE(ASYNC_SCROLLING)
    3030
    3131#include "ScrollingStateFixedNode.h"
     
    8686} // namespace WebCore
    8787
    88 #endif // ENABLE(THREADED_SCROLLING)
     88#endif // ENABLE(ASYNC_SCROLLING)
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.h

    r160898 r160944  
    2727#define ScrollingTreeScrollingNodeMac_h
    2828
    29 #if ENABLE(THREADED_SCROLLING)
     29#if ENABLE(ASYNC_SCROLLING)
    3030
    3131#include "ScrollElasticityController.h"
     
    9595} // namespace WebCore
    9696
    97 #endif // ENABLE(THREADED_SCROLLING)
     97#endif // ENABLE(ASYNC_SCROLLING)
    9898
    9999#endif // ScrollingTreeScrollingNodeMac_h
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm

    r160898 r160944  
    2727#import "ScrollingTreeScrollingNodeMac.h"
    2828
    29 #if ENABLE(THREADED_SCROLLING)
     29#if ENABLE(ASYNC_SCROLLING)
    3030
    3131#import "FrameView.h"
     
    4747namespace WebCore {
    4848
    49 static void logThreadedScrollingMode(unsigned mainThreadScrollingReasons);
     49static void logThreadedScrollingMode(unsigned synchronousScrollingReasons);
    5050static void logWheelEventHandlerCountChanged(unsigned);
    5151
     
    9393    }
    9494
    95     if (scrollingStateNode->hasChangedProperty(ScrollingStateScrollingNode::ShouldUpdateScrollLayerPositionOnMainThread)) {
    96         unsigned mainThreadScrollingReasons = this->shouldUpdateScrollLayerPositionOnMainThread();
    97 
    98         if (mainThreadScrollingReasons) {
     95    if (scrollingStateNode->hasChangedProperty(ScrollingStateScrollingNode::ReasonsForSynchronousScrolling)) {
     96        if (shouldUpdateScrollLayerPositionSynchronously()) {
    9997            // We're transitioning to the slow "update scroll layer position on the main thread" mode.
    10098            // Initialize the probable main thread scroll position with the current scroll layer position.
     
    108106
    109107        if (scrollingTree().scrollingPerformanceLoggingEnabled())
    110             logThreadedScrollingMode(mainThreadScrollingReasons);
     108            logThreadedScrollingMode(synchronousScrollingReasons());
    111109    }
    112110
     
    293291IntPoint ScrollingTreeScrollingNodeMac::scrollPosition() const
    294292{
    295     if (shouldUpdateScrollLayerPositionOnMainThread())
     293    if (shouldUpdateScrollLayerPositionSynchronously())
    296294        return m_probableMainThreadScrollPosition;
    297295
     
    316314    updateMainFramePinState(scrollPosition);
    317315
    318     if (shouldUpdateScrollLayerPositionOnMainThread()) {
     316    if (shouldUpdateScrollLayerPositionSynchronously()) {
    319317        m_probableMainThreadScrollPosition = scrollPosition;
    320318        scrollingTree().updateMainFrameScrollPosition(scrollPosition, SetScrollingLayerPosition);
     
    328326void ScrollingTreeScrollingNodeMac::setScrollLayerPosition(const IntPoint& position)
    329327{
    330     ASSERT(!shouldUpdateScrollLayerPositionOnMainThread());
     328    ASSERT(!shouldUpdateScrollLayerPositionSynchronously());
    331329    m_scrollLayer.get().position = CGPointMake(-position.x() + scrollOrigin().x(), -position.y() + scrollOrigin().y());
    332330
     
    461459}
    462460
    463 static void logThreadedScrollingMode(unsigned mainThreadScrollingReasons)
    464 {
    465     if (mainThreadScrollingReasons) {
     461static void logThreadedScrollingMode(unsigned synchronousScrollingReasons)
     462{
     463    if (synchronousScrollingReasons) {
    466464        StringBuilder reasonsDescription;
    467465
    468         if (mainThreadScrollingReasons & ScrollingCoordinator::ForcedOnMainThread)
     466        if (synchronousScrollingReasons & ScrollingCoordinator::ForcedOnMainThread)
    469467            reasonsDescription.append("forced,");
    470         if (mainThreadScrollingReasons & ScrollingCoordinator::HasSlowRepaintObjects)
     468        if (synchronousScrollingReasons & ScrollingCoordinator::HasSlowRepaintObjects)
    471469            reasonsDescription.append("slow-repaint objects,");
    472         if (mainThreadScrollingReasons & ScrollingCoordinator::HasViewportConstrainedObjectsWithoutSupportingFixedLayers)
     470        if (synchronousScrollingReasons & ScrollingCoordinator::HasViewportConstrainedObjectsWithoutSupportingFixedLayers)
    473471            reasonsDescription.append("viewport-constrained objects,");
    474         if (mainThreadScrollingReasons & ScrollingCoordinator::HasNonLayerViewportConstrainedObjects)
     472        if (synchronousScrollingReasons & ScrollingCoordinator::HasNonLayerViewportConstrainedObjects)
    475473            reasonsDescription.append("non-layer viewport-constrained objects,");
    476         if (mainThreadScrollingReasons & ScrollingCoordinator::IsImageDocument)
     474        if (synchronousScrollingReasons & ScrollingCoordinator::IsImageDocument)
    477475            reasonsDescription.append("image document,");
    478476
     
    492490} // namespace WebCore
    493491
    494 #endif // ENABLE(THREADED_SCROLLING)
     492#endif // ENABLE(ASYNC_SCROLLING)
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.h

    r158893 r160944  
    2727#define ScrollingTreeStickyNode_h
    2828
    29 #if ENABLE(THREADED_SCROLLING)
     29#if ENABLE(ASYNC_SCROLLING)
    3030
    3131#include "ScrollingConstraints.h"
     
    5757} // namespace WebCore
    5858
    59 #endif // ENABLE(THREADED_SCROLLING)
     59#endif // ENABLE(ASYNC_SCROLLING)
    6060
    6161#endif // ScrollingTreeStickyNode_h
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.mm

    r158893 r160944  
    2727#include "ScrollingTreeStickyNode.h"
    2828
    29 #if ENABLE(THREADED_SCROLLING)
     29#if ENABLE(ASYNC_SCROLLING)
    3030
    3131#include "ScrollingStateStickyNode.h"
     
    9090} // namespace WebCore
    9191
    92 #endif // ENABLE(THREADED_SCROLLING)
     92#endif // ENABLE(ASYNC_SCROLLING)
  • trunk/Source/WebCore/platform/Scrollbar.cpp

    r159027 r160944  
    548548    // It's unfortunate that this needs to be done with an ifdef. Ideally there would be able to feature-detect
    549549    // 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)
    551551    return m_scrollableArea ? !m_scrollableArea->updatesScrollLayerPositionOnMainThread() : false;
    552552#else
  • trunk/Source/WebCore/platform/graphics/TiledBacking.h

    r159645 r160944  
    3535
    3636enum ScrollingModeIndication {
    37     MainThreadScrollingBecauseOfStyleIndication,
    38     MainThreadScrollingBecauseOfEventHandlersIndication,
    39     ThreadedScrollingIndication
     37    SynchronousScrollingBecauseOfStyleIndication,
     38    SynchronousScrollingBecauseOfEventHandlersIndication,
     39    AsyncScrollingIndication
    4040};
    4141
  • trunk/Source/WebCore/platform/graphics/ca/mac/TileController.mm

    r160179 r160944  
    7171    , m_hasTilesWithTemporaryScaleFactor(false)
    7272    , m_tileDebugBorderWidth(0)
    73     , m_indicatorMode(ThreadedScrollingIndication)
     73    , m_indicatorMode(AsyncScrollingIndication)
    7474{
    7575    m_tileContainerLayer = m_tileCacheLayer->createCompatibleLayer(PlatformCALayer::LayerTypeLayer, nullptr);
     
    964964    Color visibleRectIndicatorColor;
    965965    switch (m_indicatorMode) {
    966     case MainThreadScrollingBecauseOfStyleIndication:
     966    case SynchronousScrollingBecauseOfStyleIndication:
    967967        visibleRectIndicatorColor = Color(255, 0, 0);
    968968        break;
    969     case MainThreadScrollingBecauseOfEventHandlersIndication:
     969    case SynchronousScrollingBecauseOfEventHandlersIndication:
    970970        visibleRectIndicatorColor = Color(255, 255, 0);
    971971        break;
    972     case ThreadedScrollingIndication:
     972    case AsyncScrollingIndication:
    973973        visibleRectIndicatorColor = Color(0, 200, 0);
    974974        break;
  • trunk/Source/WebCore/platform/mac/MemoryPressureHandlerMac.mm

    r160370 r160944  
    172172    StorageThread::releaseFastMallocFreeMemoryInAllThreads();
    173173    WorkerThread::releaseFastMallocFreeMemoryInAllThreads();
    174 #if ENABLE(THREADED_SCROLLING)
     174#if ENABLE(ASYNC_SCROLLING)
    175175    ScrollingThread::dispatch(bind(WTF::releaseFastMallocFreeMemory));
    176176#endif
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r160847 r160944  
    38993899
    39003900    bool scrollingOnMainThread = true;
    3901 #if ENABLE(THREADED_SCROLLING)
     3901#if ENABLE(ASYNC_SCROLLING)
    39023902    if (Page* page = renderer().frame().page()) {
    39033903        if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator())
    3904             scrollingOnMainThread = scrollingCoordinator->shouldUpdateScrollLayerPositionOnMainThread();
     3904            scrollingOnMainThread = scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously();
    39053905    }
    39063906#endif
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r160894 r160944  
    239239        // Ask our TiledBacking for large tiles unless the only reason we're main-thread-scrolling
    240240        // 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)
    242242            tileCoverage |= TiledBacking::CoverageForSlowScrolling;
    243243    }
  • trunk/Source/WebCore/testing/Internals.cpp

    r160908 r160944  
    17051705        return String();
    17061706
    1707     return page->mainThreadScrollingReasonsAsText();
     1707    return page->synchronousScrollingReasonsAsText();
    17081708}
    17091709
  • trunk/Source/WebCore/testing/Internals.idl

    r159520 r160944  
    171171
    172172    [RaisesException] DOMString scrollingStateTreeAsText();
    173     [RaisesException] DOMString mainThreadScrollingReasons();
     173    [RaisesException] DOMString mainThreadScrollingReasons(); // FIXME: rename to synchronousScrollingReasons().
    174174    [RaisesException] ClientRectList nonFastScrollableRects();
    175175
  • trunk/Source/WebKit2/ChangeLog

    r160940 r160944  
     12013-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
    1232013-12-20  Ricky Mondello  <rmondello@apple.com>
    224
  • trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp

    r160742 r160944  
    3737#include <wtf/RunLoop.h>
    3838
    39 #if ENABLE(THREADED_SCROLLING)
     39#if ENABLE(ASYNC_SCROLLING)
    4040#include <WebCore/ScrollingCoordinator.h>
    4141#include <WebCore/ScrollingThread.h>
     
    6161}
    6262
    63 #if ENABLE(THREADED_SCROLLING)
     63#if ENABLE(ASYNC_SCROLLING)
    6464void EventDispatcher::addScrollingTreeForPage(WebPage* webPage)
    6565{
     
    8787void EventDispatcher::wheelEvent(uint64_t pageID, const WebWheelEvent& wheelEvent, bool canRubberBandAtLeft, bool canRubberBandAtRight, bool canRubberBandAtTop, bool canRubberBandAtBottom)
    8888{
    89 #if ENABLE(THREADED_SCROLLING)
     89#if ENABLE(ASYNC_SCROLLING)
    9090    MutexLocker locker(m_scrollingTreesMutex);
    9191    if (ScrollingTree* scrollingTree = m_scrollingTrees.get(pageID)) {
     
    126126}
    127127
    128 #if ENABLE(THREADED_SCROLLING)
     128#if ENABLE(ASYNC_SCROLLING)
    129129void EventDispatcher::sendDidReceiveEvent(uint64_t pageID, const WebEvent& event, bool didHandleEvent)
    130130{
  • trunk/Source/WebKit2/WebProcess/WebPage/EventDispatcher.h

    r160742 r160944  
    4848    ~EventDispatcher();
    4949
    50 #if ENABLE(THREADED_SCROLLING)
     50#if ENABLE(ASYNC_SCROLLING)
    5151    void addScrollingTreeForPage(WebPage*);
    5252    void removeScrollingTreeForPage(WebPage*);
     
    6767    void dispatchWheelEvent(uint64_t pageID, const WebWheelEvent&);
    6868
    69 #if ENABLE(THREADED_SCROLLING)
     69#if ENABLE(ASYNC_SCROLLING)
    7070    void sendDidReceiveEvent(uint64_t pageID, const WebEvent&, bool didHandleEvent);
    7171#endif
     
    7373    RefPtr<WorkQueue> m_queue;
    7474
    75 #if ENABLE(THREADED_SCROLLING)
     75#if ENABLE(ASYNC_SCROLLING)
    7676    Mutex m_scrollingTreesMutex;
    7777    HashMap<uint64_t, RefPtr<WebCore::ScrollingTree>> m_scrollingTrees;
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r160908 r160944  
    318318    m_drawingArea->setPaintingEnabled(false);
    319319
    320 #if ENABLE(THREADED_SCROLLING)
     320#if ENABLE(ASYNC_SCROLLING)
    321321    m_useThreadedScrolling = parameters.store.getBoolValueForKey(WebPreferencesKey::threadedScrollingEnabledKey());
    322322    if (!m_drawingArea->supportsThreadedScrolling())
     
    424424#endif
    425425
    426 #if ENABLE(THREADED_SCROLLING)
     426#if ENABLE(ASYNC_SCROLLING)
    427427    if (m_useThreadedScrolling)
    428428        WebProcess::shared().eventDispatcher().addScrollingTreeForPage(this);
     
    437437    ASSERT(!m_page);
    438438
    439 #if ENABLE(THREADED_SCROLLING)
     439#if ENABLE(ASYNC_SCROLLING)
    440440    if (m_useThreadedScrolling)
    441441        WebProcess::shared().eventDispatcher().removeScrollingTreeForPage(this);
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

    r160923 r160944  
    5353#import <wtf/MainThread.h>
    5454
    55 #if ENABLE(THREADED_SCROLLING)
     55#if ENABLE(ASYNC_SCROLLING)
    5656#import <WebCore/ScrollingCoordinator.h>
    5757#import <WebCore/ScrollingThread.h>
     
    188188void TiledCoreAnimationDrawingArea::didInstallPageOverlay(PageOverlay* pageOverlay)
    189189{
    190 #if ENABLE(THREADED_SCROLLING)
     190#if ENABLE(ASYNC_SCROLLING)
    191191    if (ScrollingCoordinator* scrollingCoordinator = m_webPage->corePage()->scrollingCoordinator())
    192         scrollingCoordinator->setForceMainThreadScrollLayerPositionUpdates(true);
     192        scrollingCoordinator->setForceSynchronousScrollLayerPositionUpdates(true);
    193193#endif
    194194
     
    204204        return;
    205205
    206 #if ENABLE(THREADED_SCROLLING)
     206#if ENABLE(ASYNC_SCROLLING)
    207207    if (Page* page = m_webPage->corePage()) {
    208208        if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator())
    209             scrollingCoordinator->setForceMainThreadScrollLayerPositionUpdates(false);
     209            scrollingCoordinator->setForceSynchronousScrollLayerPositionUpdates(false);
    210210    }
    211211#endif
     
    243243    Settings& settings = m_webPage->corePage()->settings();
    244244
    245 #if ENABLE(THREADED_SCROLLING)
     245#if ENABLE(ASYNC_SCROLLING)
    246246    if (ScrollingCoordinator* scrollingCoordinator = m_webPage->corePage()->scrollingCoordinator()) {
    247247        bool scrollingPerformanceLoggingEnabled = m_webPage->scrollingPerformanceLoggingEnabled();
     
    304304    Function<void ()> function = functionRef;
    305305
    306 #if ENABLE(THREADED_SCROLLING)
     306#if ENABLE(ASYNC_SCROLLING)
    307307    if (!m_webPage->corePage()->scrollingCoordinator()) {
    308308        function();
Note: See TracChangeset for help on using the changeset viewer.