Implement client{Top, Left, Height, Width} element properties

This commit is contained in:
Till Schneidereit 2015-07-19 15:04:50 +02:00
parent acf47a02cf
commit 162ecd0aac
8 changed files with 214 additions and 1 deletions

View file

@ -504,6 +504,7 @@ pub trait NodeHelpers {
fn get_bounding_content_box(self) -> Rect<Au>;
fn get_content_boxes(self) -> Vec<Rect<Au>>;
fn get_client_rect(self) -> Rect<i32>;
fn before(self, nodes: Vec<NodeOrString>) -> ErrorResult;
fn after(self, nodes: Vec<NodeOrString>) -> ErrorResult;
@ -806,6 +807,10 @@ impl<'a> NodeHelpers for &'a Node {
window_from_node(self).r().content_boxes_query(self.to_trusted_node_address())
}
fn get_client_rect(self) -> Rect<i32> {
window_from_node(self).r().client_rect_query(self.to_trusted_node_address())
}
// https://dom.spec.whatwg.org/#dom-childnode-before
fn before(self, nodes: Vec<NodeOrString>) -> ErrorResult {
match self.parent_node.get() {