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

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

Issue 924273004: Remove HTMLMediaElement::textTrackKindChanged (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add FIXME+bugref. Created 5 years, 10 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/track/TextTrack.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 } else if (track->trackType() == TextTrack::AddTrack && track->mode() != Tex tTrack::disabledKeyword()) { 1177 } else if (track->trackType() == TextTrack::AddTrack && track->mode() != Tex tTrack::disabledKeyword()) {
1178 cueTimeline().addCues(track, track->cues()); 1178 cueTimeline().addCues(track, track->cues());
1179 } 1179 }
1180 1180
1181 configureTextTrackDisplay(AssumeVisibleChange); 1181 configureTextTrackDisplay(AssumeVisibleChange);
1182 1182
1183 ASSERT(textTracks()->contains(track)); 1183 ASSERT(textTracks()->contains(track));
1184 textTracks()->scheduleChangeEvent(); 1184 textTracks()->scheduleChangeEvent();
1185 } 1185 }
1186 1186
1187 void HTMLMediaElement::textTrackKindChanged(TextTrack* track)
1188 {
1189 if (track->kind() != TextTrack::captionsKeyword() && track->kind() != TextTr ack::subtitlesKeyword() && track->mode() == TextTrack::showingKeyword())
1190 track->setMode(TextTrack::hiddenKeyword());
1191 }
1192
1193 bool HTMLMediaElement::isSafeToLoadURL(const KURL& url, InvalidURLAction actionI fInvalid) 1187 bool HTMLMediaElement::isSafeToLoadURL(const KURL& url, InvalidURLAction actionI fInvalid)
1194 { 1188 {
1195 if (!url.isValid()) { 1189 if (!url.isValid()) {
1196 WTF_LOG(Media, "HTMLMediaElement::isSafeToLoadURL(%p, %s) -> FALSE becau se url is invalid", this, urlForLoggingMedia(url).utf8().data()); 1190 WTF_LOG(Media, "HTMLMediaElement::isSafeToLoadURL(%p, %s) -> FALSE becau se url is invalid", this, urlForLoggingMedia(url).utf8().data());
1197 return false; 1191 return false;
1198 } 1192 }
1199 1193
1200 LocalFrame* frame = document().frame(); 1194 LocalFrame* frame = document().frame();
1201 if (!frame || !document().securityOrigin()->canDisplay(url)) { 1195 if (!frame || !document().securityOrigin()->canDisplay(url)) {
1202 if (actionIfInvalid == Complain) 1196 if (actionIfInvalid == Complain)
(...skipping 2429 matching lines...) Expand 10 before | Expand all | Expand 10 after
3632 3626
3633 #if ENABLE(WEB_AUDIO) 3627 #if ENABLE(WEB_AUDIO)
3634 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) 3628 void HTMLMediaElement::clearWeakMembers(Visitor* visitor)
3635 { 3629 {
3636 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) 3630 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider())
3637 audioSourceProvider()->setClient(nullptr); 3631 audioSourceProvider()->setClient(nullptr);
3638 } 3632 }
3639 #endif 3633 #endif
3640 3634
3641 } 3635 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/track/TextTrack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698