src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
changeset 19 fcece45ef507
parent 18 2f34d5167611
child 29 b72c6db6890b
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp	Fri Apr 16 15:50:13 2010 +0300
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp	Mon May 03 13:17:34 2010 +0300
@@ -1248,8 +1248,8 @@
 #if QT_VERSION >= 0x040600
         case QInputMethodEvent::Selection: {
             if (renderTextControl) {
-                renderTextControl->setSelectionStart(a.start);
-                renderTextControl->setSelectionEnd(a.start + a.length);
+                renderTextControl->setSelectionStart(qMin(a.start, (a.start + a.length)));
+                renderTextControl->setSelectionEnd(qMax(a.start, (a.start + a.length)));
             }
             break;
         }