mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Add NodeHelpers::get_bounding_content_box().
This commit is contained in:
parent
5e27f49fe2
commit
dce92dc44a
4 changed files with 23 additions and 26 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue