-
Notifications
You must be signed in to change notification settings - Fork 6k
[Windows] Begin decoupling text input plugin from the view #47833
[Windows] Begin decoupling text input plugin from the view #47833
Conversation
c4b9fcd
to
993ce4d
Compare
@@ -85,7 +104,7 @@ class TextInputPlugin { | |||
// as TextEditingDeltas or as one TextEditingValue. | |||
// For more information on the delta model, see: | |||
// https://master-api.flutter.dev/flutter/services/TextInputConfiguration/enableDeltaModel.html | |||
bool enable_delta_model; | |||
bool enable_delta_model = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lack of a deterministic default value caused optimized unit tests to send delta model messages unexpectedly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange - this should be default zero-initialized. Do we know in which specific situations there were problems?
fwiw even if only for readability as a declaration of intent, we should make this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alrighty then
Can we land this? Looks good to go. |
// | ||
// Triggered when the user commits the current composing text while using a | ||
// multi-step input method such as in CJK text input. Composing continues with | ||
// the next keypress. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uber-nit: it's not necessarily the user who explicitly performs a commit -- in Korean, for example, just typing the next character is enough to trigger a commit of the composing region. Maybe "Called when the user triggers a commit of the [...]" to be very slightly more accurate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the additional info, I'm not very familiar with this area. Updated! :)
// Called on an IME compose end event. | ||
// | ||
// Triggered when the user commits the composing text while using a multi-step | ||
// input method such as in CJK text input. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case called when composing ends, which is often preceded by a commit, but if they press ESC, for example, won't be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated this!
MockFlutterWindowsView* view() { return view_.get(); } | ||
MockWindowBindingHandler* window() { return window_; } | ||
|
||
void use_headless_engine() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style (here and the next one): Use UpperCamelCase
for methods. For simple accessors and mutators, you can use the same naming as variables (e.g., engine
and set_engine
).
Ref: https://google.github.io/styleguide/cppguide.html#Function_Names
The ones above all look good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed this and the other areas where I stole this name from :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just a few small nits.
993ce4d
to
8a4aa88
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! Looks great!
Is this safe to land? |
Yes, landed! :) |
…139342) flutter/engine@74d2df5...c26e6ce 2023-12-01 matanlurey@users.noreply.github.com Roll a new version of googletest (2021->2023). (flutter/engine#48285) 2023-12-01 1961493+harryterkelsen@users.noreply.github.com [canvaskit] Add ImageFilter.compose (flutter/engine#48546) 2023-12-01 dnfield@google.com Avoid reloading the kernel snapshot when spawning an isolate in the same group (flutter/engine#48478) 2023-12-01 43054281+camsim99@users.noreply.github.com [Android] Check for text to paste before trying to retrieve data from URI (flutter/engine#48166) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 88a1bcb9e43e to 0a90c366ff87 (3 revisions) (flutter/engine#48549) 2023-11-30 skia-flutter-autoroll@skia.org Manual roll Dart SDK to 3.3.0-174.2.beta (4 revisions) (flutter/engine#48538) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from db3399a541f3 to 88a1bcb9e43e (1 revision) (flutter/engine#48545) 2023-11-30 737941+loic-sharma@users.noreply.github.com [Windows] Begin decoupling text input plugin from the view (flutter/engine#47833) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 2d236de89898 to db3399a541f3 (3 revisions) (flutter/engine#48543) 2023-11-30 flar@google.com [Impeller] Add direct tesselation of circles for DrawCircle and Round end caps (flutter/engine#48103) 2023-11-30 1961493+harryterkelsen@users.noreply.github.com [canvaskit] Revert to `drawImage` rendering on Chrome 110 or earlier (flutter/engine#48515) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 6b4bdebaab88 to 2d236de89898 (1 revision) (flutter/engine#48537) 2023-11-30 30870216+gaaclarke@users.noreply.github.com [Impeller] Started expanding the blur clip region (flutter/engine#48535) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 0e479728cc1f to 6b4bdebaab88 (1 revision) (flutter/engine#48536) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 0968fe18ff75 to 0e479728cc1f (1 revision) (flutter/engine#48534) 2023-11-30 103135467+sealesj@users.noreply.github.com Use Chromium mirror for archive dependency (flutter/engine#48509) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 2f01d500a352 to 0968fe18ff75 (2 revisions) (flutter/engine#48531) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 11a15444a3aa to 2f01d500a352 (1 revision) (flutter/engine#48524) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 84fdd36b1eea to 11a15444a3aa (1 revision) (flutter/engine#48523) 2023-11-30 leroux_bruno@yahoo.fr [Android] Add support for the PlatformChannel "Share.invoke" command (flutter/engine#48265) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 5d64b1322879 to 84fdd36b1eea (1 revision) (flutter/engine#48521) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 23721750e433 to 5d64b1322879 (1 revision) (flutter/engine#48520) 2023-11-30 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 8wu5EgBh1yJPNOd5W... to Bb2k375udWIltCEAx... (flutter/engine#48519) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 5a635f2211ce to 23721750e433 (1 revision) (flutter/engine#48514) 2023-11-29 skia-flutter-autoroll@skia.org Roll Skia from 928e8950e8e3 to 5a635f2211ce (1 revision) (flutter/engine#48511) 2023-11-29 mdebbar@google.com [web] No implicit view in multi-view mode (flutter/engine#48505) Also rolling transitive DEPS: fuchsia/sdk/core/linux-amd64 from 8wu5EgBh1yJP to Bb2k375udWIl If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC matanl@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#139342) flutter/engine@74d2df5...c26e6ce 2023-12-01 matanlurey@users.noreply.github.com Roll a new version of googletest (2021->2023). (flutter/engine#48285) 2023-12-01 1961493+harryterkelsen@users.noreply.github.com [canvaskit] Add ImageFilter.compose (flutter/engine#48546) 2023-12-01 dnfield@google.com Avoid reloading the kernel snapshot when spawning an isolate in the same group (flutter/engine#48478) 2023-12-01 43054281+camsim99@users.noreply.github.com [Android] Check for text to paste before trying to retrieve data from URI (flutter/engine#48166) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 88a1bcb9e43e to 0a90c366ff87 (3 revisions) (flutter/engine#48549) 2023-11-30 skia-flutter-autoroll@skia.org Manual roll Dart SDK to 3.3.0-174.2.beta (4 revisions) (flutter/engine#48538) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from db3399a541f3 to 88a1bcb9e43e (1 revision) (flutter/engine#48545) 2023-11-30 737941+loic-sharma@users.noreply.github.com [Windows] Begin decoupling text input plugin from the view (flutter/engine#47833) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 2d236de89898 to db3399a541f3 (3 revisions) (flutter/engine#48543) 2023-11-30 flar@google.com [Impeller] Add direct tesselation of circles for DrawCircle and Round end caps (flutter/engine#48103) 2023-11-30 1961493+harryterkelsen@users.noreply.github.com [canvaskit] Revert to `drawImage` rendering on Chrome 110 or earlier (flutter/engine#48515) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 6b4bdebaab88 to 2d236de89898 (1 revision) (flutter/engine#48537) 2023-11-30 30870216+gaaclarke@users.noreply.github.com [Impeller] Started expanding the blur clip region (flutter/engine#48535) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 0e479728cc1f to 6b4bdebaab88 (1 revision) (flutter/engine#48536) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 0968fe18ff75 to 0e479728cc1f (1 revision) (flutter/engine#48534) 2023-11-30 103135467+sealesj@users.noreply.github.com Use Chromium mirror for archive dependency (flutter/engine#48509) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 2f01d500a352 to 0968fe18ff75 (2 revisions) (flutter/engine#48531) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 11a15444a3aa to 2f01d500a352 (1 revision) (flutter/engine#48524) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 84fdd36b1eea to 11a15444a3aa (1 revision) (flutter/engine#48523) 2023-11-30 leroux_bruno@yahoo.fr [Android] Add support for the PlatformChannel "Share.invoke" command (flutter/engine#48265) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 5d64b1322879 to 84fdd36b1eea (1 revision) (flutter/engine#48521) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 23721750e433 to 5d64b1322879 (1 revision) (flutter/engine#48520) 2023-11-30 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 8wu5EgBh1yJPNOd5W... to Bb2k375udWIltCEAx... (flutter/engine#48519) 2023-11-30 skia-flutter-autoroll@skia.org Roll Skia from 5a635f2211ce to 23721750e433 (1 revision) (flutter/engine#48514) 2023-11-29 skia-flutter-autoroll@skia.org Roll Skia from 928e8950e8e3 to 5a635f2211ce (1 revision) (flutter/engine#48511) 2023-11-29 mdebbar@google.com [web] No implicit view in multi-view mode (flutter/engine#48505) Also rolling transitive DEPS: fuchsia/sdk/core/linux-amd64 from 8wu5EgBh1yJP to Bb2k375udWIl If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC matanl@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Currently the text input plugin is strongly tied to a single view. This change makes the text input plugin tied to the engine in preparation for multi-view world.
Part of flutter/flutter#115611
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.