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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLTrackElement.cpp

Issue 1947033002: Change "invalid value default" for HTMLTrackElement 'kind' to "metadata" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 { 87 {
88 if (name == srcAttr) { 88 if (name == srcAttr) {
89 if (!value.isEmpty()) 89 if (!value.isEmpty())
90 scheduleLoad(); 90 scheduleLoad();
91 else if (m_track) 91 else if (m_track)
92 m_track->removeAllCues(); 92 m_track->removeAllCues();
93 93
94 // 4.8.10.12.3 Sourcing out-of-band text tracks 94 // 4.8.10.12.3 Sourcing out-of-band text tracks
95 // As the kind, label, and srclang attributes are set, changed, or removed, the text track must update accordingly... 95 // As the kind, label, and srclang attributes are set, changed, or removed, the text track must update accordingly...
96 } else if (name == kindAttr) { 96 } else if (name == kindAttr) {
97 track()->setKind(value.lower()); 97 track()->setKind(!value.isNull() ? value.lower() : TextTrack::subtitlesK eyword());
98 } else if (name == labelAttr) { 98 } else if (name == labelAttr) {
99 track()->setLabel(value); 99 track()->setLabel(value);
100 } else if (name == srclangAttr) { 100 } else if (name == srclangAttr) {
101 track()->setLanguage(value); 101 track()->setLanguage(value);
102 } else if (name == idAttr) { 102 } else if (name == idAttr) {
103 track()->setId(value); 103 track()->setId(value);
104 } 104 }
105 105
106 HTMLElement::parseAttribute(name, oldValue, value); 106 HTMLElement::parseAttribute(name, oldValue, value);
107 } 107 }
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 } 325 }
326 326
327 DEFINE_TRACE(HTMLTrackElement) 327 DEFINE_TRACE(HTMLTrackElement)
328 { 328 {
329 visitor->trace(m_track); 329 visitor->trace(m_track);
330 visitor->trace(m_loader); 330 visitor->trace(m_loader);
331 HTMLElement::trace(visitor); 331 HTMLElement::trace(visitor);
332 } 332 }
333 333
334 } // namespace blink 334 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/media/track/track-kind.html ('k') | third_party/WebKit/Source/core/html/track/AudioTrack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698