RESOLVED FIXED 107004
Monitor usage of unprefixed and prefixed DOM events for CSS Transitions.
https://bugs.webkit.org/show_bug.cgi?id=107004
Summary Monitor usage of unprefixed and prefixed DOM events for CSS Transitions.
Alexis Menard (darktears)
Reported 2013-01-16 05:12:05 PST
Monitor usage of unprefixed and prefixed DOM event for CSS Transitions.
Attachments
Patch (3.51 KB, patch)
2013-01-16 05:17 PST, Alexis Menard (darktears)
no flags
Patch (3.51 KB, patch)
2013-01-16 05:19 PST, Alexis Menard (darktears)
no flags
Patch (3.16 KB, patch)
2013-01-16 12:50 PST, Alexis Menard (darktears)
no flags
Patch (3.11 KB, patch)
2013-01-16 13:30 PST, Alexis Menard (darktears)
no flags
Alexis Menard (darktears)
Comment 1 2013-01-16 05:17:01 PST
Alexis Menard (darktears)
Comment 2 2013-01-16 05:19:10 PST
Adam Barth
Comment 3 2013-01-16 09:37:28 PST
Comment on attachment 182965 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=182965&action=review > Source/WebCore/dom/EventTarget.cpp:174 > + if (document->domWindow()) { > + if (event->type() == eventNames().transitionendEvent) > + FeatureObserver::observe(document->domWindow(), FeatureObserver::UnprefixedTransitionEndEvent); > + if (event->type() == eventNames().webkitTransitionEndEvent) > + FeatureObserver::observe(document->domWindow(), FeatureObserver::PrefixedTransitionEndEvent); > + } This is fine, but you won't be able to correlate the two. You might want to also observe when both are registered.
Adam Barth
Comment 4 2013-01-16 09:38:48 PST
Comment on attachment 182965 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=182965&action=review > Source/WebCore/dom/EventTarget.cpp:164 > +static void observeEvent(const Event* event, const EventTarget* target) Isn't the common case that event isn't for transitions? If so, we might want to check for whether the event is transitionendEvent or webkitTransitionEndEvent early in this function.
Alexis Menard (darktears)
Comment 5 2013-01-16 09:41:16 PST
(In reply to comment #4) > (From update of attachment 182965 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=182965&action=review > > > Source/WebCore/dom/EventTarget.cpp:164 > > +static void observeEvent(const Event* event, const EventTarget* target) > > Isn't the common case that event isn't for transitions? If so, we might want to check for whether the event is transitionendEvent or webkitTransitionEndEvent early in this function. Well in that function later I'll put the animation DOM events :).
Alexis Menard (darktears)
Comment 6 2013-01-16 09:43:08 PST
Comment on attachment 182965 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=182965&action=review >>> Source/WebCore/dom/EventTarget.cpp:164 >>> +static void observeEvent(const Event* event, const EventTarget* target) >> >> Isn't the common case that event isn't for transitions? If so, we might want to check for whether the event is transitionendEvent or webkitTransitionEndEvent early in this function. > > Well in that function later I'll put the animation DOM events :). Well in fact before observeEvent is called I check (!prefixedTypeName.isEmpty()) which already filter regular events. You'll be in that function only if the event had a prefixed version. >> Source/WebCore/dom/EventTarget.cpp:174 >> + } > > This is fine, but you won't be able to correlate the two. You might want to also observe when both are registered. I'm not sure to understand here.
Adam Barth
Comment 7 2013-01-16 10:46:23 PST
> >> Source/WebCore/dom/EventTarget.cpp:174 > >> + } > > > > This is fine, but you won't be able to correlate the two. You might want to also observe when both are registered. > > I'm not sure to understand here. My understanding is that you're interested in knowing how often web pages are listening for both the prefixed and unprefixed versions of the same event. The way you've written this patch, you'll learn how often they listening for each type of event, but you won't be able to figure out how often they're listening for *both* at the same time.
Alexis Menard (darktears)
Comment 8 2013-01-16 12:50:16 PST
Alexis Menard (darktears)
Comment 9 2013-01-16 13:30:13 PST
WebKit Review Bot
Comment 10 2013-01-16 14:00:10 PST
Comment on attachment 183026 [details] Patch Clearing flags on attachment: 183026 Committed r139922: <http://trac.webkit.org/changeset/139922>
WebKit Review Bot
Comment 11 2013-01-16 14:00:14 PST
All reviewed patches have been landed. Closing bug.
Lucas Forschler
Comment 12 2019-02-06 09:19:04 PST
Mass move bugs into the DOM component.
Note You need to log in before you can comment on or make changes to this bug.