mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Replace many uses of to_ascii_lowercase() by make_ascii_lowercase()
This commit is contained in:
parent
67cbda4be3
commit
105d990845
7 changed files with 32 additions and 23 deletions
|
@ -1243,7 +1243,7 @@ impl DocumentMethods for Document {
|
|||
return Err(InvalidCharacter);
|
||||
}
|
||||
if self.is_html_document {
|
||||
local_name = local_name.to_ascii_lowercase()
|
||||
local_name.make_ascii_lowercase();
|
||||
}
|
||||
let name = QualName::new(ns!(HTML), Atom::from_slice(&local_name));
|
||||
Ok(Element::create(name, None, self, ElementCreator::ScriptCreated))
|
||||
|
@ -1350,10 +1350,11 @@ impl DocumentMethods for Document {
|
|||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-document-createevent
|
||||
fn CreateEvent(&self, interface: DOMString) -> Fallible<Root<Event>> {
|
||||
fn CreateEvent(&self, mut interface: DOMString) -> Fallible<Root<Event>> {
|
||||
let window = self.window.root();
|
||||
|
||||
match &*interface.to_ascii_lowercase() {
|
||||
interface.make_ascii_lowercase();
|
||||
match &*interface {
|
||||
"uievents" | "uievent" => Ok(EventCast::from_root(
|
||||
UIEvent::new_uninitialized(window.r()))),
|
||||
"mouseevents" | "mouseevent" => Ok(EventCast::from_root(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue