mirror of
https://github.com/servo/servo.git
synced 2025-06-18 22:34:30 +01:00
add iframe support
This commit is contained in:
parent
93368a2bf3
commit
bd5526de94
8 changed files with 59 additions and 47 deletions
|
@ -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| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue