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

Side by Side Diff: third_party/WebKit/Source/core/html/track/InbandTextTrack.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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 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 26 matching lines...) Expand all
37 using blink::WebString; 37 using blink::WebString;
38 38
39 namespace blink { 39 namespace blink {
40 40
41 InbandTextTrack* InbandTextTrack::create(WebInbandTextTrack* webTrack) 41 InbandTextTrack* InbandTextTrack::create(WebInbandTextTrack* webTrack)
42 { 42 {
43 return new InbandTextTrack(webTrack); 43 return new InbandTextTrack(webTrack);
44 } 44 }
45 45
46 InbandTextTrack::InbandTextTrack(WebInbandTextTrack* webTrack) 46 InbandTextTrack::InbandTextTrack(WebInbandTextTrack* webTrack)
47 : TextTrack(emptyAtom, webTrack->label(), webTrack->language(), webTrack->id (), InBand) 47 : TextTrack(subtitlesKeyword(), webTrack->label(), webTrack->language(), web Track->id(), InBand)
48 , m_webTrack(webTrack) 48 , m_webTrack(webTrack)
49 { 49 {
50 m_webTrack->setClient(this); 50 m_webTrack->setClient(this);
51 51
52 switch (m_webTrack->kind()) { 52 switch (m_webTrack->kind()) {
53 case WebInbandTextTrack::KindSubtitles: 53 case WebInbandTextTrack::KindSubtitles:
54 setKind(TextTrack::subtitlesKeyword()); 54 setKind(TextTrack::subtitlesKeyword());
55 break; 55 break;
56 case WebInbandTextTrack::KindCaptions: 56 case WebInbandTextTrack::KindCaptions:
57 setKind(TextTrack::captionsKeyword()); 57 setKind(TextTrack::captionsKeyword());
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 { 93 {
94 HTMLMediaElement* owner = mediaElement(); 94 HTMLMediaElement* owner = mediaElement();
95 ASSERT(owner); 95 ASSERT(owner);
96 VTTCue* cue = VTTCue::create(owner->document(), start, end, content); 96 VTTCue* cue = VTTCue::create(owner->document(), start, end, content);
97 cue->setId(id); 97 cue->setId(id);
98 cue->parseSettings(settings); 98 cue->parseSettings(settings);
99 addCue(cue); 99 addCue(cue);
100 } 100 }
101 101
102 } // namespace blink 102 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698