mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Return the result from process_content_boxes_request.
This commit is contained in:
parent
a84055d8fe
commit
60e60b6f8a
2 changed files with 5 additions and 5 deletions
|
@ -1230,7 +1230,7 @@ impl LayoutTask {
|
|||
ReflowQueryType::ContentBoxQuery(node) =>
|
||||
process_content_box_request(node, &mut root_flow, &mut rw_data),
|
||||
ReflowQueryType::ContentBoxesQuery(node) =>
|
||||
process_content_boxes_request(node, &mut root_flow, &mut rw_data),
|
||||
rw_data.content_boxes_response = process_content_boxes_request(node, &mut root_flow),
|
||||
ReflowQueryType::NodeGeometryQuery(node) =>
|
||||
rw_data.client_rect_response = self.process_node_geometry_request(node, &mut root_flow),
|
||||
ReflowQueryType::ResolvedStyleQuery(node, ref pseudo, ref property) => {
|
||||
|
|
|
@ -295,13 +295,13 @@ pub fn process_content_box_request<'a>(requested_node: TrustedNodeAddress,
|
|||
};
|
||||
}
|
||||
|
||||
pub fn process_content_boxes_request<'a>(requested_node: TrustedNodeAddress,
|
||||
layout_root: &mut FlowRef,
|
||||
rw_data: &mut RWGuard<'a>) {
|
||||
pub fn process_content_boxes_request(requested_node: TrustedNodeAddress,
|
||||
layout_root: &mut FlowRef)
|
||||
-> Vec<Rect<Au>> {
|
||||
// FIXME(pcwalton): This has not been updated to handle the stacking context relative
|
||||
// stuff. So the position is wrong in most cases.
|
||||
let requested_node: OpaqueNode = OpaqueNodeMethods::from_script_node(requested_node);
|
||||
let mut iterator = CollectingFragmentBorderBoxIterator::new(requested_node);
|
||||
sequential::iterate_through_flow_tree_fragment_border_boxes(layout_root, &mut iterator);
|
||||
rw_data.content_boxes_response = iterator.rects;
|
||||
iterator.rects
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue