[EFL][WK2] REGRESSION(r143582): API test EWK2UnitTestBase.ewk_view_contents_size_chan...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Mar 2013 21:35:22 +0000 (21:35 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Mar 2013 21:35:22 +0000 (21:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=110608

Patch by Sudarsana Nagineni <sudarsana.nagineni@intel.com> on 2013-03-06
Reviewed by Kenneth Rohde Christiansen.

Test was expecting ContentsSizeChanged signal from ViewClientEfl, but
WebView was not calling client callback if useFixedLayout() is true.

This patch prevent early return if useFixedLayout() is true and call
client callback didChangeContentsSize(), which will emit the signal.

* UIProcess/efl/ViewClientEfl.cpp:
(WebKit::ViewClientEfl::didChangeContentsSize):
* UIProcess/efl/WebView.cpp:
(WebKit::WebView::didChangeContentsSize):

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/efl/ViewClientEfl.cpp
Source/WebKit2/UIProcess/efl/WebView.cpp

index e48dd58..6c49b9f 100644 (file)
@@ -1,3 +1,21 @@
+2013-03-06  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
+
+        [EFL][WK2] REGRESSION(r143582): API test EWK2UnitTestBase.ewk_view_contents_size_changed failing
+        https://bugs.webkit.org/show_bug.cgi?id=110608
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Test was expecting ContentsSizeChanged signal from ViewClientEfl, but
+        WebView was not calling client callback if useFixedLayout() is true.
+
+        This patch prevent early return if useFixedLayout() is true and call
+        client callback didChangeContentsSize(), which will emit the signal.
+
+        * UIProcess/efl/ViewClientEfl.cpp:
+        (WebKit::ViewClientEfl::didChangeContentsSize):
+        * UIProcess/efl/WebView.cpp:
+        (WebKit::WebView::didChangeContentsSize):
+
 2013-03-06  Manuel Rego Casasnovas  <rego@igalia.com>
 
         [WK2][GTK] Fix unit test WebKit2APITests/WebKitWebView/mouse-target
index 55b5aa1..d9ebb32 100644 (file)
@@ -27,6 +27,7 @@
 #include "ViewClientEfl.h"
 
 #include "EwkView.h"
+#include "PageViewportController.h" 
 #include <WebKit2/WKString.h>
 #include <WebKit2/WKView.h>
 
@@ -47,7 +48,11 @@ void ViewClientEfl::viewNeedsDisplay(WKViewRef, WKRect, const void* clientInfo)
 void ViewClientEfl::didChangeContentsSize(WKViewRef, WKSize size, const void* clientInfo)
 {
     EwkView* ewkView = toEwkView(clientInfo);
-    ewkView->scheduleUpdateDisplay();
+    if (WKPageUseFixedLayout(ewkView->wkPage()))
+        ewkView->pageViewportController()->didChangeContentsSize(toIntSize(size));
+    else
+        ewkView->scheduleUpdateDisplay();
+
     ewkView->smartCallback<ContentsSizeChanged>().call(size);
 }
 
index 33fdb5d..11cfc98 100644 (file)
@@ -205,10 +205,6 @@ void WebView::updateViewportSize()
 
 void WebView::didChangeContentsSize(const WebCore::IntSize& size)
 {
-    if (m_page->useFixedLayout()) {
-        m_ewkView->pageViewportController()->didChangeContentsSize(size);
-        return;
-    }
     m_client.didChangeContentsSize(this, size);
 }