mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
add SVGElement, SVGGraphicsElement interfaces and SVGSVGElement element
This commit is contained in:
parent
318b23ed00
commit
9876020c22
13 changed files with 355 additions and 13 deletions
|
@ -95,6 +95,7 @@ pub enum LayoutElementType {
|
|||
HTMLTableRowElement,
|
||||
HTMLTableSectionElement,
|
||||
HTMLTextAreaElement,
|
||||
SVGSVGElement,
|
||||
}
|
||||
|
||||
pub struct HTMLCanvasData {
|
||||
|
@ -103,6 +104,11 @@ pub struct HTMLCanvasData {
|
|||
pub height: u32,
|
||||
}
|
||||
|
||||
pub struct SVGSVGData {
|
||||
pub width: u32,
|
||||
pub height: u32,
|
||||
}
|
||||
|
||||
/// The address of a node known to be valid. These are sent from script to layout.
|
||||
#[derive(Clone, PartialEq, Eq, Copy)]
|
||||
pub struct TrustedNodeAddress(pub *const c_void);
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
use HTMLCanvasData;
|
||||
use LayoutNodeType;
|
||||
use OpaqueStyleAndLayoutData;
|
||||
use SVGSVGData;
|
||||
use gfx_traits::{ByteIndex, LayerId, LayerType};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use range::Range;
|
||||
|
@ -362,6 +363,8 @@ pub trait ThreadSafeLayoutNode: Clone + Copy + NodeInfo + PartialEq + Sized {
|
|||
|
||||
fn canvas_data(&self) -> Option<HTMLCanvasData>;
|
||||
|
||||
fn svg_data(&self) -> Option<SVGSVGData>;
|
||||
|
||||
/// If this node is an iframe element, returns its pipeline ID. If this node is
|
||||
/// not an iframe element, fails.
|
||||
fn iframe_pipeline_id(&self) -> PipelineId;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue