Commit 754dada6 authored by hausmann@webkit.org's avatar hausmann@webkit.org
Browse files

[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 <arurajku@cisco.com> on 2013-08-27
Reviewed by Simon Hausmann.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b9bb159e
2013-08-27 Arunprasad Rajkumar <arurajku@cisco.com>
[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 <arurajku@cisco.com>
 
[Qt] Remove the fix in QWebPage::javaScriptConsoleMessage introduced by (r61433)
......
......@@ -90,8 +90,14 @@ QWebFrameData::QWebFrameData(WebCore::Page* parentPage, WebCore::Frame* parentFr
, 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);
......
......@@ -228,6 +228,7 @@ void QWebPageAdapter::initializeWebCorePage()
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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment