diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-25 15:09:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-25 15:09:11 +0200 |
commit | a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd (patch) | |
tree | b7abd9f49ae1d4d2e426a5883bfccd42b8e2ee12 /Source/WebKit/chromium/src/WebPagePopupImpl.cpp | |
parent | 8d473cf9743f1d30a16a27114e93bd5af5648d23 (diff) | |
download | qtwebkit-a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd.tar.gz |
Imported WebKit commit eb5c1b8fe4d4b1b90b5137433fc58a91da0e6878 (http://svn.webkit.org/repository/webkit/trunk@118516)
Diffstat (limited to 'Source/WebKit/chromium/src/WebPagePopupImpl.cpp')
-rw-r--r-- | Source/WebKit/chromium/src/WebPagePopupImpl.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/WebKit/chromium/src/WebPagePopupImpl.cpp b/Source/WebKit/chromium/src/WebPagePopupImpl.cpp index 1ad417bad..617b725ce 100644 --- a/Source/WebKit/chromium/src/WebPagePopupImpl.cpp +++ b/Source/WebKit/chromium/src/WebPagePopupImpl.cpp @@ -32,6 +32,7 @@ #include "WebPagePopupImpl.h" #include "Chrome.h" +#include "DOMWindowPagePopup.h" #include "EmptyClients.h" #include "FileChooser.h" #include "FocusController.h" @@ -127,6 +128,10 @@ private: WebPagePopupImpl* m_popup; }; +class PagePopupFrameLoaderClient : public EmptyFrameLoaderClient { + virtual bool allowPagePopup() OVERRIDE { return true; } +}; + // WebPagePopupImpl ---------------------------------------------------------------- WebPagePopupImpl::WebPagePopupImpl(WebWidgetClient* client) @@ -181,8 +186,8 @@ bool WebPagePopupImpl::initPage() m_page->settings()->setScriptEnabled(true); m_page->settings()->setAllowScriptsToCloseWindows(true); - static FrameLoaderClient* emptyFrameLoaderClient = new EmptyFrameLoaderClient; - RefPtr<Frame> frame = Frame::create(m_page.get(), 0, emptyFrameLoaderClient); + static FrameLoaderClient* pagePopupFrameLoaderClient = new PagePopupFrameLoaderClient; + RefPtr<Frame> frame = Frame::create(m_page.get(), 0, pagePopupFrameLoaderClient); frame->setView(FrameView::create(frame.get())); frame->init(); frame->view()->resize(m_popupClient->contentSize()); @@ -195,7 +200,8 @@ bool WebPagePopupImpl::initPage() m_popupClient->writeDocument(*writer); writer->end(); - frame->script()->installFunctionsForPagePopup(frame.get(), m_popupClient); + ASSERT(frame->existingDOMWindow()); + DOMWindowPagePopup::install(frame->existingDOMWindow(), m_popupClient); return true; } |