Title: [88933] trunk/Source/WebKit/qt
- Revision
- 88933
- Author
- [email protected]
- Date
- 2011-06-15 08:08:23 -0700 (Wed, 15 Jun 2011)
Log Message
2011-06-15 Diego Gonzalez <[email protected]>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Inconsistent behavior on a form submit request...
https://bugs.webkit.org/show_bug.cgi?id=45523
The inconsistency occurs when a form submission requests a new window.
Two windows are opened (instead of only one) and the first window is opened
as a blank page.
By default each page is put into their own unique page group, which affects popup windows
and visited links. Page groups (per process only) is a feature making it possible to use
separate settings for each group, so that for instance an integrated browser/email reader
can use different settings for displaying HTML pages and HTML email. To make QtWebKit work
as expected out of the box, we use a default group similar to what other ports are doing.
* Api/qwebpage.cpp:
Modified Paths
Diff
Modified: trunk/Source/WebKit/qt/Api/qwebpage.cpp (88932 => 88933)
--- trunk/Source/WebKit/qt/Api/qwebpage.cpp 2011-06-15 15:08:01 UTC (rev 88932)
+++ trunk/Source/WebKit/qt/Api/qwebpage.cpp 2011-06-15 15:08:23 UTC (rev 88933)
@@ -345,6 +345,13 @@
#endif
page = new Page(pageClients);
+ // By default each page is put into their own unique page group, which affects popup windows
+ // and visited links. Page groups (per process only) is a feature making it possible to use
+ // separate settings for each group, so that for instance an integrated browser/email reader
+ // can use different settings for displaying HTML pages and HTML email. To make QtWebKit work
+ // as expected out of the box, we use a default group similar to what other ports are doing.
+ page->setGroupName("Default Group");
+
#if ENABLE(CLIENT_BASED_GEOLOCATION)
// In case running in DumpRenderTree mode set the controller to mock provider.
if (QWebPagePrivate::drtRun)
Modified: trunk/Source/WebKit/qt/ChangeLog (88932 => 88933)
--- trunk/Source/WebKit/qt/ChangeLog 2011-06-15 15:08:01 UTC (rev 88932)
+++ trunk/Source/WebKit/qt/ChangeLog 2011-06-15 15:08:23 UTC (rev 88933)
@@ -1,3 +1,22 @@
+2011-06-15 Diego Gonzalez <[email protected]>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Inconsistent behavior on a form submit request...
+ https://bugs.webkit.org/show_bug.cgi?id=45523
+
+ The inconsistency occurs when a form submission requests a new window.
+ Two windows are opened (instead of only one) and the first window is opened
+ as a blank page.
+
+ By default each page is put into their own unique page group, which affects popup windows
+ and visited links. Page groups (per process only) is a feature making it possible to use
+ separate settings for each group, so that for instance an integrated browser/email reader
+ can use different settings for displaying HTML pages and HTML email. To make QtWebKit work
+ as expected out of the box, we use a default group similar to what other ports are doing.
+
+ * Api/qwebpage.cpp:
+
2011-06-14 Caio Marcelo de Oliveira Filho <[email protected]>
Reviewed by Andreas Kling.
Modified: trunk/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp (88932 => 88933)
--- trunk/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp 2011-06-15 15:08:01 UTC (rev 88932)
+++ trunk/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp 2011-06-15 15:08:23 UTC (rev 88933)
@@ -89,11 +89,11 @@
private slots:
void initTestCase();
void cleanupTestCase();
-
void contextMenuCopy();
void acceptNavigationRequest();
void geolocationRequestJS();
void loadFinished();
+ void popupFormSubmission();
void acceptNavigationRequestWithNewWindow();
void userStyleSheet();
void loadHtml5Video();
@@ -390,6 +390,25 @@
}
};
+void tst_QWebPage::popupFormSubmission()
+{
+ TestPage page;
+ page.settings()->setAttribute(QWebSettings::_javascript_CanOpenWindows, true);
+ page.mainFrame()->setHtml("<form name=form1 method=get action='' target=myNewWin>"\
+ "<input type=hidden name=foo value='bar'>"\
+ "</form>");
+ page.mainFrame()->evaluateJavaScript("window.open('', 'myNewWin', 'width=500,height=300,toolbar=0')");
+ page.mainFrame()->evaluateJavaScript("document.form1.submit();");
+
+ QTest::qWait(500);
+ // The number of popup created should be one.
+ QVERIFY(page.createdWindows.size() == 1);
+
+ QString url = ""
+ // Check if the form submission was OK.
+ QVERIFY(url.contains("?foo=bar"));
+}
+
void tst_QWebPage::acceptNavigationRequestWithNewWindow()
{
TestPage* page = new TestPage(m_view);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes