Summary: | Monitor usage of unprefixed and prefixed DOM events for CSS Transitions. | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alexis Menard (darktears) <menard> | ||||||||||
Component: | DOM | Assignee: | Alexis Menard (darktears) <menard> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | abarth, ojan.autocc, webkit.review.bot | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | All | ||||||||||||
OS: | All | ||||||||||||
Attachments: |
|
Description
Alexis Menard (darktears)
2013-01-16 05:12:05 PST
Created attachment 182964 [details]
Patch
Created attachment 182965 [details]
Patch
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. 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. (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 :). 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. > >> 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.
Created attachment 183021 [details]
Patch
Created attachment 183026 [details]
Patch
Comment on attachment 183026 [details] Patch Clearing flags on attachment: 183026 Committed r139922: <http://trac.webkit.org/changeset/139922> All reviewed patches have been landed. Closing bug. Mass move bugs into the DOM component. |