mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
script: Simplify TextInput::new (#41975)
This constructors takes more arguments than it needs to. The three arguments removed are almost always the default values. The exception is in the unit tests. In this change those calls are modified to use `set_max_length` like is done in the actual script code. Testing: This is just a simplification of the code, so should be covered by existing tests. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
@@ -49,9 +49,7 @@ use crate::dom::validation::{Validatable, is_barred_by_datalist_ancestor};
|
||||
use crate::dom::validitystate::{ValidationFlags, ValidityState};
|
||||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use crate::script_runtime::CanGc;
|
||||
use crate::textinput::{
|
||||
ClipboardEventFlags, IsComposing, KeyReaction, Lines, SelectionDirection, TextInput,
|
||||
};
|
||||
use crate::textinput::{ClipboardEventFlags, IsComposing, KeyReaction, Lines, TextInput};
|
||||
|
||||
#[dom_struct]
|
||||
pub(crate) struct HTMLTextAreaElement {
|
||||
@@ -145,9 +143,6 @@ impl HTMLTextAreaElement {
|
||||
embedder_sender,
|
||||
webview_id: document.webview_id(),
|
||||
},
|
||||
None,
|
||||
None,
|
||||
SelectionDirection::None,
|
||||
)),
|
||||
value_dirty: Cell::new(false),
|
||||
form_owner: Default::default(),
|
||||
|
||||
Reference in New Issue
Block a user