Title: [154671] trunk/Source/WebKit/qt
Revision
154671
Author
[email protected]
Date
2013-08-27 02:54:21 -0700 (Tue, 27 Aug 2013)

Log Message

[Qt] Let Page create the main Frame.
https://bugs.webkit.org/show_bug.cgi?id=120349

Adjust to latest changes in WebCore::Page to create the main frame.

Patch by Arunprasad Rajkumar <[email protected]> on 2013-08-27
Reviewed by Simon Hausmann.

* WebCoreSupport/QWebFrameAdapter.cpp:
(QWebFrameData::QWebFrameData):
* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::initializeWebCorePage):

Modified Paths

Diff

Modified: trunk/Source/WebKit/qt/ChangeLog (154670 => 154671)


--- trunk/Source/WebKit/qt/ChangeLog	2013-08-27 08:41:27 UTC (rev 154670)
+++ trunk/Source/WebKit/qt/ChangeLog	2013-08-27 09:54:21 UTC (rev 154671)
@@ -1,3 +1,17 @@
+2013-08-27  Arunprasad Rajkumar  <[email protected]>
+
+        [Qt] Let Page create the main Frame.
+        https://bugs.webkit.org/show_bug.cgi?id=120349
+
+        Adjust to latest changes in WebCore::Page to create the main frame.
+
+        Reviewed by Simon Hausmann.
+
+        * WebCoreSupport/QWebFrameAdapter.cpp:
+        (QWebFrameData::QWebFrameData):
+        * WebCoreSupport/QWebPageAdapter.cpp:
+        (QWebPageAdapter::initializeWebCorePage):
+
 2013-08-26  Arunprasad Rajkumar  <[email protected]>
 
         [Qt] Remove the fix in QWebPage::_javascript_ConsoleMessage introduced by (r61433)

Modified: trunk/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp (154670 => 154671)


--- trunk/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp	2013-08-27 08:41:27 UTC (rev 154670)
+++ trunk/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp	2013-08-27 09:54:21 UTC (rev 154671)
@@ -90,8 +90,14 @@
     , marginWidth(0)
     , marginHeight(0)
 {
-    frameLoaderClient = new FrameLoaderClientQt();
-    frame = Frame::create(page, ownerElement, frameLoaderClient);
+    // mainframe is already created in WebCore::Page, just use it.
+    if (!parentFrame || !ownerElement) {
+        frame = &parentPage->mainFrame();
+        frameLoaderClient = static_cast<FrameLoaderClientQt*>(&frame->loader().client());
+    } else {
+        frameLoaderClient = new FrameLoaderClientQt();
+        frame = Frame::create(page, ownerElement, frameLoaderClient);
+    }
 
     // FIXME: All of the below should probably be moved over into WebCore
     frame->tree().setName(name);

Modified: trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp (154670 => 154671)


--- trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp	2013-08-27 08:41:27 UTC (rev 154670)
+++ trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp	2013-08-27 09:54:21 UTC (rev 154671)
@@ -228,6 +228,7 @@
     pageClients.editorClient = new EditorClientQt(this);
     pageClients.dragClient = new DragClientQt(pageClients.chromeClient);
     pageClients.inspectorClient = new InspectorClientQt(this);
+    pageClients.loaderClientForMainFrame = new FrameLoaderClientQt();
     page = new Page(pageClients);
 
 #if ENABLE(GEOLOCATION)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to