mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +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:
@@ -88,7 +88,7 @@ impl<'dom> LayoutDom<'dom, HTMLTextAreaElement> {
|
||||
}
|
||||
|
||||
fn placeholder(self) -> &'dom str {
|
||||
unsafe { self.unsafe_get().placeholder.borrow_for_layout() }
|
||||
unsafe { self.unsafe_get().placeholder.borrow_for_layout().str() }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -530,7 +530,7 @@ impl VirtualMethods for HTMLTextAreaElement {
|
||||
let mut placeholder = self.placeholder.borrow_mut();
|
||||
placeholder.clear();
|
||||
if let AttributeMutation::Set(_) = mutation {
|
||||
placeholder.push_str(&attr.value());
|
||||
placeholder.push_str(attr.value().as_ref());
|
||||
}
|
||||
}
|
||||
self.update_placeholder_shown_state();
|
||||
|
||||
Reference in New Issue
Block a user