Make popup windows work
authorstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Jan 2007 10:24:53 +0000 (10:24 +0000)
committerstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Jan 2007 10:24:53 +0000 (10:24 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19214 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitQt/Api/qwebpage.cpp
WebKitQt/Api/qwebpage.h
WebKitQt/ChangeLog
WebKitQt/WebCoreSupport/ChromeClientQt.cpp

index 1d7103f256439b91417c1aa580c0f33262d134a7..b9ddc5f746152eac51d7113436cc5a921aba42b2 100644 (file)
@@ -189,5 +189,9 @@ void QWebPage::runJavaScriptAlert(QWebFrame *frame, const QString& msg)
 {
 }
 
-#include "qwebpage.moc"
+QWebPage *QWebPage::createWindow()
+{
+    return 0;
+}
 
+#include "qwebpage.moc"
index 9c6d2ded5421fe4a47683169129b2a1138fb9977..54384706492bc06a04a9c7f891c61b3c23856995 100644 (file)
@@ -35,6 +35,8 @@ class QWebFrameData;
 
 namespace WebCore {
     class FrameLoaderClientQt;
+    class ChromeClientQt;
+    class FrameLoadRequest;
 }
 
 class QWebPage : public QWidget
@@ -101,12 +103,13 @@ signals:
 
 protected:
     virtual QWebFrame *createFrame(QWebFrame *parentFrame, QWebFrameData *frameData);
-    //virtual QWebPage *createPage(...);
-   
+    virtual QWebPage *createWindow();
+
 private:
     friend class QWebFrame;
     friend class QWebPagePrivate;
     friend class WebCore::FrameLoaderClientQt;
+    friend class WebCore::ChromeClientQt;
     QWebPagePrivate *d;
 };
 
index bf8f5551246feb014605f8498f62b79177368e99..c95f241c187feb1b9b130d257548f89cd40c0185 100644 (file)
@@ -1,3 +1,13 @@
+2007-01-29  George Staikos  <staikos@kde.org>
+
+        Make popup windows work.
+
+        * Api/qwebpage.cpp:
+        (QWebPage::createWindow):
+        * Api/qwebpage.h:
+        * WebCoreSupport/ChromeClientQt.cpp:
+        (WebCore::ChromeClientQt::createWindow):
+
 2007-01-29  Lars Knoll <lars@trolltech.com>
 
         Reviewed by Zack
index 4e8bdc54edfe86d49aa9446c645d5b023bbe33c4..09512bbb92b1f3e933499ac80472274025d7e5b1 100644 (file)
@@ -33,6 +33,7 @@
 #include "FrameLoadRequest.h"
 
 #include "qwebpage.h"
+#include "qwebpage_p.h"
 
 #define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
 
@@ -117,9 +118,10 @@ void ChromeClientQt::takeFocus(FocusDirection)
 
 Page* ChromeClientQt::createWindow(const FrameLoadRequest& request)
 {
-    //QWebPage *newPage = m_webPage->createWindow(...);
-    notImplemented();
-    return 0;
+    QWebPage *newPage = m_webPage->createWindow();
+    if (!newPage)
+        return 0;
+    return newPage->d->page;
 }