mirror of
https://github.com/servo/servo
synced 2026-05-01 20:07:22 +02:00
Script: Change script/dom/{bluetooth,canvas,html} to not rely on Deref<str> for DOMString (#39480)
This is part of the future work of implementing LazyDOMString as outlined in https://github.com/servo/servo/issues/39479. We use str() method or direct implementations on DOMString for these methods. We also change some types. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com> Testing: This is essentially just renaming a method and a type and should not change functionality. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
@@ -215,13 +215,13 @@ impl HTMLOptionElementMethods<crate::DomTypeHolder> for HTMLOptionElement {
|
||||
|
||||
if node.is::<Text>() {
|
||||
let characterdata = node.downcast::<CharacterData>().unwrap();
|
||||
content.push_str(&characterdata.Data());
|
||||
content.push_str(characterdata.Data().str());
|
||||
}
|
||||
|
||||
iterator.next();
|
||||
}
|
||||
|
||||
DOMString::from(str_join(split_html_space_chars(&content), " "))
|
||||
DOMString::from(str_join(split_html_space_chars(content.str()), " "))
|
||||
}
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage/#dom-option-text>
|
||||
|
||||
Reference in New Issue
Block a user