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:
chickenleaf 2024-10-18 17:24:32 +05:30 committed by GitHub
parent 6b87ecc291
commit fde8d72aca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 77 additions and 58 deletions

View file

@ -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;