Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Side by Side Diff: Source/core/html/HTMLMediaElement.cpp

Issue 83073006: Add "change" and "removetrack" events to TextTrackList. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@add-track-id-again
Patch Set: Fix test results for Opera onremovetrack test Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 // If this is the first added track, create the list of text tra cks. 1202 // If this is the first added track, create the list of text tra cks.
1203 if (!m_textTracks) 1203 if (!m_textTracks)
1204 m_textTracks = TextTrackList::create(this); 1204 m_textTracks = TextTrackList::create(this);
1205 } 1205 }
1206 break; 1206 break;
1207 } 1207 }
1208 } else if (track->trackType() == TextTrack::AddTrack && track->mode() != Tex tTrack::disabledKeyword()) 1208 } else if (track->trackType() == TextTrack::AddTrack && track->mode() != Tex tTrack::disabledKeyword())
1209 textTrackAddCues(track, track->cues()); 1209 textTrackAddCues(track, track->cues());
1210 1210
1211 configureTextTrackDisplay(AssumeVisibleChange); 1211 configureTextTrackDisplay(AssumeVisibleChange);
1212
1213 ASSERT(textTracks()->contains(track));
1214 textTracks()->scheduleChangeEvent();
1212 } 1215 }
1213 1216
1214 void HTMLMediaElement::textTrackKindChanged(TextTrack* track) 1217 void HTMLMediaElement::textTrackKindChanged(TextTrack* track)
1215 { 1218 {
1216 if (track->kind() != TextTrack::captionsKeyword() && track->kind() != TextTr ack::subtitlesKeyword() && track->mode() == TextTrack::showingKeyword()) 1219 if (track->kind() != TextTrack::captionsKeyword() && track->kind() != TextTr ack::subtitlesKeyword() && track->mode() == TextTrack::showingKeyword())
1217 track->setMode(TextTrack::hiddenKeyword()); 1220 track->setMode(TextTrack::hiddenKeyword());
1218 } 1221 }
1219 1222
1220 void HTMLMediaElement::beginIgnoringTrackDisplayUpdateRequests() 1223 void HTMLMediaElement::beginIgnoringTrackDisplayUpdateRequests()
1221 { 1224 {
(...skipping 2661 matching lines...) Expand 10 before | Expand all | Expand 10 after
3883 { 3886 {
3884 scheduleLayerUpdate(); 3887 scheduleLayerUpdate();
3885 } 3888 }
3886 3889
3887 bool HTMLMediaElement::isInteractiveContent() const 3890 bool HTMLMediaElement::isInteractiveContent() const
3888 { 3891 {
3889 return fastHasAttribute(controlsAttr); 3892 return fastHasAttribute(controlsAttr);
3890 } 3893 }
3891 3894
3892 } 3895 }
OLDNEW
« no previous file with comments | « LayoutTests/media/track/track-remove-track-expected.txt ('k') | Source/core/html/track/TextTrackList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698