[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andreas.kling at nokia.com
andreas.kling at nokia.com
Wed Dec 22 13:38:59 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 4495a40862eef7c623dc552ef4556b16e117a060
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Sep 22 14:25:51 2010 +0000
2010-09-22 Balazs Kelemen <kb at inf.u-szeged.hu>
Reviewed by Kenneth Rohde Christiansen.
[Qt] PluginStrategy implementation is broken
https://bugs.webkit.org/show_bug.cgi?id=46078
Remove the QWebPage* member from WebPlatformStrategies.
Get the originator QWebPage of the getPluginInfo call via
the Page* argument.
* Api/qwebpage.cpp:
(QWebPagePrivate::QWebPagePrivate):
* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::initialize):
(WebPlatformStrategies::WebPlatformStrategies):
(WebPlatformStrategies::getPluginInfo):
Use the ChromeClient for accessing the originator QWebPage.
* WebCoreSupport/WebPlatformStrategies.h:
2010-09-22 Balazs Kelemen <kb at inf.u-szeged.hu>
Reviewed by Kenneth Rohde Christiansen.
[Qt] PluginStrategy implementation is broken
https://bugs.webkit.org/show_bug.cgi?id=46078
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::QWKPagePrivate):
Initialize the WebPlatformStrategies at the UI side as well because
we are using the LocalizationStrategy in the UI process.
Added a FIXME since this should be fixed in the future.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index 181b3a6..bc30bf5 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -272,7 +272,7 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
WebCore::Font::setCodePath(WebCore::Font::Complex);
#endif
- WebPlatformStrategies::initialize(qq);
+ WebPlatformStrategies::initialize();
Page::PageClients pageClients;
pageClients.chromeClient = new ChromeClientQt(q);
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 347b19c..2c4cecb 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,22 @@
+2010-09-22 Balazs Kelemen <kb at inf.u-szeged.hu>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] PluginStrategy implementation is broken
+ https://bugs.webkit.org/show_bug.cgi?id=46078
+
+ Remove the QWebPage* member from WebPlatformStrategies.
+ Get the originator QWebPage of the getPluginInfo call via
+ the Page* argument.
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ * WebCoreSupport/WebPlatformStrategies.cpp:
+ (WebPlatformStrategies::initialize):
+ (WebPlatformStrategies::WebPlatformStrategies):
+ (WebPlatformStrategies::getPluginInfo):
+ Use the ChromeClient for accessing the originator QWebPage.
+ * WebCoreSupport/WebPlatformStrategies.h:
+
2010-09-22 İsmail Dönmez <ismail at namtrac.org>
Reviewed by Andreas Kling.
diff --git a/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp b/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp
index 3750b22..7cd255f 100644
--- a/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp
+++ b/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp
@@ -30,8 +30,10 @@
#include "config.h"
#include "WebPlatformStrategies.h"
-#include "NotImplemented.h"
+#include "Chrome.h"
+#include "ChromeClientQt.h"
#include <IntSize.h>
+#include "NotImplemented.h"
#include <Page.h>
#include <PageGroup.h>
#include <PluginDatabase.h>
@@ -43,14 +45,13 @@
using namespace WebCore;
-void WebPlatformStrategies::initialize(QWebPage* webPage)
+void WebPlatformStrategies::initialize()
{
- DEFINE_STATIC_LOCAL(WebPlatformStrategies, platformStrategies, (webPage));
+ DEFINE_STATIC_LOCAL(WebPlatformStrategies, platformStrategies, ());
Q_UNUSED(platformStrategies);
}
-WebPlatformStrategies::WebPlatformStrategies(QWebPage* webPage)
- : m_page(webPage)
+WebPlatformStrategies::WebPlatformStrategies()
{
setPlatformStrategies(this);
}
@@ -78,10 +79,11 @@ void WebPlatformStrategies::refreshPlugins()
PluginDatabase::installedPlugins()->refresh();
}
-void WebPlatformStrategies::getPluginInfo(Vector<WebCore::PluginInfo>& outPlugins)
+void WebPlatformStrategies::getPluginInfo(const WebCore::Page* page, Vector<WebCore::PluginInfo>& outPlugins)
{
- QWebPluginFactory* factory = m_page->pluginFactory();
- if (factory) {
+ QWebPage* qPage = static_cast<ChromeClientQt*>(page->chrome()->client())->m_webPage;
+ QWebPluginFactory* factory;
+ if (qPage && (factory = qPage->pluginFactory())) {
QList<QWebPluginFactory::Plugin> qplugins = factory->plugins();
for (int i = 0; i < qplugins.count(); ++i) {
diff --git a/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h b/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h
index ead813b..ea366e0 100644
--- a/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h
+++ b/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h
@@ -33,14 +33,16 @@
#include <PluginStrategy.h>
#include <VisitedLinkStrategy.h>
-class QWebPage;
+namespace WebCore {
+class Page;
+}
class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::PluginStrategy, private WebCore::LocalizationStrategy, private WebCore::VisitedLinkStrategy {
public:
- static void initialize(QWebPage* webPage);
+ static void initialize();
private:
- WebPlatformStrategies(QWebPage* webPage);
+ WebPlatformStrategies();
// WebCore::PlatformStrategies
virtual WebCore::PluginStrategy* createPluginStrategy();
@@ -49,7 +51,7 @@ private:
// WebCore::PluginStrategy
virtual void refreshPlugins();
- virtual void getPluginInfo(Vector<WebCore::PluginInfo>&);
+ virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
// WebCore::LocalizationStrategy
virtual WTF::String inputElementAltText();
@@ -144,8 +146,6 @@ private:
// WebCore::VisitedLinkStrategy
virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash);
virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
-
- QWebPage* m_page;
};
#endif // WebPlatformStrategies_h
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 64d0f86..222f555 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -2,6 +2,19 @@
Reviewed by Kenneth Rohde Christiansen.
+ [Qt] PluginStrategy implementation is broken
+ https://bugs.webkit.org/show_bug.cgi?id=46078
+
+ * UIProcess/API/qt/qwkpage.cpp:
+ (QWKPagePrivate::QWKPagePrivate):
+ Initialize the WebPlatformStrategies at the UI side as well because
+ we are using the LocalizationStrategy in the UI process.
+ Added a FIXME since this should be fixed in the future.
+
+2010-09-22 Balazs Kelemen <kb at inf.u-szeged.hu>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
PluginStrategy should satisfy the needs of Qt
https://bugs.webkit.org/show_bug.cgi?id=45857
No new functionality so no new tests.
diff --git a/WebKit2/UIProcess/API/qt/qwkpage.cpp b/WebKit2/UIProcess/API/qt/qwkpage.cpp
index 723aa0b..1532323 100644
--- a/WebKit2/UIProcess/API/qt/qwkpage.cpp
+++ b/WebKit2/UIProcess/API/qt/qwkpage.cpp
@@ -23,7 +23,9 @@
#include "ClientImpl.h"
#include "LocalizedStrings.h"
+#include "WebContext.h"
#include "WebEventFactoryQt.h"
+#include "WebPlatformStrategies.h"
#include "WKStringQt.h"
#include "WKURLQt.h"
#include <QAction>
@@ -45,6 +47,10 @@ QWKPagePrivate::QWKPagePrivate(QWKPage* qq, WKPageNamespaceRef namespaceRef)
: q(qq)
, createNewPageFn(0)
{
+ // We want to use the LocalizationStrategy at the UI side as well.
+ // FIXME: this should be avoided.
+ WebPlatformStrategies::initialize();
+
memset(actions, 0, sizeof(actions));
page = toWK(namespaceRef)->createWebPage();
page->setPageClient(this);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list