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

Side by Side Diff: Source/core/html/track/TextTrack.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.cpp ('k') | no next file » | 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 m_trackList = trackList; 150 m_trackList = trackList;
151 invalidateTrackIndex(); 151 invalidateTrackIndex();
152 } 152 }
153 153
154 void TextTrack::setKind(const AtomicString& newKind) 154 void TextTrack::setKind(const AtomicString& newKind)
155 { 155 {
156 AtomicString oldKind = kind(); 156 AtomicString oldKind = kind();
157 TrackBase::setKind(newKind); 157 TrackBase::setKind(newKind);
158 158
159 if (mediaElement() && oldKind != kind()) 159 // If kind changes from visual to non-visual and mode is 'showing', then for ce mode to 'hidden'.
160 mediaElement()->textTrackKindChanged(this); 160 // FIXME: This is not per spec. crbug.com/460923
161 if (oldKind != kind() && mode() == showingKeyword()) {
162 if (kind() != captionsKeyword() && kind() != subtitlesKeyword())
163 setMode(hiddenKeyword());
164 }
161 } 165 }
162 166
163 void TextTrack::setMode(const AtomicString& mode) 167 void TextTrack::setMode(const AtomicString& mode)
164 { 168 {
165 ASSERT(mode == disabledKeyword() || mode == hiddenKeyword() || mode == showi ngKeyword()); 169 ASSERT(mode == disabledKeyword() || mode == hiddenKeyword() || mode == showi ngKeyword());
166 170
167 // On setting, if the new value isn't equal to what the attribute would curr ently 171 // On setting, if the new value isn't equal to what the attribute would curr ently
168 // return, the new value must be processed as follows ... 172 // return, the new value must be processed as follows ...
169 if (m_mode == mode) 173 if (m_mode == mode)
170 return; 174 return;
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 DEFINE_TRACE(TextTrack) 453 DEFINE_TRACE(TextTrack)
450 { 454 {
451 visitor->trace(m_cues); 455 visitor->trace(m_cues);
452 visitor->trace(m_regions); 456 visitor->trace(m_regions);
453 visitor->trace(m_trackList); 457 visitor->trace(m_trackList);
454 TrackBase::trace(visitor); 458 TrackBase::trace(visitor);
455 EventTargetWithInlineData::trace(visitor); 459 EventTargetWithInlineData::trace(visitor);
456 } 460 }
457 461
458 } // namespace blink 462 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698