Changeset 56334 in webkit
- Timestamp:
- Mar 22, 2010 8:09:58 AM (14 years ago)
- Location:
- trunk/WebKit/qt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/qt/Api/qwebpage.cpp
r55803 r56334 1317 1317 case QInputMethodEvent::Selection: { 1318 1318 if (renderTextControl) { 1319 renderTextControl->setSelectionStart( a.start);1320 renderTextControl->setSelectionEnd( a.start + a.length);1319 renderTextControl->setSelectionStart(qMin(a.start, (a.start + a.length))); 1320 renderTextControl->setSelectionEnd(qMax(a.start, (a.start + a.length))); 1321 1321 } 1322 1322 break; -
trunk/WebKit/qt/ChangeLog
r56322 r56334 1 2010-03-22 Yi Shen <shenyi2006@gmail.com> 2 3 Reviewed by Simon Hausmann. 4 5 https://bugs.webkit.org/show_bug.cgi?id=35933 6 [Qt] [Symbian] Can not backward select (highlight) text using virtual keyboard 7 Make sure the selection start index is smaller than the selection end index. 8 9 * Api/qwebpage.cpp: 10 (QWebPagePrivate::inputMethodEvent): 11 * tests/qwebpage/tst_qwebpage.cpp: 12 (tst_QWebPage::inputMethods): 13 1 14 2010-03-21 Kristian Amlie <kristian.amlie@nokia.com> 2 15 -
trunk/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
r54578 r56334 1404 1404 QString selectionValue = variant.value<QString>(); 1405 1405 QCOMPARE(selectionValue, QString("eb")); 1406 1407 //Set selection with negative length 1408 inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 6, -5, QVariant()); 1409 QInputMethodEvent eventSelection2("",inputAttributes); 1410 page->event(&eventSelection2); 1411 1412 //ImAnchorPosition 1413 variant = page->inputMethodQuery(Qt::ImAnchorPosition); 1414 anchorPosition = variant.toInt(); 1415 QCOMPARE(anchorPosition, 1); 1416 1417 //ImCursorPosition 1418 variant = page->inputMethodQuery(Qt::ImCursorPosition); 1419 cursorPosition = variant.toInt(); 1420 QCOMPARE(cursorPosition, 6); 1421 1422 //ImCurrentSelection 1423 variant = page->inputMethodQuery(Qt::ImCurrentSelection); 1424 selectionValue = variant.value<QString>(); 1425 QCOMPARE(selectionValue, QString("tWebK")); 1406 1426 #endif 1407 1427
Note: See TracChangeset
for help on using the changeset viewer.