mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
html form validation initial steps with test html file, added stub methods, added code to handle validations
This commit is contained in:
parent
e4fcc066d1
commit
2a40877851
9 changed files with 124 additions and 15 deletions
13
components/script/dom/htmlobjectelement.rs
Normal file → Executable file
13
components/script/dom/htmlobjectelement.rs
Normal file → Executable file
|
@ -15,7 +15,7 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::htmlformelement::{FormControl, HTMLFormElement};
|
||||
use dom::node::{Node, window_from_node};
|
||||
use dom::validation::Validatable;
|
||||
use dom::validitystate::ValidityState;
|
||||
use dom::validitystate::{ValidityState, ValidationFlags};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use net_traits::image::base::Image;
|
||||
use std::sync::Arc;
|
||||
|
@ -89,7 +89,16 @@ impl HTMLObjectElementMethods for HTMLObjectElement {
|
|||
}
|
||||
}
|
||||
|
||||
impl Validatable for HTMLObjectElement {}
|
||||
impl Validatable for HTMLObjectElement {
|
||||
fn is_instance_validatable(&self) -> bool {
|
||||
true
|
||||
}
|
||||
fn validate(&self, validate_flags: ValidationFlags) -> bool {
|
||||
if validate_flags.is_empty() {}
|
||||
// Need more flag check for different validation types later
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
impl VirtualMethods for HTMLObjectElement {
|
||||
fn super_type(&self) -> Option<&VirtualMethods> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue