mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
66695d2f7e
commit
9acb25521e
32 changed files with 425 additions and 274 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue