mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Rearrange directionality algorithm functions
This commit is contained in:
parent
cb34e5c887
commit
7d6d1c09cb
9 changed files with 141 additions and 95 deletions
|
@ -174,12 +174,9 @@ impl HTMLTextAreaElement {
|
|||
)
|
||||
}
|
||||
|
||||
pub fn directionality(&self, element_direction: &str) -> String {
|
||||
if element_direction == "auto" {
|
||||
let value: String = self.Value().to_string();
|
||||
return HTMLInputElement::auto_directionality(&value);
|
||||
}
|
||||
return "ltr".to_owned();
|
||||
pub fn auto_directionality(&self) -> String {
|
||||
let value: String = self.Value().to_string();
|
||||
return HTMLInputElement::directionality_from_value(&value);
|
||||
}
|
||||
|
||||
fn update_placeholder_shown_state(&self) {
|
||||
|
@ -214,6 +211,12 @@ impl HTMLTextAreaElementMethods for HTMLTextAreaElement {
|
|||
// https://html.spec.whatwg.org/multipage/#dom-textarea-cols
|
||||
make_limited_uint_setter!(SetCols, "cols", DEFAULT_COLS);
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-input-dirName
|
||||
make_getter!(DirName, "dirname");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-input-dirName
|
||||
make_setter!(SetDirName, "dirname");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-fe-disabled
|
||||
make_bool_getter!(Disabled, "disabled");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue