CanGc changes from fontfaceset.rs (#33920)

* CanGc changes from fontfaceset.rs

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

* Update components/script/dom/bindings/codegen/Bindings.conf

Co-authored-by: Josh Matthews <josh@joshmatthews.net>
Signed-off-by: chickenleaf <lashwinib@gmail.com>

---------

Signed-off-by: L Ashwin B <lashwinib@gmail.com>
Signed-off-by: chickenleaf <lashwinib@gmail.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
chickenleaf 2024-10-21 17:58:56 +05:30 committed by GitHub
parent 66695d2f7e
commit 9acb25521e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 425 additions and 274 deletions

View file

@ -276,13 +276,13 @@ impl MouseEventMethods for MouseEvent {
}
// https://drafts.csswg.org/cssom-view/#dom-mouseevent-offsetx
fn OffsetX(&self) -> i32 {
fn OffsetX(&self, can_gc: CanGc) -> i32 {
let event = self.upcast::<Event>();
if event.dispatching() {
match event.GetTarget() {
Some(target) => {
if let Some(node) = target.downcast::<Node>() {
let rect = node.client_rect();
let rect = node.client_rect(can_gc);
self.client_x.get() - rect.origin.x
} else {
self.offset_x.get()
@ -296,13 +296,13 @@ impl MouseEventMethods for MouseEvent {
}
// https://drafts.csswg.org/cssom-view/#dom-mouseevent-offsety
fn OffsetY(&self) -> i32 {
fn OffsetY(&self, can_gc: CanGc) -> i32 {
let event = self.upcast::<Event>();
if event.dispatching() {
match event.GetTarget() {
Some(target) => {
if let Some(node) = target.downcast::<Node>() {
let rect = node.client_rect();
let rect = node.client_rect(can_gc);
self.client_y.get() - rect.origin.y
} else {
self.offset_y.get()