[Qt][WK2] Set the fixed layout setting before creating the page
authorabecsi@webkit.org <abecsi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Aug 2012 09:50:54 +0000 (09:50 +0000)
committerabecsi@webkit.org <abecsi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Aug 2012 09:50:54 +0000 (09:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=93374

Reviewed by Noam Rosenthal.

Any page setting should preferrable be set before creating the page
but fixed layout was set after the initialization of the web page.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize):
(QQuickWebViewFlickablePrivate::initialize):

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp

index e70a7ce..e98c613 100644 (file)
@@ -1,3 +1,17 @@
+2012-08-08  Andras Becsi  <andras.becsi@nokia.com>
+
+        [Qt][WK2] Set the fixed layout setting before creating the page
+        https://bugs.webkit.org/show_bug.cgi?id=93374
+
+        Reviewed by Noam Rosenthal.
+
+        Any page setting should preferrable be set before creating the page
+        but fixed layout was set after the initialization of the web page.
+
+        * UIProcess/API/qt/qquickwebview.cpp:
+        (QQuickWebViewPrivate::initialize):
+        (QQuickWebViewFlickablePrivate::initialize):
+
 2012-08-08  Mario Sanchez Prada  <msanchez@igalia.com>
 
         [WK2] Add new C API to generate MHTML data from the UI process
index 2900d0d..6ca413f 100644 (file)
@@ -295,6 +295,7 @@ void QQuickWebViewPrivate::initialize(WKContextRef contextRef, WKPageGroupRef pa
 
     context = contextRef ? QtWebContext::create(toImpl(contextRef)) : QtWebContext::defaultContext();
     webPageProxy = context->createWebPage(&pageClient, pageGroup.get());
+    webPageProxy->setUseFixedLayout(s_flickableViewportEnabled);
 #if ENABLE(FULLSCREEN_API)
     webPageProxy->fullScreenManager()->setWebView(q_ptr);
 #endif
@@ -841,7 +842,6 @@ QQuickWebViewFlickablePrivate::~QQuickWebViewFlickablePrivate()
 void QQuickWebViewFlickablePrivate::initialize(WKContextRef contextRef, WKPageGroupRef pageGroupRef)
 {
     QQuickWebViewPrivate::initialize(contextRef, pageGroupRef);
-    webPageProxy->setUseFixedLayout(true);
 }
 
 void QQuickWebViewFlickablePrivate::onComponentComplete()