Add NodeHelpers::get_bounding_content_box().

This commit is contained in:
Tetsuharu OHZEKI 2014-04-23 02:33:37 +09:00
parent 5e27f49fe2
commit dce92dc44a
4 changed files with 23 additions and 26 deletions

View file

@ -20,7 +20,7 @@ use dom::htmlcollection::HTMLCollection;
use dom::htmlserializer::serialize;
use dom::node::{ElementNodeTypeId, Node, NodeHelpers, NodeIterator, document_from_node};
use dom::virtualmethods::{VirtualMethods, vtable_for};
use layout_interface::{ContentBoxQuery, ContentBoxResponse, ContentBoxesQuery};
use layout_interface::{ContentBoxesQuery};
use layout_interface::{ContentBoxesResponse, ContentChangedDocumentDamage};
use layout_interface::MatchSelectorsDocumentDamage;
use style;
@ -625,9 +625,7 @@ impl Element {
let doc = self.node.owner_doc();
let win = &doc.get().window;
let node: JS<Node> = NodeCast::from(abstract_self);
let (chan, port) = channel();
let addr = node.to_trusted_node_address();
let ContentBoxResponse(rect) = win.get().page().query_layout(ContentBoxQuery(addr, chan), port);
let rect = node.get_bounding_content_box();
ClientRect::new(
win,
rect.origin.y,