mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Various CanGc fixes in 8 files (#33893)
* Various CanGc fixes in 8 files Signed-off-by: L Ashwin B <lashwinib@gmail.com> * fixed merge conflicts and formatting Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
parent
6b87ecc291
commit
fde8d72aca
13 changed files with 77 additions and 58 deletions
|
@ -328,6 +328,7 @@ pub fn handle_get_layout(
|
|||
pipeline: PipelineId,
|
||||
node_id: String,
|
||||
reply: IpcSender<Option<ComputedNodeLayout>>,
|
||||
can_gc: CanGc,
|
||||
) {
|
||||
let node = match find_node_by_unique_id(documents, pipeline, &node_id) {
|
||||
None => return reply.send(None).unwrap(),
|
||||
|
@ -337,7 +338,7 @@ pub fn handle_get_layout(
|
|||
let elem = node
|
||||
.downcast::<Element>()
|
||||
.expect("should be getting layout of element");
|
||||
let rect = elem.GetBoundingClientRect(CanGc::note());
|
||||
let rect = elem.GetBoundingClientRect(can_gc);
|
||||
let width = rect.Width() as f32;
|
||||
let height = rect.Height() as f32;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue