mirror of
https://github.com/servo/servo.git
synced 2025-08-02 12:10:29 +01:00
Make get_content_boxes return Vec.
This commit is contained in:
parent
20f649da71
commit
02bcf97fd0
3 changed files with 5 additions and 5 deletions
|
@ -754,7 +754,7 @@ impl LayoutTask {
|
|||
ContentBoxesQuery(node, reply_chan) => {
|
||||
let node: OpaqueNode = OpaqueNodeMethods::from_script_node(node);
|
||||
|
||||
fn add_boxes_for_node(accumulator: &mut ~[Rect<Au>],
|
||||
fn add_boxes_for_node(accumulator: &mut Vec<Rect<Au>>,
|
||||
mut iter: DisplayItemIterator,
|
||||
node: OpaqueNode) {
|
||||
for item in iter {
|
||||
|
@ -765,7 +765,7 @@ impl LayoutTask {
|
|||
}
|
||||
}
|
||||
|
||||
let mut boxes = ~[];
|
||||
let mut boxes = vec!();
|
||||
match self.display_list {
|
||||
None => fail!("no display list!"),
|
||||
Some(ref display_list) => {
|
||||
|
|
|
@ -288,7 +288,7 @@ pub trait NodeHelpers {
|
|||
fn to_trusted_node_address(&self) -> TrustedNodeAddress;
|
||||
|
||||
fn get_bounding_content_box(&self) -> Rect<Au>;
|
||||
fn get_content_boxes(&self) -> ~[Rect<Au>];
|
||||
fn get_content_boxes(&self) -> Vec<Rect<Au>>;
|
||||
}
|
||||
|
||||
impl NodeHelpers for JS<Node> {
|
||||
|
@ -581,7 +581,7 @@ impl NodeHelpers for JS<Node> {
|
|||
rect
|
||||
}
|
||||
|
||||
fn get_content_boxes(&self) -> ~[Rect<Au>] {
|
||||
fn get_content_boxes(&self) -> Vec<Rect<Au>> {
|
||||
let window = window_from_node(self);
|
||||
let page = window.get().page();
|
||||
let (chan, port) = channel();
|
||||
|
|
|
@ -83,7 +83,7 @@ impl<S: Encoder<E>, E> Encodable<S, E> for TrustedNodeAddress {
|
|||
pub type UntrustedNodeAddress = *c_void;
|
||||
|
||||
pub struct ContentBoxResponse(pub Rect<Au>);
|
||||
pub struct ContentBoxesResponse(pub ~[Rect<Au>]);
|
||||
pub struct ContentBoxesResponse(pub Vec<Rect<Au>>);
|
||||
pub struct HitTestResponse(pub UntrustedNodeAddress);
|
||||
pub struct MouseOverResponse(pub Vec<UntrustedNodeAddress>);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue