diff options
author | Anthony Ramine <nox@nox.paris> | 2020-03-31 14:40:47 +0200 |
---|---|---|
committer | Anthony Ramine <nox@nox.paris> | 2020-03-31 14:57:44 +0200 |
commit | 409bd3d989c1877f8e0a5da92bd758dd20ac724b (patch) | |
tree | 58e1abbd61f6059161ca18a99bd059d18cacee8a /components/script/dom/node.rs | |
parent | 00c5ec202ccde20eace5c867578262efa5b69844 (diff) | |
download | servo-409bd3d989c1877f8e0a5da92bd758dd20ac724b.tar.gz servo-409bd3d989c1877f8e0a5da92bd758dd20ac724b.zip |
Make LayoutCharacterDataHelpers::data_for_layout be safe
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r-- | components/script/dom/node.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index 425e29d45f3..07b7d60cbe6 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -1456,10 +1456,9 @@ impl<'dom> LayoutNodeHelpers<'dom> for LayoutDom<'dom, Node> { val } - #[allow(unsafe_code)] fn text_content(self) -> String { if let Some(text) = self.downcast::<Text>() { - return unsafe { text.upcast().data_for_layout().to_owned() }; + return text.upcast().data_for_layout().to_owned(); } if let Some(input) = self.downcast::<HTMLInputElement>() { |