mirror of
https://github.com/servo/servo.git
synced 2025-07-18 21:03:45 +01:00
script: Update name validation for attribute, element, and doctype (#37747)
A recent update in the spec (https://github.com/whatwg/dom/pull/1079) introduced new rules for name validation of attribute, element, and doctype. This PR implements the new name validation rules in `components/script/dom/bindings/domname.rs`. The old XML name validation rules are not fully removed because there remains a few usage of it in `ProcessingInstructions` and `xpath`. Testing: Covered by WPT tests Fixes: #37746 --------- Signed-off-by: minghuaw <michael.wu1107@gmail.com> Signed-off-by: Minghua Wu <michael.wu1107@gmail.com> Co-authored-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
This commit is contained in:
parent
e14556959d
commit
5b507dc871
17 changed files with 380 additions and 872 deletions
|
@ -11,12 +11,12 @@ use style::str::split_html_space_chars;
|
|||
use stylo_atoms::Atom;
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
|
||||
use crate::dom::bindings::domname::namespace_from_domstring;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::bindings::trace::JSTraceable;
|
||||
use crate::dom::bindings::xmlname::namespace_from_domstring;
|
||||
use crate::dom::element::Element;
|
||||
use crate::dom::node::{Node, NodeTraits};
|
||||
use crate::dom::window::Window;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue