Changeset 166517 in webkit


Ignore:
Timestamp:
Mar 31, 2014 12:42:02 PM (10 years ago)
Author:
Simon Fraser
Message:

Clarify some scrolling tree terminology
https://bugs.webkit.org/show_bug.cgi?id=130929

Reviewed by Tim Horton.

Attempt to reduce some ambiguity in scrolling tree terminology.
When async scrolling occurs, there are two tasks we have to perform:

  1. Layers need to be updated to reflect the scroll
  2. WebCore state has to be updated.

The "updateForViewport" name didn't clearly reflect which of these
tasks was being performed, so rename it to updateLayersAfterViewportChange()
to reflect the fact that it only does the first.

Remove the Mac implementation of updateLayersAfterViewportChange(), since
it was confsued about this, and was never called anyway.

  • WebCore.exp.in:
  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::viewportChangedViaDelegatedScrolling):

  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
  • page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:

(WebCore::ScrollingTreeScrollingNodeIOS::updateLayersAfterViewportChange):
(WebCore::ScrollingTreeScrollingNodeIOS::updateForViewport): Deleted.

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

(WebCore::ScrollingTreeScrollingNodeMac::updateLayersAfterViewportChange):
(WebCore::ScrollingTreeScrollingNodeMac::updateForViewport): Deleted.

Location:
trunk/Source/WebCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r166516 r166517  
     12014-03-29  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Clarify some scrolling tree terminology
     4        https://bugs.webkit.org/show_bug.cgi?id=130929
     5
     6        Reviewed by Tim Horton.
     7
     8        Attempt to reduce some ambiguity in scrolling tree terminology.
     9        When async scrolling occurs, there are two tasks we have to perform:
     10        1. Layers need to be updated to reflect the scroll
     11        2. WebCore state has to be updated.
     12        The "updateForViewport" name didn't clearly reflect which of these
     13        tasks was being performed, so rename it to updateLayersAfterViewportChange()
     14        to reflect the fact that it only does the first.
     15       
     16        Remove the Mac implementation of updateLayersAfterViewportChange(), since
     17        it was confsued about this, and was never called anyway.
     18
     19        * WebCore.exp.in:
     20        * page/scrolling/ScrollingTree.cpp:
     21        (WebCore::ScrollingTree::viewportChangedViaDelegatedScrolling):
     22        * page/scrolling/ScrollingTreeScrollingNode.h:
     23        * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
     24        * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
     25        (WebCore::ScrollingTreeScrollingNodeIOS::updateLayersAfterViewportChange):
     26        (WebCore::ScrollingTreeScrollingNodeIOS::updateForViewport): Deleted.
     27        * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
     28        * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
     29        (WebCore::ScrollingTreeScrollingNodeMac::updateLayersAfterViewportChange):
     30        (WebCore::ScrollingTreeScrollingNodeMac::updateForViewport): Deleted.
     31
    1322014-03-31  Tim Horton  <timothy_horton@apple.com>
    233
  • trunk/Source/WebCore/WebCore.exp.in

    r166516 r166517  
    27992799#if ENABLE(ASYNC_SCROLLING) && PLATFORM(IOS)
    28002800__ZN7WebCore29ScrollingTreeScrollingNodeIOS17setScrollPositionERKNS_10FloatPointE
    2801 __ZN7WebCore29ScrollingTreeScrollingNodeIOS17updateForViewportERKNS_9FloatRectEd
    28022801__ZN7WebCore29ScrollingTreeScrollingNodeIOS19updateAfterChildrenERKNS_18ScrollingStateNodeE
    28032802__ZN7WebCore29ScrollingTreeScrollingNodeIOS20updateBeforeChildrenERKNS_18ScrollingStateNodeE
     2803__ZN7WebCore29ScrollingTreeScrollingNodeIOS31updateLayersAfterViewportChangeERKNS_9FloatRectEd
    28042804__ZN7WebCore29ScrollingTreeScrollingNodeIOS46setScrollPositionWithoutContentEdgeConstraintsERKNS_10FloatPointE
    28052805__ZN7WebCore29ScrollingTreeScrollingNodeIOS6createERNS_13ScrollingTreeENS_17ScrollingNodeTypeEy
  • trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp

    r166293 r166517  
    108108        return;
    109109
    110     toScrollingTreeScrollingNode(node)->updateForViewport(viewportRect, scale);
     110    toScrollingTreeScrollingNode(node)->updateLayersAfterViewportChange(viewportRect, scale);
    111111}
    112112
  • trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h

    r166293 r166517  
    5353    virtual void setScrollPosition(const FloatPoint&) = 0;
    5454    virtual void setScrollPositionWithoutContentEdgeConstraints(const FloatPoint&) = 0;
    55     virtual void updateForViewport(const FloatRect& viewportRect, double scale) = 0;
     55
     56    virtual void updateLayersAfterViewportChange(const FloatRect& viewportRect, double scale) = 0;
    5657   
    5758    SynchronousScrollingReasons synchronousScrollingReasons() const { return m_synchronousScrollingReasons; }
  • trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h

    r166333 r166517  
    5555    virtual void setScrollPosition(const FloatPoint&) override;
    5656    virtual void setScrollPositionWithoutContentEdgeConstraints(const FloatPoint&) override;
    57     virtual void updateForViewport(const FloatRect& viewportRect, double scale);
     57
     58    virtual void updateLayersAfterViewportChange(const FloatRect& viewportRect, double scale);
    5859
    5960    void setScrollLayerPosition(const FloatPoint&);
  • trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm

    r166293 r166517  
    171171}
    172172
    173 void ScrollingTreeScrollingNodeIOS::updateForViewport(const FloatRect& viewportRect, double scale)
     173void ScrollingTreeScrollingNodeIOS::updateLayersAfterViewportChange(const FloatRect& viewportRect, double scale)
    174174{
    175175    [m_counterScrollingLayer setPosition:viewportRect.location()];
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.h

    r166293 r166517  
    6969    virtual void setScrollPosition(const FloatPoint&) override;
    7070    virtual void setScrollPositionWithoutContentEdgeConstraints(const FloatPoint&) override;
    71     virtual void updateForViewport(const FloatRect& viewportRect, double scale) override;
     71
     72    virtual void updateLayersAfterViewportChange(const FloatRect& viewportRect, double scale) override;
    7273
    7374    void setScrollLayerPosition(const FloatPoint&);
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm

    r166293 r166517  
    401401}
    402402
    403 void ScrollingTreeScrollingNodeMac::updateForViewport(const FloatRect& viewportRect, double scale)
    404 {
    405     // FIXME: correctly handle updates for zooming.
    406     UNUSED_PARAM(scale);
    407     FloatPoint scrollPosition = viewportRect.location();
    408     updateMainFramePinState(scrollPosition);
    409 
    410     if (shouldUpdateScrollLayerPositionSynchronously()) {
    411         m_probableMainThreadScrollPosition = scrollPosition;
    412         scrollingTree().scrollingTreeNodeDidScroll(scrollingNodeID(), scrollPosition, SetScrollingLayerPosition);
    413         return;
    414     }
    415 
    416     setScrollLayerPosition(scrollPosition);
    417     scrollingTree().scrollingTreeNodeDidScroll(scrollingNodeID(), scrollPosition);
     403void ScrollingTreeScrollingNodeMac::updateLayersAfterViewportChange(const FloatRect&, double)
     404{
     405    ASSERT_NOT_REACHED();
    418406}
    419407
Note: See TracChangeset for help on using the changeset viewer.