summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebKit
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-12-29 16:06:12 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-12-29 16:06:12 (GMT)
commit3185723b69133530016528c8cef57da247589d30 (patch)
treec351f8b0bce3c914ee886f1f222612365d532ed1 /src/3rdparty/webkit/WebKit
parent77900ebd910635a454b442f04275b8d6db60ab4a (diff)
downloadQt-3185723b69133530016528c8cef57da247589d30.zip
Qt-3185723b69133530016528c8cef57da247589d30.tar.gz
Qt-3185723b69133530016528c8cef57da247589d30.tar.bz2
Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( eb1c86da9f5fa43a0e126ef58ab11cbd4d200af7 )
Changes in WebKit/qt since the last update: ++ b/WebKit/qt/ChangeLog 2009-12-14 Holger Hans Peter Freyther <zecke@selfish.org> Reviewed by Kenneth Rohde Christiansen. [Qt] Fix JavaScript prompt behavior for empty/null strings. https://bugs.webkit.org/show_bug.cgi?id=30914 The patch is based on the work done by Gupta Manish. In the default implementation of the JavaScript prompt we are using a QInputDialog to get the text and this has one quirk with regard to not entering any text. In other WebKit ports and in Firefox an empty string is returned but in the Qt case it is a null string. Change the API documentation in QWebPage to mention we want to have a non null string but do the fixup in the ChromeClientQt to support existing code. * Api/qwebpage.cpp: (QWebPage::javaScriptPrompt): Change API documentation * WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::runJavaScriptPrompt): Fixup null QString
Diffstat (limited to 'src/3rdparty/webkit/WebKit')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp3
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog25
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp9
3 files changed, 35 insertions, 2 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index 35f6e0c..6d08c32 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -1849,7 +1849,8 @@ bool QWebPage::javaScriptConfirm(QWebFrame *frame, const QString& msg)
The program may provide an optional message, \a msg, as well as a default value for the input in \a defaultValue.
If the prompt was cancelled by the user the implementation should return false; otherwise the
- result should be written to \a result and true should be returned.
+ result should be written to \a result and true should be returned. If the prompt was not cancelled by the
+ user, the implementation should return true and the result string must not be null.
The default implementation uses QInputDialog::getText.
*/
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 37d527fa..060ac11 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,28 @@
+2009-12-14 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Fix JavaScript prompt behavior for empty/null strings.
+ https://bugs.webkit.org/show_bug.cgi?id=30914
+
+ The patch is based on the work done by Gupta Manish.
+
+ In the default implementation of the JavaScript prompt
+ we are using a QInputDialog to get the text and this has
+ one quirk with regard to not entering any text.
+
+ In other WebKit ports and in Firefox an empty string is
+ returned but in the Qt case it is a null string.
+
+ Change the API documentation in QWebPage to mention we want to
+ have a non null string but do the fixup in the ChromeClientQt
+ to support existing code.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::javaScriptPrompt): Change API documentation
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::runJavaScriptPrompt): Fixup null QString
+
2009-12-21 David Boddie <dboddie@trolltech.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index 26cf6f6..c5d2792 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -278,7 +278,14 @@ bool ChromeClientQt::runJavaScriptPrompt(Frame* f, const String& message, const
QString x = result;
FrameLoaderClientQt *fl = static_cast<FrameLoaderClientQt*>(f->loader()->client());
bool rc = m_webPage->javaScriptPrompt(fl->webFrame(), (QString)message, (QString)defaultValue, &x);
- result = x;
+
+ // Fix up a quirk in the QInputDialog class. If no input happened the string should be empty
+ // but it is null. See https://bugs.webkit.org/show_bug.cgi?id=30914.
+ if (rc && result.isNull())
+ result = String("");
+ else
+ result = x;
+
return rc;
}