WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
83858
The cuechange event on track element is fired synchronously rather than queued
https://bugs.webkit.org/show_bug.cgi?id=83858
Summary
The cuechange event on track element is fired synchronously rather than queued
Anna Cavender
Reported
2012-04-12 21:25:46 PDT
4.8.10.8 Playing the media resource:
http://www.whatwg.org/specs/web-apps/current-work/#playing-the-media-resource
"When the current playback position of a media element changes..." specifies how events are to be sorted and filtered before dispatch. Currently, the cuechange event on track elements is fired synchronously rather than queued along with the other events in the queueing algorithm.
Attachments
Patch
(9.75 KB, patch)
2012-04-12 21:57 PDT
,
Anna Cavender
no flags
Details
Formatted Diff
Diff
assert track element and remove fireCueChangeEvent()
(12.01 KB, patch)
2012-04-13 13:42 PDT
,
Anna Cavender
eric.carlson
: review+
annacc
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Anna Cavender
Comment 1
2012-04-12 21:57:03 PDT
Created
attachment 137037
[details]
Patch
Eric Carlson
Comment 2
2012-04-13 11:20:13 PDT
Comment on
attachment 137037
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=137037&action=review
Nice fix, thanks!
> Source/WebCore/html/HTMLMediaElement.cpp:-1197 > - affectedTracks[i]->fireCueChangeEvent();
It looks like fireCueChangeEvent will not be used after this change. If so, it should be removed.
> Source/WebCore/html/HTMLMediaElement.cpp:1197 > + if (affectedTracks[i]->trackType() == TextTrack::TrackElement) { > + RefPtr<Event> event = Event::create(eventNames().cuechangeEvent, false, false); > + event->setTarget(static_cast<LoadableTextTrack*>(affectedTracks[i])->trackElement());
I think it would be safer to put the HTMLTrackElement in a local so you can ASSERT it value before setting the event target.
Radar WebKit Bug Importer
Comment 3
2012-04-13 11:20:52 PDT
<
rdar://problem/11246028
>
Anna Cavender
Comment 4
2012-04-13 13:41:14 PDT
Comment on
attachment 137037
[details]
Patch Thanks Eric! View in context:
https://bugs.webkit.org/attachment.cgi?id=137037&action=review
>> Source/WebCore/html/HTMLMediaElement.cpp:-1197 >> - affectedTracks[i]->fireCueChangeEvent(); > > It looks like fireCueChangeEvent will not be used after this change. If so, it should be removed.
Good call.
>> Source/WebCore/html/HTMLMediaElement.cpp:1197 >> + event->setTarget(static_cast<LoadableTextTrack*>(affectedTracks[i])->trackElement()); > > I think it would be safer to put the HTMLTrackElement in a local so you can ASSERT it value before setting the event target.
Another good call. Thanks.
Anna Cavender
Comment 5
2012-04-13 13:42:03 PDT
Created
attachment 137139
[details]
assert track element and remove fireCueChangeEvent()
Anna Cavender
Comment 6
2012-04-13 14:48:05 PDT
Committed as
http://trac.webkit.org/changeset/114171
Alexey Proskuryakov
Comment 7
2012-04-13 16:05:03 PDT
***
Bug 83878
has been marked as a duplicate of this bug. ***
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