Changeset 52152 in webkit
- Timestamp:
- Dec 15, 2009 8:17:46 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r52151 r52152 1 2009-12-14 Holger Hans Peter Freyther <zecke@selfish.org> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] Add manual test for JavaScript prompt corner case 6 https://bugs.webkit.org/show_bug.cgi?id=30914 7 8 The patch is based on the work done by Gupta Manish. 9 10 Verify behavior of the JavaScript prompt function. Currently 11 Qt is not behaving like other WebKit ports and Firefox in 12 regards to accepting the prompt but not entering a text. 13 14 * manual-tests/qt/java-script-prompt.html: Added. 15 1 16 2009-12-15 Luiz Agostini <luiz.agostini@openbossa.org> 2 17 -
trunk/WebKit/qt/Api/qwebpage.cpp
r52103 r52152 1855 1855 1856 1856 If the prompt was cancelled by the user the implementation should return false; otherwise the 1857 result should be written to \a result and true should be returned. 1857 result should be written to \a result and true should be returned. If the prompt was not cancelled by the 1858 user, the implementation should return true and the result string must not be null. 1858 1859 1859 1860 The default implementation uses QInputDialog::getText. -
trunk/WebKit/qt/ChangeLog
r52144 r52152 1 2009-12-14 Holger Hans Peter Freyther <zecke@selfish.org> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] Fix JavaScript prompt behavior for empty/null strings. 6 https://bugs.webkit.org/show_bug.cgi?id=30914 7 8 The patch is based on the work done by Gupta Manish. 9 10 In the default implementation of the JavaScript prompt 11 we are using a QInputDialog to get the text and this has 12 one quirk with regard to not entering any text. 13 14 In other WebKit ports and in Firefox an empty string is 15 returned but in the Qt case it is a null string. 16 17 Change the API documentation in QWebPage to mention we want to 18 have a non null string but do the fixup in the ChromeClientQt 19 to support existing code. 20 21 * Api/qwebpage.cpp: 22 (QWebPage::javaScriptPrompt): Change API documentation 23 * WebCoreSupport/ChromeClientQt.cpp: 24 (WebCore::ChromeClientQt::runJavaScriptPrompt): Fixup null QString 25 1 26 2009-11-24 Holger Hans Peter Freyther <zecke@selfish.org> 2 27 -
trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
r50351 r52152 284 284 FrameLoaderClientQt *fl = static_cast<FrameLoaderClientQt*>(f->loader()->client()); 285 285 bool rc = m_webPage->javaScriptPrompt(fl->webFrame(), (QString)message, (QString)defaultValue, &x); 286 result = x; 286 287 // Fix up a quirk in the QInputDialog class. If no input happened the string should be empty 288 // but it is null. See https://bugs.webkit.org/show_bug.cgi?id=30914. 289 if (rc && result.isNull()) 290 result = String(""); 291 else 292 result = x; 293 287 294 return rc; 288 295 }
Note: See TracChangeset
for help on using the changeset viewer.