diff options
author | Tetsuharu OHZEKI <saneyuki.snyk@gmail.com> | 2014-03-09 00:14:14 +0900 |
---|---|---|
committer | Tetsuharu OHZEKI <saneyuki.snyk@gmail.com> | 2014-03-20 23:41:59 +0900 |
commit | 0fccf5e386d2a7d98dfcbaf5b4871fd7d93e887d (patch) | |
tree | 25727b6e1595392fa6ea6b8e8e7eda70e4b8a662 /src/components/script/html/hubbub_html_parser.rs | |
parent | 19a7c429a1eea7b80cefb4b72138fafecc9b924a (diff) | |
download | servo-0fccf5e386d2a7d98dfcbaf5b4871fd7d93e887d.tar.gz servo-0fccf5e386d2a7d98dfcbaf5b4871fd7d93e887d.zip |
Split TCast::to into TCast::to_unchecked and TCast::to.
Diffstat (limited to 'src/components/script/html/hubbub_html_parser.rs')
-rw-r--r-- | src/components/script/html/hubbub_html_parser.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/script/html/hubbub_html_parser.rs b/src/components/script/html/hubbub_html_parser.rs index 34cbd08a59b..1d07c4228d4 100644 --- a/src/components/script/html/hubbub_html_parser.rs +++ b/src/components/script/html/hubbub_html_parser.rs @@ -369,7 +369,7 @@ pub fn parse_html(page: &Page, ElementNodeTypeId(HTMLIFrameElementTypeId) => { let iframe_chan = discovery_chan.clone(); let mut iframe_element: JS<HTMLIFrameElement> = - HTMLIFrameElementCast::to(&element); + HTMLIFrameElementCast::to(&element).unwrap(); let sandboxed = iframe_element.get().is_sandboxed(); let elem: JS<Element> = ElementCast::from(&iframe_element); let src_opt = elem.get().get_attribute(Null, "src").map(|x| x.get().Value()); @@ -475,7 +475,7 @@ pub fn parse_html(page: &Page, debug!("iterating over children {:?}", scriptnode.first_child()); for child in scriptnode.children() { debug!("child = {:?}", child); - let text: JS<Text> = TextCast::to(&child); + let text: JS<Text> = TextCast::to(&child).unwrap(); data.push(text.get().characterdata.data.to_str()); // FIXME: Bad copy. } @@ -494,7 +494,7 @@ pub fn parse_html(page: &Page, debug!("iterating over children {:?}", style.first_child()); for child in style.children() { debug!("child = {:?}", child); - let text: JS<Text> = TextCast::to(&child); + let text: JS<Text> = TextCast::to(&child).unwrap(); data.push(text.get().characterdata.data.to_str()); // FIXME: Bad copy. } |