add iframe support

This commit is contained in:
Tim Kuehn 2013-08-08 12:43:11 -07:00
parent 93368a2bf3
commit bd5526de94
8 changed files with 59 additions and 47 deletions

View file

@ -7,26 +7,28 @@ use dom::document::AbstractDocument;
use dom::htmlelement::HTMLElement;
use dom::windowproxy::WindowProxy;
use geom::size::Size2D;
use geom::rect::Rect;
use servo_msg::constellation_msg::SubpageId;
use servo_msg::constellation_msg::{ConstellationChan, FrameRectMsg, PipelineId, SubpageId};
use std::comm::ChanOne;
use extra::url::Url;
use std::util::replace;
pub struct HTMLIFrameElement {
parent: HTMLElement,
frame: Option<Url>,
size: Option<IframeSize>,
size: Option<IFrameSize>,
}
struct IframeSize {
struct IFrameSize {
pipeline_id: PipelineId,
subpage_id: SubpageId,
future_chan: Option<ChanOne<Size2D<uint>>>,
constellation_chan: ConstellationChan,
}
impl IframeSize {
impl IFrameSize {
pub fn set_rect(&mut self, rect: Rect<f32>) {
let future_chan = replace(&mut self.future_chan, None);
do future_chan.map_consume |future_chan| {