[WK2][CoordinatedGraphics] DrawingArea's visible content area must be updated when...
authormarcelo.lira@openbossa.org <marcelo.lira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 May 2013 14:08:55 +0000 (14:08 +0000)
committermarcelo.lira@openbossa.org <marcelo.lira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 May 2013 14:08:55 +0000 (14:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=116845

Reviewed by Noam Rosenthal.

* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::didChangeContentsSize):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@150802 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp

index 8098e12..4a6d1d7 100644 (file)
@@ -1,3 +1,13 @@
+2013-05-28  Marcelo Lira  <marcelo.lira@openbossa.org>
+
+        [WK2][CoordinatedGraphics] DrawingArea's visible content area must be updated when contents size changes
+        https://bugs.webkit.org/show_bug.cgi?id=116845
+
+        Reviewed by Noam Rosenthal.
+
+        * UIProcess/CoordinatedGraphics/WebView.cpp:
+        (WebKit::WebView::didChangeContentsSize):
+
 2013-05-28  Noam Rosenthal  <noam@webkit.org>
 
         [Qt] REGRESSION(r149292): broke scrolling in Qt WK2 desktop mode
index ff7d6a5..4ea46cd 100644 (file)
@@ -186,8 +186,13 @@ void WebView::initializeClient(const WKViewClient* client)
 
 void WebView::didChangeContentsSize(const WebCore::IntSize& size)
 {
+    if (m_contentsSize == size)
+        return;
+
     m_contentsSize = size;
     m_client.didChangeContentsSize(this, size);
+
+    updateViewportSize();
 }
 
 AffineTransform WebView::transformFromScene() const