Changeset 148244 in webkit
- Timestamp:
- Apr 11, 2013 4:25:50 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r148236 r148244 1 2013-04-11 Brendan Long <b.long@cablelabs.com> 2 3 TextTrackList's .onremovetrack is missing from IDL 4 https://bugs.webkit.org/show_bug.cgi?id=103421 5 6 Reviewed by Eric Carlson. 7 8 * media/track/opera/interfaces/TextTrackList/onremovetrack-expected.txt: Added. 9 1 10 2013-04-11 Sukolsak Sakshuwong <sukolsak@gmail.com> 2 11 -
trunk/Source/WebCore/ChangeLog
r148242 r148244 1 2013-04-11 Brendan Long <b.long@cablelabs.com> 2 3 TextTrackList's .onremovetrack is missing from IDL 4 https://bugs.webkit.org/show_bug.cgi?id=103421 5 6 Reviewed by Eric Carlson. 7 8 Fixed test media/track/opera/interfaces/TextTrackList/onremovetrack.html 9 10 * html/track/TextTrackList.cpp: 11 (TextTrackList::remove): 12 (TextTrackList::scheduleRemoveTrackEvent): 13 * html/track/TextTrackList.h: 14 (TextTrackList): 15 * html/track/TextTrackList.idl: 16 1 17 2013-04-11 Alberto Garcia <agarcia@igalia.com> 2 18 -
trunk/Source/WebCore/html/track/TextTrackList.cpp
r148050 r148244 209 209 track->setMediaElement(0); 210 210 211 RefPtr<TextTrack> trackRef = (*tracks)[index]; 211 212 tracks->remove(index); 213 scheduleRemoveTrackEvent(trackRef.release()); 212 214 } 213 215 … … 253 255 } 254 256 257 void TextTrackList::scheduleRemoveTrackEvent(PassRefPtr<TextTrack> track) 258 { 259 // 4.8.10.12.3 Sourcing out-of-band text tracks 260 // When a track element's parent element changes and the old parent was a 261 // media element, then the user agent must remove the track element's 262 // corresponding text track from the media element's list of text tracks, 263 // and then queue a task to fire a trusted event with the name removetrack, 264 // that does not bubble and is not cancelable, and that uses the TrackEvent 265 // interface, with the track attribute initialized to the text track's 266 // TextTrack object, at the media element's textTracks attribute's 267 // TextTrackList object. 268 269 RefPtr<TrackBase> trackRef = track; 270 TrackEventInit initializer; 271 initializer.track = trackRef; 272 initializer.bubbles = false; 273 initializer.cancelable = false; 274 275 m_pendingEvents.append(TrackEvent::create(eventNames().removetrackEvent, initializer)); 276 if (!m_pendingEventTimer.isActive()) 277 m_pendingEventTimer.startOneShot(0); 278 } 279 255 280 void TextTrackList::asyncEventTimerFired(Timer<TextTrackList>*) 256 281 { -
trunk/Source/WebCore/html/track/TextTrackList.h
r146380 r148244 67 67 68 68 DEFINE_ATTRIBUTE_EVENT_LISTENER(addtrack); 69 DEFINE_ATTRIBUTE_EVENT_LISTENER(removetrack); 69 70 70 71 void clearOwner() { m_owner = 0; } … … 83 84 84 85 void scheduleAddTrackEvent(PassRefPtr<TextTrack>); 86 void scheduleRemoveTrackEvent(PassRefPtr<TextTrack>); 85 87 void asyncEventTimerFired(Timer<TextTrackList>*); 86 88 -
trunk/Source/WebCore/html/track/TextTrackList.idl
r131172 r148244 37 37 38 38 attribute EventListener onaddtrack; 39 attribute EventListener onremovetrack; 39 40 40 41 void addEventListener(in DOMString type,
Note: See TracChangeset
for help on using the changeset viewer.