Summary: | [Qt] QWebPage::inputMethodQuery() returns wrong values for Qt::ImCursorPosition, Qt::ImAnchorPosition | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | rajiv.ramanasankaran | ||||
Component: | WebKit Qt | Assignee: | rajiv.ramanasankaran | ||||
Status: | CLOSED FIXED | ||||||
Severity: | Normal | CC: | commit-queue, hausmann, jesus, laszlo.gombos, rajiv.ramanasankaran, robert | ||||
Priority: | P2 | Keywords: | Qt, QtTriaged | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 35784 | ||||||
Attachments: |
|
Description
rajiv.ramanasankaran
2010-05-07 15:55:37 PDT
I am working on a patch for submission. (In reply to comment #1) > I am working on a patch for submission. Please consider adding an auto-test to it. (In reply to comment #2) > (In reply to comment #1) > > I am working on a patch for submission. > Please consider adding an auto-test to it. Thanks! Just to clarify: I am working on a patch (including the fix and auto-tests) for submission. Created attachment 56206 [details]
Prosposed patch to fix the return values for Qt::ImCursorPosition and Qt::ImAnchorPosition in QWebPage::inputMethodQuery() when the Editor doesn't have a composition.
The patch fixes the issue of incorrect values been returned for Qt::ImCursorPosition and Qt::ImAnchorPosition in QWebPage::inputMethodQuery() when the Editor doesn't have a composition.
So is it not solvable when in Composition mode? Or not relevant? (Not a loaded question, genuinely don't know.) (In reply to comment #5) > So is it not solvable when in Composition mode? Or not relevant? (Not a loaded question, genuinely don't know.) Sorry I wasn't specific. The values seem to be correct in Composition mode. I don't think there is a bug in that case. (In reply to comment #6) > (In reply to comment #5) > > So is it not solvable when in Composition mode? Or not relevant? (Not a loaded question, genuinely don't know.) > > Sorry I wasn't specific. The values seem to be correct in Composition mode. I don't think there is a bug in that case. Funny, tst_qwebpage has: //Set selection with negative length inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 6, -5, QVariant()); QInputMethodEvent eventSelection3("",inputAttributes); page->event(&eventSelection3); //ImAnchorPosition variant = page->inputMethodQuery(Qt::ImAnchorPosition); anchorPosition = variant.toInt(); QCOMPARE(anchorPosition, 1); //ImCursorPosition variant = page->inputMethodQuery(Qt::ImCursorPosition); cursorPosition = variant.toInt(); QCOMPARE(cursorPosition, 6); which would suggest the opposite to me, but I don't know too much about input methods. (In reply to comment #7) > (In reply to comment #6) > > (In reply to comment #5) > > > So is it not solvable when in Composition mode? Or not relevant? (Not a loaded question, genuinely don't know.) > > > > Sorry I wasn't specific. The values seem to be correct in Composition mode. I don't think there is a bug in that case. > Funny, tst_qwebpage has: > //Set selection with negative length > inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 6, -5, QVariant()); > QInputMethodEvent eventSelection3("",inputAttributes); > page->event(&eventSelection3); > //ImAnchorPosition > variant = page->inputMethodQuery(Qt::ImAnchorPosition); > anchorPosition = variant.toInt(); > QCOMPARE(anchorPosition, 1); > //ImCursorPosition > variant = page->inputMethodQuery(Qt::ImCursorPosition); > cursorPosition = variant.toInt(); > QCOMPARE(cursorPosition, 6); > which would suggest the opposite to me, but I don't know too much about input methods. This test case causes the Editor to go into composistion mode and therefore QWebPage::inputMethodQuery() returns the correct values. I don't know whether it is supposed to go into composition mode in this case or not (And that is the concern I raised in an email to you last week since this test case was part of your commit #58218). The test case I am fixing is when the editor is not in composition mode and is different than this. Comment on attachment 56206 [details]
Prosposed patch to fix the return values for Qt::ImCursorPosition and Qt::ImAnchorPosition in QWebPage::inputMethodQuery() when the Editor doesn't have a composition.
r=me
Comment on attachment 56206 [details] Prosposed patch to fix the return values for Qt::ImCursorPosition and Qt::ImAnchorPosition in QWebPage::inputMethodQuery() when the Editor doesn't have a composition. Clearing flags on attachment: 56206 Committed r59833: <http://trac.webkit.org/changeset/59833> All reviewed patches have been landed. Closing bug. Revision r59833 cherry-picked into qtwebkit-2.0 with commit cf6ec10122bf813a16705f55b29f522a78ce83de |