WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
20571
Window object missing Animation/Transition event setter
https://bugs.webkit.org/show_bug.cgi?id=20571
Summary
Window object missing Animation/Transition event setter
Dean Jackson
Reported
2008-08-29 19:02:57 PDT
When I landed Transition events I forgot to put a setter for the attributes on the Window object.
Attachments
patch with testcases
(53.46 KB, patch)
2008-08-29 19:07 PDT
,
Dean Jackson
sam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Dean Jackson
Comment 1
2008-08-29 19:07:07 PDT
Created
attachment 23078
[details]
patch with testcases This patch also includes a code cleanup since a lot of this file violated the coding guidelines and hence offended my eyes. Check the next comment for the "real" patch. Also, not all the tests included here are directly relevant to the fix in the patch, but are the tests that should have been landed with the events in the first place. Lastly, there is an outstanding bug that makes using window pretty annoying. The event dispatch code only fires a transition event if the document was notified of a listener. If you attach only to Window then the Document doesn't know, and hence nothing happens. I'll file a separate bug on that. The workaround is to attach a transition event listener anywhere on the document (even if it isn't in the right place and is empty).
Dean Jackson
Comment 2
2008-08-29 19:07:42 PDT
Here is the real meat of the patch (without coding style fixes): diff --git a/WebCore/bindings/js/JSDOMWindowBase.cpp b/WebCore/bindings/js/JSDOMWindowBase.cpp index 60ac671..7c3e4b2 100644 --- a/WebCore/bindings/js/JSDOMWindowBase.cpp +++ b/WebCore/bindings/js/JSDOMWindowBase.cpp @@ -749,6 +761,22 @@ void JSDOMWindowBase::put(ExecState* exec, const Identifier& propertyName, JSVal if (allowsAccessFrom(exec)) setListener(exec, unloadEvent, value); return; + case OnWebKitAnimationStart: + if (allowsAccessFrom(exec)) + setListener(exec, webkitAnimationStartEvent, value); + return; + case OnWebKitAnimationIteration: + if (allowsAccessFrom(exec)) + setListener(exec, webkitAnimationIterationEvent, value); + return; + case OnWebKitAnimationEnd: + if (allowsAccessFrom(exec)) + setListener(exec, webkitAnimationEndEvent, value); + return; + case OnWebKitTransitionEnd: + if (allowsAccessFrom(exec)) + setListener(exec, webkitTransitionEndEvent, value); + return; default:
Darin Adler
Comment 3
2008-08-30 19:15:14 PDT
Comment on
attachment 23078
[details]
patch with testcases It'd be better to clean up the whitespace in a separate check-in first.
Sam Weinig
Comment 4
2008-08-31 19:35:56 PDT
Comment on
attachment 23078
[details]
patch with testcases In general, we prefer if the test cases JS try and match our coding styles, but it is just something to think about in the future.
Dean Jackson
Comment 5
2008-09-01 16:06:52 PDT
Code cleanup commit Committed
r36020
M WebCore/bindings/js/JSDOMWindowBase.cpp M WebCore/ChangeLog
Dean Jackson
Comment 6
2008-09-01 16:34:37 PDT
Committed
r36021
M WebCore/bindings/js/JSDOMWindowBase.cpp M WebCore/ChangeLog M LayoutTests/ChangeLog A LayoutTests/transitions/transition-end-event-all-properties.html A LayoutTests/transitions/transition-end-event-left-expected.txt A LayoutTests/transitions/transition-end-event-window.html A LayoutTests/transitions/transition-end-event-multiple-01.html A LayoutTests/transitions/transition-end-event-multiple-02.html A LayoutTests/transitions/transition-end-event-transform.html A LayoutTests/transitions/transition-end-event-multiple-03.html A LayoutTests/transitions/transition-end-event-multiple-04.html A LayoutTests/transitions/transition-end-event-all-properties-expected.txt A LayoutTests/transitions/transition-end-event-window-expected.txt A LayoutTests/transitions/end-event-helpers.js A LayoutTests/transitions/transition-end-event-container.html A LayoutTests/transitions/transition-end-event-nested.html A LayoutTests/transitions/transition-end-event-multiple-01-expected.txt A LayoutTests/transitions/transition-end-event-multiple-02-expected.txt A LayoutTests/transitions/transition-end-event-multiple-03-expected.txt A LayoutTests/transitions/transition-end-event-transform-expected.txt A LayoutTests/transitions/transition-end-event-attributes.html A LayoutTests/transitions/transition-end-event-multiple-04-expected.txt A LayoutTests/transitions/transition-end-event-left.html A LayoutTests/transitions/transition-end-event-container-expected.txt A LayoutTests/transitions/transition-end-event-nested-expected.txt A LayoutTests/transitions/transition-end-event-attributes-expected.txt
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug