aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2020-04-23 17:06:24 +0200
committerMartin Robinson <mrobinson@igalia.com>2020-04-24 14:20:37 +0200
commitd386d6d1f1e1dba33b49e0b44d9216128f29da1c (patch)
treefe253bdd7d28cc06a606af1e6f9cc39332848652 /components/script/dom
parent0540c4a284952145773e3c86d0f57f69a83283f1 (diff)
downloadservo-d386d6d1f1e1dba33b49e0b44d9216128f29da1c.tar.gz
servo-d386d6d1f1e1dba33b49e0b44d9216128f29da1c.zip
Add support for transitionrun events
These events are triggered as soon as a transition is added to the list of running transitions. This will allow better test coverage while reworking the transitions and animations processing model.
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/event.rs1
-rw-r--r--components/script/dom/macros.rs1
-rw-r--r--components/script/dom/webidls/EventHandler.webidl1
3 files changed, 3 insertions, 0 deletions
diff --git a/components/script/dom/event.rs b/components/script/dom/event.rs
index aba0179a59b..3a0e7490fc9 100644
--- a/components/script/dom/event.rs
+++ b/components/script/dom/event.rs
@@ -647,6 +647,7 @@ fn invoke(
atom!("animationiteration") => Some(atom!("webkitAnimationIteration")),
atom!("animationstart") => Some(atom!("webkitAnimationStart")),
atom!("transitionend") => Some(atom!("webkitTransitionEnd")),
+ atom!("transitionrun") => Some(atom!("webkitTransitionRun")),
_ => None,
} {
let original_type = event.type_();
diff --git a/components/script/dom/macros.rs b/components/script/dom/macros.rs
index df0a929a0ff..b1ea4f5cde2 100644
--- a/components/script/dom/macros.rs
+++ b/components/script/dom/macros.rs
@@ -498,6 +498,7 @@ macro_rules! global_event_handlers(
event_handler!(toggle, GetOntoggle, SetOntoggle);
event_handler!(transitioncancel, GetOntransitioncancel, SetOntransitioncancel);
event_handler!(transitionend, GetOntransitionend, SetOntransitionend);
+ event_handler!(transitionrun, GetOntransitionrun, SetOntransitionrun);
event_handler!(volumechange, GetOnvolumechange, SetOnvolumechange);
event_handler!(waiting, GetOnwaiting, SetOnwaiting);
)
diff --git a/components/script/dom/webidls/EventHandler.webidl b/components/script/dom/webidls/EventHandler.webidl
index 772c47facd2..a3514182806 100644
--- a/components/script/dom/webidls/EventHandler.webidl
+++ b/components/script/dom/webidls/EventHandler.webidl
@@ -92,6 +92,7 @@ interface mixin GlobalEventHandlers {
// https://drafts.csswg.org/css-transitions/#interface-globaleventhandlers-idl
partial interface mixin GlobalEventHandlers {
+ attribute EventHandler ontransitionrun;
attribute EventHandler ontransitionend;
attribute EventHandler ontransitioncancel;
};