mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Implement dirname for form submit and directionality for element
This commit is contained in:
parent
6bc4a7df24
commit
ef49f2e0eb
14 changed files with 178 additions and 19 deletions
|
@ -22,6 +22,7 @@ use crate::dom::globalscope::GlobalScope;
|
|||
use crate::dom::htmlelement::HTMLElement;
|
||||
use crate::dom::htmlfieldsetelement::HTMLFieldSetElement;
|
||||
use crate::dom::htmlformelement::{FormControl, HTMLFormElement};
|
||||
use crate::dom::htmlinputelement::HTMLInputElement;
|
||||
use crate::dom::keyboardevent::KeyboardEvent;
|
||||
use crate::dom::node::{document_from_node, window_from_node};
|
||||
use crate::dom::node::{
|
||||
|
@ -173,6 +174,14 @@ 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();
|
||||
}
|
||||
|
||||
fn update_placeholder_shown_state(&self) {
|
||||
let has_placeholder = !self.placeholder.borrow().is_empty();
|
||||
let has_value = !self.textinput.borrow().is_empty();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue