[webkit-qt] Questions about Qt input method support in WebKit 2

Konstantin Tokarev annulen at yandex.ru
Mon Sep 21 07:23:20 PDT 2015


Hi Kenneth,

I'm aware that you are not working on WebKit for a long time, however I'd like to ask you some questions about your code.

1. In patch [1] what was the motivation for not sending surroundingText in case of result.isInPasswordField? In this case code from patch [2] sets hints Qt::ImhHiddenText and Qt::ImhSensitiveData for text coming from password fields. May !result.isInPasswordField check in [1] be safely removed now?

2. I've found that Element::innerText() used to obtain surroundingText in [1] always returns empty string at least for HTMLTextFormControlElement descendants (<input> and <textarea>). I've fixed it in patch [3], however I've left fallback to innerText for other kinds of elements. Are there any other kinds of editable elements where innerText() was known to work in past?

3. Have you tried to support text removal in WebKit2 via QInputMethodEvent ? I've tried to support event constructed as

QInputMethodEvent event;
event.setCommitString("",-1,1);

in QtWebPageEventHandler::handleInputMethodEvent() [4] by calling m_webPageProxy->confirmComposition("", -1, 1), but that didn't work. For now I've surrendered to sending key events with Qt::Key_Backspace.


[1] https://bugs.webkit.org/show_bug.cgi?id=74080
[2] https://bugs.webkit.org/show_bug.cgi?id=76169
[3] https://codereview.qt-project.org/#/c/125970/
[4] http://trac.webkit.org/changeset/103233/trunk/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp

-- 
Regards,
Konstantin


More information about the webkit-qt mailing list