Changeset 147418 in webkit


Ignore:
Timestamp:
Apr 2, 2013 5:16:41 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] Implement ScrollingCoordinator::frameViewLayoutUpdated()
https://bugs.webkit.org/show_bug.cgi?id=113763

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-04-02
Reviewed by Rob Buis.

PR 318945
Internally reviewed by Jakob Petsovits.

And remove the BlackBerry specific methods
frameViewFrameRectDidChange and frameViewContentsSizeDidChange.

  • page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.cpp:

(WebCore::ScrollingCoordinatorBlackBerry::frameViewLayoutUpdated):
Called when the frame view has been laid out. Update the contents
rectangle and visible area of the scroll layer for the given frame
view.

  • page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.h:

(ScrollingCoordinatorBlackBerry):

  • platform/graphics/blackberry/LayerWebKitThread.h:

(WebCore::LayerWebKitThread::setFrameVisibleRect): Return early if
value hasn't changed.
(WebCore::LayerWebKitThread::setFrameContentsSize): Ditto.

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r147415 r147418  
     12013-04-02  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [BlackBerry] Implement ScrollingCoordinator::frameViewLayoutUpdated()
     4        https://bugs.webkit.org/show_bug.cgi?id=113763
     5
     6        Reviewed by Rob Buis.
     7
     8        PR 318945
     9        Internally reviewed by Jakob Petsovits.
     10
     11        And remove the BlackBerry specific methods
     12        frameViewFrameRectDidChange and frameViewContentsSizeDidChange.
     13
     14        * page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.cpp:
     15        (WebCore::ScrollingCoordinatorBlackBerry::frameViewLayoutUpdated):
     16        Called when the frame view has been laid out. Update the contents
     17        rectangle and visible area of the scroll layer for the given frame
     18        view.
     19        * page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.h:
     20        (ScrollingCoordinatorBlackBerry):
     21        * platform/graphics/blackberry/LayerWebKitThread.h:
     22        (WebCore::LayerWebKitThread::setFrameVisibleRect): Return early if
     23        value hasn't changed.
     24        (WebCore::LayerWebKitThread::setFrameContentsSize): Ditto.
     25
    1262013-04-02  Andrey Lushnikov  <lushnikov@chromium.org>
    227
  • trunk/Source/WebCore/page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.cpp

    r146885 r147418  
    6868}
    6969
    70 void ScrollingCoordinatorBlackBerry::frameViewFrameRectDidChange(FrameView* view)
     70void ScrollingCoordinatorBlackBerry::frameViewLayoutUpdated(FrameView* frameView)
    7171{
    72     if (GraphicsLayer* scrollLayer = scrollLayerForFrameView(view))
    73         scrollLayer->platformLayer()->setFrameVisibleRect(view->visibleContentRect());
    74 }
    75 
    76 void ScrollingCoordinatorBlackBerry::frameViewContentsSizeDidChange(FrameView* view)
    77 {
    78     if (GraphicsLayer* scrollLayer = scrollLayerForFrameView(view))
    79         scrollLayer->platformLayer()->setFrameContentsSize(view->contentsSize());
     72    if (GraphicsLayer* scrollLayer = scrollLayerForFrameView(frameView)) {
     73        scrollLayer->platformLayer()->setFrameContentsSize(frameView->contentsSize());
     74        scrollLayer->platformLayer()->setFrameVisibleRect(frameView->visibleContentRect());
     75    }
    8076}
    8177
  • trunk/Source/WebCore/page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.h

    r146478 r147418  
    3535    explicit ScrollingCoordinatorBlackBerry(Page*);
    3636
     37    // Should be called whenever the given frame view has been laid out.
     38    virtual void frameViewLayoutUpdated(FrameView*);
     39
    3740    // Return whether this scrolling coordinator can keep fixed position layers fixed to their
    3841    // containers while scrolling.
     
    4750    // Whether the layer is fixed the top or bottom edge, left or right edge.
    4851    void setLayerFixedToContainerLayerEdge(GraphicsLayer*, bool fixedToTop, bool fixedToLeft);
    49 
    50     virtual void frameViewFrameRectDidChange(FrameView*);
    51     virtual void frameViewContentsSizeDidChange(FrameView*);
    5252};
    5353
  • trunk/Source/WebCore/platform/graphics/blackberry/LayerWebKitThread.h

    r144465 r147418  
    161161    }
    162162
    163     void setFrameVisibleRect(const IntRect& rect) { m_frameVisibleRect = rect; setNeedsCommit(); }
    164     void setFrameContentsSize(const IntSize& size) { m_frameContentsSize = size; setNeedsCommit(); }
     163    void setFrameVisibleRect(const IntRect& rect)
     164    {
     165        if (m_frameVisibleRect == rect)
     166            return;
     167        m_frameVisibleRect = rect;
     168        setNeedsCommit();
     169    }
     170
     171    void setFrameContentsSize(const IntSize& size)
     172    {
     173        if (m_frameContentsSize == size)
     174            return;
     175        m_frameContentsSize = size;
     176        setNeedsCommit();
     177    }
    165178
    166179    void setContents(Image*);
Note: See TracChangeset for help on using the changeset viewer.