feat: support pre-edit text display for IME (#35535)

* feat: support pre-edit text display for IME

Signed-off-by: DK Liao <dklassic@gmail.com>

* enable ime by show_ime

Signed-off-by: DK Liao <dklassic@gmail.com>

---------

Signed-off-by: DK Liao <dklassic@gmail.com>
This commit is contained in:
DK Liao 2025-02-19 20:22:57 +09:00 committed by GitHub
parent 42e873e9d9
commit 720bc725b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 91 additions and 4 deletions

View file

@ -527,6 +527,22 @@ impl WebViewDelegate for RunningAppState {
};
let _ = haptic_stop_sender.send(stopped);
}
fn show_ime(
&self,
_webview: WebView,
input_type: servo::InputMethodType,
text: Option<(String, i32)>,
multiline: bool,
position: servo::webrender_api::units::DeviceIntRect,
) {
self.inner()
.window
.show_ime(input_type, text, multiline, position);
}
fn hide_ime(&self, _webview: WebView) {
self.inner().window.hide_ime();
}
}
#[cfg(target_os = "linux")]