Title: [136842] trunk/Source/WebKit/qt
- Revision
- 136842
- Author
- [email protected]
- Date
- 2012-12-06 07:01:28 -0800 (Thu, 06 Dec 2012)
Log Message
[Qt] QWebView uses the mobile style and doesn't follow Qt's style
https://bugs.webkit.org/show_bug.cgi?id=104134
Reviewed by Simon Hausmann.
Another issue introduced by r136235.
Fix the order of initialization of the styleFactory and creation of the
WebCore Page. Since the latter has a RenderTheme member and the creation
of the appropriate RenderTheme type (QStyle-backed) is dependant on having
first initialized the theme factory function, we need to postpone this just
a little bit.
* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::QWebPageAdapter):
(QWebPageAdapter::initializeWebCorePage): Added.
* WebCoreSupport/QWebPageAdapter.h:
* WidgetApi/qwebpage.cpp:
(QWebPagePrivate::QWebPagePrivate): call initializeWebCorePage only after
having initialized WebKitWidgets related logic (QStyle hooks in this case).
Modified Paths
Diff
Modified: trunk/Source/WebKit/qt/ChangeLog (136841 => 136842)
--- trunk/Source/WebKit/qt/ChangeLog 2012-12-06 14:56:26 UTC (rev 136841)
+++ trunk/Source/WebKit/qt/ChangeLog 2012-12-06 15:01:28 UTC (rev 136842)
@@ -1,3 +1,25 @@
+2012-12-06 Pierre Rossi <[email protected]>
+
+ [Qt] QWebView uses the mobile style and doesn't follow Qt's style
+ https://bugs.webkit.org/show_bug.cgi?id=104134
+
+ Reviewed by Simon Hausmann.
+
+ Another issue introduced by r136235.
+ Fix the order of initialization of the styleFactory and creation of the
+ WebCore Page. Since the latter has a RenderTheme member and the creation
+ of the appropriate RenderTheme type (QStyle-backed) is dependant on having
+ first initialized the theme factory function, we need to postpone this just
+ a little bit.
+
+ * WebCoreSupport/QWebPageAdapter.cpp:
+ (QWebPageAdapter::QWebPageAdapter):
+ (QWebPageAdapter::initializeWebCorePage): Added.
+ * WebCoreSupport/QWebPageAdapter.h:
+ * WidgetApi/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate): call initializeWebCorePage only after
+ having initialized WebKitWidgets related logic (QStyle hooks in this case).
+
2012-12-05 Zeno Albisser <[email protected]>
[Qt][Mac] QWebView disappears when the system tries to hide the scrollbars.
Modified: trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp (136841 => 136842)
--- trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp 2012-12-06 14:56:26 UTC (rev 136841)
+++ trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp 2012-12-06 15:01:28 UTC (rev 136842)
@@ -167,10 +167,13 @@
, networkManager(0)
{
WebCore::initializeWebCoreQt();
+}
+
+void QWebPageAdapter::initializeWebCorePage()
+{
#if ENABLE(GEOLOCATION) || ENABLE(DEVICE_ORIENTATION)
bool useMock = QWebPageAdapter::drtRun;
#endif
-
Page::PageClients pageClients;
pageClients.chromeClient = new ChromeClientQt(this);
pageClients.contextMenuClient = new ContextMenuClientQt();
Modified: trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.h (136841 => 136842)
--- trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.h 2012-12-06 14:56:26 UTC (rev 136841)
+++ trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.h 2012-12-06 15:01:28 UTC (rev 136842)
@@ -136,6 +136,9 @@
// the QWebPageAdapter and the QWebPagePrivate are intact when
// various destruction callbacks from WebCore::Page::~Page() hit us.
void deletePage();
+ // For similar reasons, we don't want to create the WebCore Page before
+ // we properly initialized the style factory callbacks.
+ void initializeWebCorePage();
virtual void show() = 0;
virtual void setFocus() = 0;
Modified: trunk/Source/WebKit/qt/WidgetApi/qwebpage.cpp (136841 => 136842)
--- trunk/Source/WebKit/qt/WidgetApi/qwebpage.cpp 2012-12-06 14:56:26 UTC (rev 136841)
+++ trunk/Source/WebKit/qt/WidgetApi/qwebpage.cpp 2012-12-06 15:01:28 UTC (rev 136842)
@@ -201,6 +201,7 @@
, m_lastDropAction(Qt::IgnoreAction)
{
WebKit::initializeWebKitWidgets();
+ initializeWebCorePage();
memset(actions, 0, sizeof(actions));
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes