Title: [147418] trunk/Source/WebCore
Revision
147418
Author
[email protected]
Date
2013-04-02 05:16:41 -0700 (Tue, 02 Apr 2013)

Log Message

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

Patch by Carlos Garcia Campos <[email protected]> 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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (147417 => 147418)


--- trunk/Source/WebCore/ChangeLog	2013-04-02 12:06:13 UTC (rev 147417)
+++ trunk/Source/WebCore/ChangeLog	2013-04-02 12:16:41 UTC (rev 147418)
@@ -1,3 +1,28 @@
+2013-04-02  Carlos Garcia Campos  <[email protected]>
+
+        [BlackBerry] Implement ScrollingCoordinator::frameViewLayoutUpdated()
+        https://bugs.webkit.org/show_bug.cgi?id=113763
+
+        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.
+
 2013-04-02  Andrey Lushnikov  <[email protected]>
 
         Web Inspector: Separate _javascript_SourceFrame popover from knowledge of editor's DOM

Modified: trunk/Source/WebCore/page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.cpp (147417 => 147418)


--- trunk/Source/WebCore/page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.cpp	2013-04-02 12:06:13 UTC (rev 147417)
+++ trunk/Source/WebCore/page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.cpp	2013-04-02 12:16:41 UTC (rev 147418)
@@ -67,16 +67,12 @@
     layer->platformLayer()->setFixedToLeft(fixedToLeft);
 }
 
-void ScrollingCoordinatorBlackBerry::frameViewFrameRectDidChange(FrameView* view)
+void ScrollingCoordinatorBlackBerry::frameViewLayoutUpdated(FrameView* frameView)
 {
-    if (GraphicsLayer* scrollLayer = scrollLayerForFrameView(view))
-        scrollLayer->platformLayer()->setFrameVisibleRect(view->visibleContentRect());
+    if (GraphicsLayer* scrollLayer = scrollLayerForFrameView(frameView)) {
+        scrollLayer->platformLayer()->setFrameContentsSize(frameView->contentsSize());
+        scrollLayer->platformLayer()->setFrameVisibleRect(frameView->visibleContentRect());
+    }
 }
 
-void ScrollingCoordinatorBlackBerry::frameViewContentsSizeDidChange(FrameView* view)
-{
-    if (GraphicsLayer* scrollLayer = scrollLayerForFrameView(view))
-        scrollLayer->platformLayer()->setFrameContentsSize(view->contentsSize());
 }
-
-}

Modified: trunk/Source/WebCore/page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.h (147417 => 147418)


--- trunk/Source/WebCore/page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.h	2013-04-02 12:06:13 UTC (rev 147417)
+++ trunk/Source/WebCore/page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.h	2013-04-02 12:16:41 UTC (rev 147418)
@@ -34,6 +34,9 @@
 public:
     explicit ScrollingCoordinatorBlackBerry(Page*);
 
+    // Should be called whenever the given frame view has been laid out.
+    virtual void frameViewLayoutUpdated(FrameView*);
+
     // Return whether this scrolling coordinator can keep fixed position layers fixed to their
     // containers while scrolling.
     virtual bool supportsFixedPositionLayers() const { return true; }
@@ -46,9 +49,6 @@
 
     // Whether the layer is fixed the top or bottom edge, left or right edge.
     void setLayerFixedToContainerLayerEdge(GraphicsLayer*, bool fixedToTop, bool fixedToLeft);
-
-    virtual void frameViewFrameRectDidChange(FrameView*);
-    virtual void frameViewContentsSizeDidChange(FrameView*);
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/graphics/blackberry/LayerWebKitThread.h (147417 => 147418)


--- trunk/Source/WebCore/platform/graphics/blackberry/LayerWebKitThread.h	2013-04-02 12:06:13 UTC (rev 147417)
+++ trunk/Source/WebCore/platform/graphics/blackberry/LayerWebKitThread.h	2013-04-02 12:16:41 UTC (rev 147418)
@@ -160,9 +160,22 @@
         setNeedsCommit();
     }
 
-    void setFrameVisibleRect(const IntRect& rect) { m_frameVisibleRect = rect; setNeedsCommit(); }
-    void setFrameContentsSize(const IntSize& size) { m_frameContentsSize = size; setNeedsCommit(); }
+    void setFrameVisibleRect(const IntRect& rect)
+    {
+        if (m_frameVisibleRect == rect)
+            return;
+        m_frameVisibleRect = rect;
+        setNeedsCommit();
+    }
 
+    void setFrameContentsSize(const IntSize& size)
+    {
+        if (m_frameContentsSize == size)
+            return;
+        m_frameContentsSize = size;
+        setNeedsCommit();
+    }
+
     void setContents(Image*);
     Image* contents() const { return m_contents.get(); }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to