Summary: | [Qt] Transform QtFallbackWebPopupCombo into QtWebComboBox | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Caio Marcelo de Oliveira Filho <cmarcelo> | ||||
Component: | WebKit Qt | Assignee: | Caio Marcelo de Oliveira Filho <cmarcelo> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | benjamin, igor.oliveira, menard | ||||
Priority: | P2 | Keywords: | Qt, QtTriaged | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 62191 | ||||||
Attachments: |
|
Description
Caio Marcelo de Oliveira Filho
2011-08-31 17:08:30 PDT
Created attachment 105868 [details]
Patch
Comment on attachment 105868 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=105868&action=review > Source/WebKit/qt/WebCoreSupport/QtWebComboBox.cpp:64 > + // This workaround was added in r40970 to address a problem in Qt. I _think_ this problem > + // was solved in commit 3ab68cbf5436e3e66d0297b01af661bedecb8766 of Qt4 repository. > +#ifndef QT_NO_IM > + QWidget* activeFocus = QApplication::focusWidget(); > + if (activeFocus && activeFocus == QComboBox::view() > + && activeFocus->testAttribute(Qt::WA_InputMethodEnabled)) { > + QInputContext* qic = activeFocus->inputContext(); > + if (qic) { > + qic->reset(); > + qic->setFocusWidget(0); > + } > + } > +#endif // QT_NO_IM I would just remove this, it is broken anyway and might bite us. It is quite dangeous resetting the input context behind our backs as it can easily get out of sync, for instance if I have a composition, then this would reset that from the internal state of the input context and it will get our of sync with webcore Comment on attachment 105868 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=105868&action=review Beautiful refactor! r=me > Source/WebKit/qt/ChangeLog:11 > + signal) and a convenience to show its popup in the cursor position. convenience method* >> Source/WebKit/qt/WebCoreSupport/QtWebComboBox.cpp:64 >> +#endif // QT_NO_IM > > I would just remove this, it is broken anyway and might bite us. It is quite dangeous resetting the input context behind our backs as it can easily get out of sync, for instance if I have a composition, then this would reset that from the internal state of the input context and it will get our of sync with webcore Agreed. > Source/WebKit/qt/WebCoreSupport/QtWebComboBox.h:37 > + void showPopupInCursorPosition(); Would sound slightly better as showPopupAtCursorPosition(). Committed r94321: <http://trac.webkit.org/changeset/94321> |