Title: [135701] trunk
Revision
135701
Author
hausm...@webkit.org
Date
2012-11-26 03:06:55 -0800 (Mon, 26 Nov 2012)

Log Message

[Qt] REGRESSION(r135575): It made all tests assert
https://bugs.webkit.org/show_bug.cgi?id=103169

Patch by Pierre Rossi <pierre.ro...@gmail.com> on 2012-11-26
Reviewed by Simon Hausmann.

This fixes another regression introduced in r135515:
initializeWebKitQt shouldn't implicitely call initializeWebCoreQt
since it can be called from WebKit2 to initialize QStyle for testing.
This would then lead to things such as PlatformStrategies being
initialized twice.

Source/WebKit/qt:

* Api/qwebpage.cpp: Explicitely call initializeWebCoreQt().
(QWebPagePrivate::QWebPagePrivate):
* WebCoreSupport/InitWebCoreQt.cpp:
(WebKit::initializeWebKitQt):
(WebCore::initializeWebCoreQt):
* WebCoreSupport/InitWebCoreQt.h:
(WebCore):

Source/WebKit2:

* qt/MainQt.cpp: No need to initialize anything if we're not using QStyle.
(WebKit):
(main):

Tools:

* DumpRenderTree/qt/DumpRenderTreeQt.cpp: Also propagate the change to DRT this time.
(WebCore::DumpRenderTree::DumpRenderTree):

Modified Paths

Diff

Modified: trunk/Source/WebKit/qt/Api/qwebpage.cpp (135700 => 135701)


--- trunk/Source/WebKit/qt/Api/qwebpage.cpp	2012-11-26 11:00:03 UTC (rev 135700)
+++ trunk/Source/WebKit/qt/Api/qwebpage.cpp	2012-11-26 11:06:55 UTC (rev 135701)
@@ -68,6 +68,7 @@
 #include "HTMLNames.h"
 #include "HitTestResult.h"
 #include "Image.h"
+#include "InitWebCoreQt.h"
 #include "InitWebKitQt.h"
 #include "InspectorClientQt.h"
 #include "InspectorClientWebPage.h"
@@ -325,6 +326,7 @@
 #endif
 
     WebKit::initializeWebKitWidgets();
+    WebCore::initializeWebCoreQt();
 
     Page::PageClients pageClients;
     pageClients.chromeClient = new ChromeClientQt(this);

Modified: trunk/Source/WebKit/qt/ChangeLog (135700 => 135701)


--- trunk/Source/WebKit/qt/ChangeLog	2012-11-26 11:00:03 UTC (rev 135700)
+++ trunk/Source/WebKit/qt/ChangeLog	2012-11-26 11:06:55 UTC (rev 135701)
@@ -1,3 +1,24 @@
+2012-11-26  Pierre Rossi  <pierre.ro...@gmail.com>
+
+        [Qt] REGRESSION(r135575): It made all tests assert
+        https://bugs.webkit.org/show_bug.cgi?id=103169
+
+        Reviewed by Simon Hausmann.
+
+        This fixes another regression introduced in r135515:
+        initializeWebKitQt shouldn't implicitely call initializeWebCoreQt
+        since it can be called from WebKit2 to initialize QStyle for testing.
+        This would then lead to things such as PlatformStrategies being
+        initialized twice.
+
+        * Api/qwebpage.cpp: Explicitely call initializeWebCoreQt().
+        (QWebPagePrivate::QWebPagePrivate):
+        * WebCoreSupport/InitWebCoreQt.cpp:
+        (WebKit::initializeWebKitQt):
+        (WebCore::initializeWebCoreQt):
+        * WebCoreSupport/InitWebCoreQt.h:
+        (WebCore):
+
 2012-11-26  Zeno Albisser  <z...@webkit.org>
 
         [Qt] Make sure the QGLWidget context is current when creating the TextureMapper.

Modified: trunk/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp (135700 => 135701)


--- trunk/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp	2012-11-26 11:00:03 UTC (rev 135700)
+++ trunk/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp	2012-11-26 11:06:55 UTC (rev 135701)
@@ -62,8 +62,6 @@
         WebCore::RenderThemeQStyle::setStyleFactoryFunction(initCallback);
         WebCore::RenderThemeQt::setCustomTheme(WebCore::RenderThemeQStyle::create, new WebCore::ScrollbarThemeQStyle);
     }
-
-    WebCore::initializeWebCoreQt();
 }
 
 Q_DECL_EXPORT void setImagePlatformResource(const char* name, const QPixmap& pixmap)
@@ -75,7 +73,7 @@
 
 namespace WebCore {
 
-void initializeWebCoreQt()
+Q_DECL_EXPORT void initializeWebCoreQt()
 {
     static bool initialized = false;
     if (initialized)

Modified: trunk/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.h (135700 => 135701)


--- trunk/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.h	2012-11-26 11:00:03 UTC (rev 135700)
+++ trunk/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.h	2012-11-26 11:06:55 UTC (rev 135701)
@@ -48,7 +48,7 @@
 
 namespace WebCore {
 
-void initializeWebCoreQt();
+Q_DECL_EXPORT void initializeWebCoreQt();
 
 }
 

Modified: trunk/Source/WebKit2/ChangeLog (135700 => 135701)


--- trunk/Source/WebKit2/ChangeLog	2012-11-26 11:00:03 UTC (rev 135700)
+++ trunk/Source/WebKit2/ChangeLog	2012-11-26 11:06:55 UTC (rev 135701)
@@ -1,3 +1,20 @@
+2012-11-26  Pierre Rossi  <pierre.ro...@gmail.com>
+
+        [Qt] REGRESSION(r135575): It made all tests assert
+        https://bugs.webkit.org/show_bug.cgi?id=103169
+
+        Reviewed by Simon Hausmann.
+
+        This fixes another regression introduced in r135515:
+        initializeWebKitQt shouldn't implicitely call initializeWebCoreQt
+        since it can be called from WebKit2 to initialize QStyle for testing.
+        This would then lead to things such as PlatformStrategies being
+        initialized twice.
+
+        * qt/MainQt.cpp: No need to initialize anything if we're not using QStyle.
+        (WebKit):
+        (main):
+
 2012-11-26  Huang Dongsung  <luxte...@company100.net>
 
         REGRESSION(134142): ASSERT(!m_size.isZero()) hits in CoordinatedBackingStore::paintToTextureMapper().

Modified: trunk/Source/WebKit2/qt/MainQt.cpp (135700 => 135701)


--- trunk/Source/WebKit2/qt/MainQt.cpp	2012-11-26 11:00:03 UTC (rev 135700)
+++ trunk/Source/WebKit2/qt/MainQt.cpp	2012-11-26 11:06:55 UTC (rev 135701)
@@ -45,7 +45,6 @@
 #if !defined(QT_NO_WIDGETS)
 Q_DECL_IMPORT void initializeWebKitWidgets();
 #endif
-Q_DECL_IMPORT void initializeWebKitQt();
 }
 
 #if !defined(NDEBUG) && defined(Q_OS_UNIX)
@@ -96,10 +95,7 @@
 #if !defined(QT_NO_WIDGETS)
     if (qgetenv("QT_WEBKIT_THEME_NAME") == "qstyle")
         WebKit::initializeWebKitWidgets();
-    else
 #endif
-        WebKit::initializeWebKitQt();
 
-
     return WebKit::WebProcessMainQt(appInstance);
 }

Modified: trunk/Tools/ChangeLog (135700 => 135701)


--- trunk/Tools/ChangeLog	2012-11-26 11:00:03 UTC (rev 135700)
+++ trunk/Tools/ChangeLog	2012-11-26 11:06:55 UTC (rev 135701)
@@ -1,3 +1,19 @@
+2012-11-26  Pierre Rossi  <pierre.ro...@gmail.com>
+
+        [Qt] REGRESSION(r135575): It made all tests assert
+        https://bugs.webkit.org/show_bug.cgi?id=103169
+
+        Reviewed by Simon Hausmann.
+
+        This fixes another regression introduced in r135515:
+        initializeWebKitQt shouldn't implicitely call initializeWebCoreQt
+        since it can be called from WebKit2 to initialize QStyle for testing.
+        This would then lead to things such as PlatformStrategies being
+        initialized twice.
+
+        * DumpRenderTree/qt/DumpRenderTreeQt.cpp: Also propagate the change to DRT this time.
+        (WebCore::DumpRenderTree::DumpRenderTree):
+
 2012-11-24  Zan Dobersek  <zandober...@gmail.com>
 
         Add the --order option to NRWT

Modified: trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp (135700 => 135701)


--- trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp	2012-11-26 11:00:03 UTC (rev 135700)
+++ trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp	2012-11-26 11:06:55 UTC (rev 135701)
@@ -36,6 +36,7 @@
 #include "DumpRenderTreeSupportQt.h"
 #include "EventSenderQt.h"
 #include "GCControllerQt.h"
+#include "InitWebCoreQt.h"
 #include "InitWebKitQt.h"
 #include "QtTestSupport.h"
 #include "TestRunnerQt.h"
@@ -396,6 +397,7 @@
         setGraphicsBased(true);
 
     WebKit::initializeWebKitWidgets();
+    WebCore::initializeWebCoreQt();
     DumpRenderTreeSupportQt::initialize();
 
     // Set running in DRT mode for qwebpage to create testable objects.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to