Changeset 169313 in webkit


Ignore:
Timestamp:
May 24, 2014, 1:40:04 PM (11 years ago)
Author:
Simon Fraser
Message:

Rename ScrollingTreeScrollingNode's m_scrollPosition to make it clear that it's the value committed from the state tree
https://bugs.webkit.org/show_bug.cgi?id=133254

Reviewed by Tim Horton.

Source/WebCore:

Make ScrollingTreeScrollingNode::scrollPosition() pure virtual, and rename
the member variable and associated getter to make it clear that they relate
to the last committed scroll position.

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):

  • page/scrolling/ScrollingTreeScrollingNode.h:

(WebCore::ScrollingTreeScrollingNode::lastCommittedScrollPosition):
(WebCore::ScrollingTreeScrollingNode::scrollPosition): Deleted.

Source/WebKit2:

Override scrollPosition() on ScrollingTreeOverflowScrollingNodeIOS.

  • UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
  • UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:

(WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollPosition):

Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r169312 r169313  
     12014-05-23  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Rename ScrollingTreeScrollingNode's m_scrollPosition to make it clear that it's the value committed from the state tree
     4        https://bugs.webkit.org/show_bug.cgi?id=133254
     5
     6        Reviewed by Tim Horton.
     7
     8        Make ScrollingTreeScrollingNode::scrollPosition() pure virtual, and rename
     9        the member variable and associated getter to make it clear that they relate
     10        to the last committed scroll position.
     11
     12        * page/scrolling/ScrollingTreeScrollingNode.cpp:
     13        (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
     14        * page/scrolling/ScrollingTreeScrollingNode.h:
     15        (WebCore::ScrollingTreeScrollingNode::lastCommittedScrollPosition):
     16        (WebCore::ScrollingTreeScrollingNode::scrollPosition): Deleted.
     17
    1182014-05-23  Simon Fraser  <simon.fraser@apple.com>
    219
  • trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp

    r169063 r169313  
    6060
    6161    if (state.hasChangedProperty(ScrollingStateScrollingNode::ScrollPosition))
    62         m_scrollPosition = state.scrollPosition();
     62        m_lastCommittedScrollPosition = state.scrollPosition();
    6363
    6464    if (state.hasChangedProperty(ScrollingStateScrollingNode::ScrollOrigin))
  • trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h

    r169312 r169313  
    6565    virtual void setScrollLayerPosition(const FloatPoint&) = 0;
    6666
    67     virtual FloatPoint scrollPosition() const { return m_scrollPosition; }
     67    virtual FloatPoint scrollPosition() const = 0;
     68
     69    FloatPoint lastCommittedScrollPosition() const { return m_lastCommittedScrollPosition; }
    6870    const FloatSize& scrollableAreaSize() const { return m_scrollableAreaSize; }
    6971    const FloatSize& totalContentsSize() const { return m_totalContentsSize; }
     
    8890    FloatSize m_totalContentsSize;
    8991    FloatSize m_totalContentsSizeForRubberBand;
    90     FloatPoint m_scrollPosition; // FIXME: this is the committed scroll position.
     92    FloatPoint m_lastCommittedScrollPosition;
    9193    IntPoint m_scrollOrigin;
    9294   
  • trunk/Source/WebKit2/ChangeLog

    r169310 r169313  
     12014-05-23  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Rename ScrollingTreeScrollingNode's m_scrollPosition to make it clear that it's the value committed from the state tree
     4        https://bugs.webkit.org/show_bug.cgi?id=133254
     5
     6        Reviewed by Tim Horton.
     7       
     8        Override scrollPosition() on ScrollingTreeOverflowScrollingNodeIOS.
     9
     10        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
     11        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
     12        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollPosition):
     13
    1142014-05-24  Chris Fleizach  <cfleizach@apple.com>
    215
  • trunk/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h

    r169063 r169313  
    5151    virtual void updateAfterChildren(const WebCore::ScrollingStateNode&) override;
    5252   
     53    virtual WebCore::FloatPoint scrollPosition() const override;
     54
    5355    virtual void setScrollLayerPosition(const WebCore::FloatPoint&) override;
    5456
  • trunk/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm

    r169063 r169313  
    159159}
    160160
     161FloatPoint ScrollingTreeOverflowScrollingNodeIOS::scrollPosition() const
     162{
     163    BEGIN_BLOCK_OBJC_EXCEPTIONS
     164    UIScrollView *scrollView = (UIScrollView *)[scrollLayer() delegate];
     165    ASSERT([scrollView isKindOfClass:[UIScrollView self]]);
     166    return [scrollView contentOffset];
     167    END_BLOCK_OBJC_EXCEPTIONS
     168}
     169
    161170void ScrollingTreeOverflowScrollingNodeIOS::setScrollLayerPosition(const FloatPoint& scrollPosition)
    162171{
Note: See TracChangeset for help on using the changeset viewer.