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

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: Created 7 years, 1 month 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 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 // If this is the first added track, create the list of text tra cks. 1205 // If this is the first added track, create the list of text tra cks.
1206 if (!m_textTracks) 1206 if (!m_textTracks)
1207 m_textTracks = TextTrackList::create(this); 1207 m_textTracks = TextTrackList::create(this);
1208 } 1208 }
1209 break; 1209 break;
1210 } 1210 }
1211 } else if (track->trackType() == TextTrack::AddTrack && track->mode() != Tex tTrack::disabledKeyword()) 1211 } else if (track->trackType() == TextTrack::AddTrack && track->mode() != Tex tTrack::disabledKeyword())
1212 textTrackAddCues(track, track->cues()); 1212 textTrackAddCues(track, track->cues());
1213 1213
1214 configureTextTrackDisplay(AssumeVisibleChange); 1214 configureTextTrackDisplay(AssumeVisibleChange);
1215
1216 ASSERT(textTracks()->contains(track));
1217 textTracks()->scheduleChangeEvent();
1215 } 1218 }
1216 1219
1217 void HTMLMediaElement::textTrackKindChanged(TextTrack* track) 1220 void HTMLMediaElement::textTrackKindChanged(TextTrack* track)
1218 { 1221 {
1219 if (track->kind() != TextTrack::captionsKeyword() && track->kind() != TextTr ack::subtitlesKeyword() && track->mode() == TextTrack::showingKeyword()) 1222 if (track->kind() != TextTrack::captionsKeyword() && track->kind() != TextTr ack::subtitlesKeyword() && track->mode() == TextTrack::showingKeyword())
1220 track->setMode(TextTrack::hiddenKeyword()); 1223 track->setMode(TextTrack::hiddenKeyword());
1221 } 1224 }
1222 1225
1223 void HTMLMediaElement::beginIgnoringTrackDisplayUpdateRequests() 1226 void HTMLMediaElement::beginIgnoringTrackDisplayUpdateRequests()
1224 { 1227 {
(...skipping 2647 matching lines...) Expand 10 before | Expand all | Expand 10 after
3872 { 3875 {
3873 scheduleLayerUpdate(); 3876 scheduleLayerUpdate();
3874 } 3877 }
3875 3878
3876 bool HTMLMediaElement::isInteractiveContent() const 3879 bool HTMLMediaElement::isInteractiveContent() const
3877 { 3880 {
3878 return fastHasAttribute(controlsAttr); 3881 return fastHasAttribute(controlsAttr);
3879 } 3882 }
3880 3883
3881 } 3884 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698