Commit cdb264e8 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Add animationstart and animationend event support.

parent e06c541c
......@@ -109,6 +109,10 @@ typedef struct {
static const event_info_t event_info[] = {
{L"abort", EVENT_TYPE_EVENT, DISPID_EVMETH_ONABORT,
EVENT_BIND_TO_TARGET},
{L"animationend", EVENT_TYPE_EVENT, DISPID_EVPROP_ONANIMATIONEND,
EVENT_DEFAULTLISTENER | EVENT_BUBBLES},
{L"animationstart", EVENT_TYPE_EVENT, DISPID_EVPROP_ONANIMATIONSTART,
EVENT_DEFAULTLISTENER | EVENT_BUBBLES},
{L"beforeactivate", EVENT_TYPE_EVENT, DISPID_EVMETH_ONBEFOREACTIVATE,
EVENT_FIXME | EVENT_BUBBLES | EVENT_CANCELABLE},
{L"beforeunload", EVENT_TYPE_EVENT, DISPID_EVMETH_ONBEFOREUNLOAD,
......@@ -185,6 +189,8 @@ static const event_info_t event_info[] = {
EVENT_FIXME}
};
C_ASSERT(ARRAY_SIZE(event_info) == EVENTID_LAST);
static eventid_t str_to_eid(const WCHAR *str)
{
int i;
......
......@@ -18,6 +18,8 @@
typedef enum {
EVENTID_ABORT,
EVENTID_ANIMATIONEND,
EVENTID_ANIMATIONSTART,
EVENTID_BEFOREACTIVATE,
EVENTID_BEFOREUNLOAD,
EVENTID_BLUR,
......
......@@ -401,3 +401,17 @@ sync_test("storage", function() {
ok(typeof(window.localStorage) === "object",
"typeof(window.localStorage) = " + typeof(window.localStorage));
});
async_test("animation", function() {
document.body.innerHTML =
"<style>" +
" @keyframes testAnimation {0% { opacity: 0; } 100% { opacity: 1; }}" +
" .testAnimation { animation-name: testAnimation; animation-duration: 0.01s; }" +
"</style>";
var div = document.createElement("div");
div.addEventListener("animationstart", function() {
div.addEventListener("animationend", next_test);
});
document.body.appendChild(div);
div.className = "testAnimation";
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment