mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Move the definition of ServoThreadSafeLayoutNode::image_url to script.
This commit is contained in:
parent
093b7b7710
commit
ef3c6a7773
2 changed files with 14 additions and 6 deletions
|
@ -48,7 +48,6 @@ use script::dom::document::{Document, LayoutDocumentHelpers};
|
|||
use script::dom::element::{Element, LayoutElementHelpers, RawLayoutElementHelpers};
|
||||
use script::dom::htmlcanvaselement::{LayoutHTMLCanvasElementHelpers, HTMLCanvasData};
|
||||
use script::dom::htmliframeelement::HTMLIFrameElement;
|
||||
use script::dom::htmlimageelement::LayoutHTMLImageElementHelpers;
|
||||
use script::dom::node::{CAN_BE_FRAGMENTED, HAS_CHANGED, HAS_DIRTY_DESCENDANTS, IS_DIRTY};
|
||||
use script::dom::node::{LayoutNodeHelpers, Node, OpaqueStyleAndLayoutData};
|
||||
use script::dom::text::Text;
|
||||
|
@ -1147,11 +1146,8 @@ impl<'ln> ThreadSafeLayoutNode for ServoThreadSafeLayoutNode<'ln> {
|
|||
}
|
||||
|
||||
fn image_url(&self) -> Option<Url> {
|
||||
unsafe {
|
||||
self.get_jsmanaged().downcast()
|
||||
.expect("not an image!")
|
||||
.image_url()
|
||||
}
|
||||
let this = unsafe { self.get_jsmanaged() };
|
||||
this.image_url()
|
||||
}
|
||||
|
||||
fn canvas_data(&self) -> Option<HTMLCanvasData> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue