| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |