⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 106711 in webkit


Ignore:
Timestamp:
Feb 3, 2012, 5:05:24 PM (15 years ago)
Author:
andersca@apple.com
Message:

Apply changed properties from the updated scrolling tree state
https://bugs.webkit.org/show_bug.cgi?id=77792

Reviewed by Andreas Kling.

  • page/scrolling/ScrollingTreeNode.cpp:

(WebCore::ScrollingTreeNode::update):
Update the tree node properties from the scrolling tree state.

  • page/scrolling/ScrollingTreeNode.h:

(WebCore::ScrollingTreeNode::scrollingTree):
(WebCore::ScrollingTreeNode::viewportRect):
(WebCore::ScrollingTreeNode::contentsSize):
Add getters.

  • page/scrolling/ScrollingTreeState.h:

(WebCore::ScrollingTreeState::changedProperties):
New function for accessing the changed properties of the scrolling tree state.

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

(WebCore::ScrollingTreeNodeMac::update):
Update the scroll layer from the scrolling tree if necessary.

Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r106706 r106711  
     12012-02-03  Anders Carlsson  <andersca@apple.com>
     2
     3        Apply changed properties from the updated scrolling tree state
     4        https://bugs.webkit.org/show_bug.cgi?id=77792
     5
     6        Reviewed by Andreas Kling.
     7
     8        * page/scrolling/ScrollingTreeNode.cpp:
     9        (WebCore::ScrollingTreeNode::update):
     10        Update the tree node properties from the scrolling tree state.
     11
     12        * page/scrolling/ScrollingTreeNode.h:
     13        (WebCore::ScrollingTreeNode::scrollingTree):
     14        (WebCore::ScrollingTreeNode::viewportRect):
     15        (WebCore::ScrollingTreeNode::contentsSize):
     16        Add getters.
     17
     18        * page/scrolling/ScrollingTreeState.h:
     19        (WebCore::ScrollingTreeState::changedProperties):
     20        New function for accessing the changed properties of the scrolling tree state.
     21
     22        * page/scrolling/mac/ScrollingTreeNodeMac.h:
     23        * page/scrolling/mac/ScrollingTreeNodeMac.mm:
     24        (WebCore::ScrollingTreeNodeMac::update):
     25        Update the scroll layer from the scrolling tree if necessary.
     26
    1272012-02-03  Brady Eidson  <beidson@apple.com>
    228
  • trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp

    r106696 r106711  
    2929#if ENABLE(THREADED_SCROLLING)
    3030
     31#include "ScrollingTreeState.h"
     32
    3133namespace WebCore {
    3234
     
    4042}
    4143
    42 void ScrollingTreeNode::update(ScrollingTreeState*)
     44void ScrollingTreeNode::update(ScrollingTreeState* state)
    4345{
    44     // FIXME: Update the tree node properties.
     46    if (state->changedProperties() & ScrollingTreeState::ViewportRect)
     47        m_viewportRect = state->viewportRect();
     48
     49    if (state->changedProperties() & ScrollingTreeState::ContentsSize)
     50        m_contentsSize = state->contentsSize();
    4551}
    4652
  • trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.h

    r106696 r106711  
    2929#if ENABLE(THREADED_SCROLLING)
    3030
     31#include "IntRect.h"
    3132#include <wtf/PassOwnPtr.h>
    3233
     
    4647    explicit ScrollingTreeNode(ScrollingTree*);
    4748
     49    ScrollingTree* scrollingTree() const { return m_scrollingTree; }
     50    const IntRect& viewportRect() const { return m_viewportRect; }
     51    const IntSize& contentsSize() const { return m_contentsSize; }
     52
    4853private:
    4954    ScrollingTree* m_scrollingTree;
     55
     56    IntRect m_viewportRect;
     57    IntSize m_contentsSize;
    5058};
    5159
  • trunk/Source/WebCore/page/scrolling/ScrollingTreeState.h

    r106690 r106711  
    5555
    5656    bool hasChangedProperties() const { return m_changedProperties; }
     57    unsigned changedProperties() const { return m_changedProperties; }
    5758
    5859    const IntRect& viewportRect() const { return m_viewportRect; }
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.h

    r106696 r106711  
    4141
    4242private:
     43    virtual void update(ScrollingTreeState*) OVERRIDE;
     44
    4345    RetainPtr<CALayer> m_scrollLayer;
    4446};
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.mm

    r106696 r106711  
    2929#if ENABLE(THREADED_SCROLLING)
    3030
     31#include "ScrollingTreeState.h"
     32
    3133namespace WebCore {
    3234
     
    4143}
    4244
     45void ScrollingTreeNodeMac::update(ScrollingTreeState* state)
     46{
     47    ScrollingTreeNode::update(state);
     48
     49    if (state->changedProperties() & ScrollingTreeState::ScrollLayer)
     50        m_scrollLayer = state->platformScrollLayer();
     51}
     52
    4353} // namespace WebCore
    4454
Note: See TracChangeset for help on using the changeset viewer.