mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
dom: Textual Input UA Shadow Dom (#37527)
Depend on: - https://github.com/servo/servo/pull/37427 - https://github.com/servo/servo/pull/37483 Utilize input `type=text` for the display of all textual input. In which, consist of https://html.spec.whatwg.org/#the-input-element-as-a-text-entry-widget and https://html.spec.whatwg.org/#the-input-element-as-domain-specific-widgets inputs. For `password`, `url`, `tel`, and, `email` input, the appearance of input container is exactly the same as the `text` input. Other types of textual input simply extends `text` input by adding extra components inside the container. Testing: Servo textual input appearance WPT. --------- Signed-off-by: stevennovaryo <steven.novaryo@gmail.com> Signed-off-by: Jo Steven Novaryo <jo.steven.novaryo@huawei.com>
This commit is contained in:
parent
1d896699a4
commit
6cd8578f8b
36 changed files with 546 additions and 279 deletions
|
@ -902,7 +902,6 @@ impl<T: ClipboardProvider> TextInput<T> {
|
|||
KeyReaction::RedrawSelection
|
||||
})
|
||||
.shortcut(CMD_OR_CONTROL, 'X', || {
|
||||
// FIXME: this is unreachable because ClipboardEvent is fired instead of keydown
|
||||
if let Some(text) = self.get_selection_text() {
|
||||
self.clipboard_provider.set_text(text);
|
||||
self.delete_char(Direction::Backward);
|
||||
|
@ -910,6 +909,7 @@ impl<T: ClipboardProvider> TextInput<T> {
|
|||
KeyReaction::DispatchInput
|
||||
})
|
||||
.shortcut(CMD_OR_CONTROL, 'C', || {
|
||||
// TODO(stevennovaryo): we should not provide text to clipboard for type=password
|
||||
if let Some(text) = self.get_selection_text() {
|
||||
self.clipboard_provider.set_text(text);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue