[Qt][WK2] Set the fixed layout setting before creating the page
[WebKit-https.git] / Source / WebKit2 / UIProcess / API / qt / qquickwebview.cpp
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()