[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.20-204-g221d8e8
kevino at webkit.org
kevino at webkit.org
Wed Feb 10 22:11:35 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 0be2f2c6c3ed6bb21e1ed0bd44e7c9283acc4cff
Author: kevino at webkit.org <kevino at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Feb 3 23:47:09 2010 +0000
Reviewed by Kevin Ollivier.
Add wxWebKitWindowFeatures and have createWindow send a notification for
clients to handle.
https://bugs.webkit.org/show_bug.cgi?id=34542
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog
index 1c7adf2..26d14d6 100644
--- a/WebKit/wx/ChangeLog
+++ b/WebKit/wx/ChangeLog
@@ -1,3 +1,17 @@
+2010-02-03 Kevin Watters <kevinwatters at gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Add wxWebKitWindowFeatures and have createWindow send a notification for
+ clients to handle.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34542
+
+ * WebKitSupport/ChromeClientWx.cpp:
+ (WebCore::wkFeaturesforWindowFeatures):
+ (WebCore::ChromeClientWx::createWindow):
+ * WebView.h:
+
2010-01-27 Kevin Watters <kevinwatters at gmail.com>
Reviewed by Kevin Ollivier.
diff --git a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp b/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
index 17f6f43..4d524bc 100644
--- a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
+++ b/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
@@ -37,6 +37,7 @@
#include "FrameLoadRequest.h"
#include "NotImplemented.h"
#include "PlatformString.h"
+#include "WindowFeatures.h"
#include <stdio.h>
@@ -53,6 +54,21 @@
namespace WebCore {
+wxWebKitWindowFeatures wkFeaturesforWindowFeatures(const WindowFeatures& features)
+{
+ wxWebKitWindowFeatures wkFeatures;
+ wkFeatures.menuBarVisible = features.menuBarVisible;
+ wkFeatures.statusBarVisible = features.statusBarVisible;
+ wkFeatures.toolBarVisible = features.toolBarVisible;
+ wkFeatures.locationBarVisible = features.locationBarVisible;
+ wkFeatures.scrollbarsVisible = features.scrollbarsVisible;
+ wkFeatures.resizable = features.resizable;
+ wkFeatures.fullscreen = features.fullscreen;
+ wkFeatures.dialog = features.dialog;
+
+ return wkFeatures;
+}
+
ChromeClientWx::ChromeClientWx(wxWebView* webView)
{
m_webView = webView;
@@ -115,22 +131,21 @@ void ChromeClientWx::focusedNodeChanged(Node*)
{
}
-Page* ChromeClientWx::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures&)
+Page* ChromeClientWx::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures& features)
{
-
- // FIXME: Create a EVT_WEBKIT_NEW_WINDOW event, and only run this code
- // when that event is not handled.
-
Page* myPage = 0;
- wxWebBrowserShell* newFrame = new wxWebBrowserShell(wxTheApp->GetAppName());
+ wxWebViewNewWindowEvent wkEvent(m_webView);
+ wkEvent.SetURL(request.resourceRequest().url().string());
- if (newFrame->webview) {
- newFrame->webview->LoadURL(request.resourceRequest().url().string());
- newFrame->Show(true);
-
- WebViewPrivate* impl = newFrame->webview->m_impl;
- if (impl)
- myPage = impl->page;
+ wxWebKitWindowFeatures wkFeatures = wkFeaturesforWindowFeatures(features);
+ wkEvent.SetWindowFeatures(wkFeatures);
+
+ if (m_webView->GetEventHandler()->ProcessEvent(wkEvent)) {
+ if (wxWebView* webView = wkEvent.GetWebView()) {
+ WebViewPrivate* impl = webView->m_impl;
+ if (impl)
+ myPage = impl->page;
+ }
}
return myPage;
diff --git a/WebKit/wx/WebView.h b/WebKit/wx/WebView.h
index 7d923a3..9a6546c 100644
--- a/WebKit/wx/WebView.h
+++ b/WebKit/wx/WebView.h
@@ -203,7 +203,6 @@ public:
const wxString& password = wxEmptyString);
wxWebSettings GetWebSettings();
-
wxWebKitParseMode GetParseMode() const;
protected:
@@ -304,6 +303,30 @@ private:
wxString m_url;
};
+class WXDLLIMPEXP_WEBKIT wxWebKitWindowFeatures
+{
+public:
+ wxWebKitWindowFeatures()
+ : menuBarVisible(true)
+ , statusBarVisible(true)
+ , toolBarVisible(true)
+ , locationBarVisible(true)
+ , scrollbarsVisible(true)
+ , resizable(true)
+ , fullscreen(false)
+ , dialog(false)
+ { }
+
+ bool menuBarVisible;
+ bool statusBarVisible;
+ bool toolBarVisible;
+ bool locationBarVisible;
+ bool scrollbarsVisible;
+ bool resizable;
+ bool fullscreen;
+ bool dialog;
+};
+
class WXDLLIMPEXP_WEBKIT wxWebViewNewWindowEvent : public wxCommandEvent
{
#ifndef SWIG
@@ -315,11 +338,17 @@ public:
void SetURL(const wxString& url) { m_url = url; }
wxString GetTargetName() const { return m_targetName; }
void SetTargetName(const wxString& name) { m_targetName = name; }
+ wxWebView* GetWebView() { return m_webView; }
+ void SetWebView(wxWebView* webView) { m_webView = webView; }
+ wxWebKitWindowFeatures GetWindowFeatures() { return m_features; }
+ void SetWindowFeatures(wxWebKitWindowFeatures features) { m_features = features; }
wxWebViewNewWindowEvent( wxWindow* win = static_cast<wxWindow*>(NULL));
wxEvent *Clone(void) const { return new wxWebViewNewWindowEvent(*this); }
private:
+ wxWebView* m_webView;
+ wxWebKitWindowFeatures m_features;
wxString m_url;
wxString m_targetName;
};
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list