Make LayoutHTMLInputElementHelpers::value_for_layout return a cow

This commit is contained in:
Anthony Ramine 2020-03-31 14:30:18 +02:00
parent 3e875ce3eb
commit e1e913d33c
2 changed files with 31 additions and 26 deletions

View file

@ -1463,7 +1463,7 @@ impl<'dom> LayoutNodeHelpers<'dom> for LayoutDom<'dom, Node> {
}
if let Some(input) = self.downcast::<HTMLInputElement>() {
return unsafe { input.value_for_layout() };
return input.value_for_layout().into_owned();
}
if let Some(area) = self.downcast::<HTMLTextAreaElement>() {