[text] Switch TextFieldState from struct to table
Title says it all. We'd like this to be a table so that further upgrades to this state object are easier. This change also adds an alternative version of TextFieldState to three Rust libraries, where the required fields on TextFieldState (document, selection, revision) are T instead of Option<T>. Into/TryInto is also implemented back and forth from the two types. You'll notice that this implementation is duplicated in three text_field_state.rs files, one for each project. I thought perhaps this was better, since if we make changes to the table, each of these three projects may want to upgrade to the new implementation separately? Whereas if they all pulled text_field_state.rs from some common location, we'd have to upgrade them all at once. Change-Id: Icbb67498615b35e39825278a5c25c3d62fe7b0a0
Showing
- garnet/bin/ui/ime/BUILD.gn 1 addition, 0 deletionsgarnet/bin/ui/ime/BUILD.gn
- garnet/bin/ui/ime/src/legacy_ime/handler.rs 1 addition, 1 deletiongarnet/bin/ui/ime/src/legacy_ime/handler.rs
- garnet/bin/ui/ime/src/legacy_ime/state.rs 7 additions, 6 deletionsgarnet/bin/ui/ime/src/legacy_ime/state.rs
- garnet/bin/ui/text/default-hardware-ime/BUILD.gn 1 addition, 0 deletionsgarnet/bin/ui/text/default-hardware-ime/BUILD.gn
- garnet/bin/ui/text/default-hardware-ime/src/main.rs 4 additions, 2 deletionsgarnet/bin/ui/text/default-hardware-ime/src/main.rs
- garnet/bin/ui/text/test_suite/BUILD.gn 1 addition, 0 deletionsgarnet/bin/ui/text/test_suite/BUILD.gn
- garnet/bin/ui/text/test_suite/src/main.rs 1 addition, 2 deletionsgarnet/bin/ui/text/test_suite/src/main.rs
- garnet/bin/ui/text/test_suite/src/test_helpers.rs 17 additions, 38 deletionsgarnet/bin/ui/text/test_suite/src/test_helpers.rs
- garnet/lib/ui/text/common/BUILD.gn 28 additions, 0 deletionsgarnet/lib/ui/text/common/BUILD.gn
- garnet/lib/ui/text/common/src/lib.rs 5 additions, 0 deletionsgarnet/lib/ui/text/common/src/lib.rs
- garnet/lib/ui/text/common/src/text_field_state.rs 105 additions, 0 deletionsgarnet/lib/ui/text/common/src/text_field_state.rs
- sdk/fidl/fuchsia.ui.text/text_field.fidl 11 additions, 11 deletionssdk/fidl/fuchsia.ui.text/text_field.fidl
Loading
Please register or sign in to comment