https://bugs.webkit.org/show_bug.cgi?id=119791
Source/WebKit/qt:
Patch by Arunprasad Rajkumar <arurajku@cisco.com> on 2013-08-26
Reviewed by Jocelyn Turcotte.
* WidgetApi/qwebpage.cpp:
(QWebPage::javaScriptConsoleMessage): Removed hack specific to DRT, introduced by
(r61433).
Tools:
Patch by Arunprasad Rajkumar <arurajku@cisco.com> on 2013-08-26
Reviewed by Jocelyn Turcotte.
Load empty url to send onunload event to currently running page. onunload event is
mandatory for LayoutTests/plugins/open-and-close-window-with-plugin.html and
LayoutTests/plugins/geturlnotify-during-document-teardown.html.
* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebPage::~WebPage):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154593
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-08-26 Arunprasad Rajkumar <arurajku@cisco.com>
+
+ [Qt] Remove the fix in QWebPage::javaScriptConsoleMessage introduced by (r61433)
+ https://bugs.webkit.org/show_bug.cgi?id=119791
+
+ Reviewed by Jocelyn Turcotte.
+
+ * WidgetApi/qwebpage.cpp:
+ (QWebPage::javaScriptConsoleMessage): Removed hack specific to DRT, introduced by
+ (r61433).
+
2013-08-24 Darin Adler <darin@apple.com>
Frame::tree should return a reference instead of a pointer
void QWebPage::javaScriptConsoleMessage(const QString& message, int lineNumber, const QString& sourceID)
{
Q_UNUSED(sourceID);
-
- // Catch plugin logDestroy message for LayoutTests/plugins/open-and-close-window-with-plugin.html
- // At this point DRT's WebPage has already been destroyed
- if (QWebPageAdapter::drtRun) {
- if (message == QLatin1String("PLUGIN: NPP_Destroy")) {
- fprintf(stdout, "CONSOLE MESSAGE: ");
- if (lineNumber)
- fprintf(stdout, "line %d: ", lineNumber);
- fprintf(stdout, "%s\n", message.toUtf8().constData());
- }
- }
+ Q_UNUSED(lineNumber);
+ Q_UNUSED(sourceID);
}
/*!
+2013-08-26 Arunprasad Rajkumar <arurajku@cisco.com>
+
+ [Qt] Remove the fix in QWebPage::javaScriptConsoleMessage introduced by (r61433)
+ https://bugs.webkit.org/show_bug.cgi?id=119791
+
+ Reviewed by Jocelyn Turcotte.
+
+ Load empty url to send onunload event to currently running page. onunload event is
+ mandatory for LayoutTests/plugins/open-and-close-window-with-plugin.html and
+ LayoutTests/plugins/geturlnotify-during-document-teardown.html.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebPage::~WebPage):
+
2013-08-26 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Silence MiniBrowser compile warnings due to recent GTK+ deprecations
WebPage::~WebPage()
{
+ // Load an empty url to send the onunload event to the running page before
+ // deleting this instance.
+ // Prior to this fix the onunload event would be triggered from '~QWebPage', but
+ // it may call virtual functions (e.g. calling a window.alert from window.onunload)
+ // of 'QWebPage' as the 'WebPage' part of the vtable has already been unwinded.
+ // When in '~WebPage' the vtable of 'QWebPage' points to the derived
+ // class 'WebPage' and it's possible to receive 'QWebPage' virtual calls
+ // like javaScriptAlert, javaScriptConsoleMessage, ...etc.
+ mainFrame()->load(QUrl());
delete m_webInspector;
}