aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/components/script/dom/htmlimageelement.rs2
-rw-r--r--src/components/script/html/hubbub_html_parser.rs13
-rw-r--r--src/components/script/script_task.rs1
3 files changed, 3 insertions, 13 deletions
diff --git a/src/components/script/dom/htmlimageelement.rs b/src/components/script/dom/htmlimageelement.rs
index d2304944eeb..a049d649763 100644
--- a/src/components/script/dom/htmlimageelement.rs
+++ b/src/components/script/dom/htmlimageelement.rs
@@ -66,7 +66,7 @@ impl HTMLImageElement {
impl HTMLImageElement {
/// Makes the local `image` member match the status of the `src` attribute and starts
/// prefetching the image. This method must be called after `src` is changed.
- pub fn update_image(&mut self, image_cache: ImageCacheTask, url: Option<Url>) {
+ fn update_image(&mut self, image_cache: ImageCacheTask, url: Option<Url>) {
let elem = &mut self.htmlelement.element;
let src_opt = elem.get_attribute(Null, "src").map(|x| x.get().Value());
match src_opt {
diff --git a/src/components/script/html/hubbub_html_parser.rs b/src/components/script/html/hubbub_html_parser.rs
index cf692d43dfd..26d1faacdbc 100644
--- a/src/components/script/html/hubbub_html_parser.rs
+++ b/src/components/script/html/hubbub_html_parser.rs
@@ -3,11 +3,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::InheritTypes::{NodeBase, NodeCast, TextCast, ElementCast};
-use dom::bindings::codegen::InheritTypes::{HTMLIFrameElementCast, HTMLImageElementCast};
+use dom::bindings::codegen::InheritTypes::HTMLIFrameElementCast;
use dom::bindings::js::JS;
use dom::bindings::utils::Reflectable;
use dom::document::Document;
-use dom::element::{HTMLLinkElementTypeId, HTMLIframeElementTypeId, HTMLImageElementTypeId};
+use dom::element::{HTMLLinkElementTypeId, HTMLIframeElementTypeId};
use dom::htmlelement::HTMLElement;
use dom::htmlheadingelement::{Heading1, Heading2, Heading3, Heading4, Heading5, Heading6};
use dom::htmliframeelement::IFrameSize;
@@ -21,7 +21,6 @@ use extra::url::Url;
use hubbub::hubbub;
use js::jsapi::JSContext;
use servo_msg::constellation_msg::SubpageId;
-use servo_net::image_cache_task::ImageCacheTask;
use servo_net::resource_task::{Load, Payload, Done, ResourceTask, load_whole_resource};
use servo_util::namespace::Null;
use servo_util::str::DOMString;
@@ -251,7 +250,6 @@ pub fn parse_html(cx: *JSContext,
document: &mut JS<Document>,
url: Url,
resource_task: ResourceTask,
- image_cache_task: ImageCacheTask,
next_subpage_id: SubpageId)
-> HtmlParserResult {
debug!("Hubbub: parsing {:?}", url);
@@ -382,13 +380,6 @@ pub fn parse_html(cx: *JSContext,
sandboxed)));
}
}
-
- //FIXME: This should be taken care of by set_attr, but we don't have
- // access to a window so HTMLImageElement::AfterSetAttr bails.
- ElementNodeTypeId(HTMLImageElementTypeId) => {
- let mut image_element: JS<HTMLImageElement> = HTMLImageElementCast::to(&element);
- image_element.get_mut().update_image(image_cache_task.clone(), Some(url2.clone()));
- }
_ => {}
}
diff --git a/src/components/script/script_task.rs b/src/components/script/script_task.rs
index a9a284ad21f..01539dcd128 100644
--- a/src/components/script/script_task.rs
+++ b/src/components/script/script_task.rs
@@ -722,7 +722,6 @@ impl ScriptTask {
&mut document,
url.clone(),
self.resource_task.clone(),
- self.image_cache_task.clone(),
page.next_subpage_id.clone());
let HtmlParserResult {