Conversation
6fcc8d0 to
c8ba51d
Compare
9df257c to
5da78e5
Compare
| handler.ComposeChangeHook(textChineseCharacter, 1); | ||
| handler.ComposeCommitHook(); | ||
| handler.ComposeEndHook(); | ||
|
|
There was a problem hiding this comment.
It would be nice if I could verify the deltas that are generated here, but I wasn't able to do it by mocking TextInputClient, and I also couldn't figure out if it's possible to listen to the message sent to the framework by SendStateUpdateWithDeltas. If anyone knows of a way, let me know.
| } | ||
| } | ||
|
|
||
| void TextInputPlugin::ComposeChangeHook(const std::u16string& text, |
There was a problem hiding this comment.
@Renzo-Olivares I tried out the composing stuff by typing Chinese into the delta-text-editor-demo. The demo seemed to be broken in how it handled replacements, as in when a composing region gets replaced by a final character or characters. I updated it so it worked for most cases, but sometimes it would end up inserting black text that should have been colored. We should figure out what to do with that demo before our versions diverge too much.
|
Any idea how I can debug the test failure? It's the test that I wrote, but it doesn't fail locally, even if I randomize it like on CI... |
cbracken
left a comment
There was a problem hiding this comment.
One quick suggestion on the API end of things.
| } | ||
|
|
||
| void TextInputPlugin::SendStateUpdateWithDelta(const TextInputModel& model, | ||
| TextEditingDelta* delta) { |
There was a problem hiding this comment.
It looks like we can pass this by const reference.
There was a problem hiding this comment.
Finally got my Windows machine setup and was able to make this change and verify that it works 👍
|
This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold. |
| TextRange composing_before_change = active_model_->composing_range(); | ||
| std::string composing_text_before_change = text_before_change.substr( | ||
| composing_before_change.base(), | ||
| composing_before_change.extent() - composing_before_change.base()); |
There was a problem hiding this comment.
Use composing_before_change.start() and composing_before_change.length().
shell/platform/windows/BUILD.gn
Outdated
| defines = [ "FLUTTER_ENGINE_NO_PROTOTYPES" ] | ||
| defines = [ | ||
| "FLUTTER_ENGINE_NO_PROTOTYPES", | ||
| "_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING", |
There was a problem hiding this comment.
For these two plus the one below: I think you should be safe to remove these definitions now that all the encoding conversion stuff has moved to FML (I was able to remove it everywhere else).
This PR will bring TextEditingDeltas to Windows. See flutter/flutter#87972 (comment) for the status of all platforms.
Partial fix for flutter/flutter#87972