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

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

Issue 99333011: Make sure getAttribute() / setAttribute() callers use AtomicStrings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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
« no previous file with comments | « Source/core/html/HTMLTrackElement.h ('k') | Source/core/html/LinkResource.h » ('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) 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 track()->setLanguage(value); 108 track()->setLanguage(value);
109 } else if (name == idAttr) { 109 } else if (name == idAttr) {
110 track()->setId(value); 110 track()->setId(value);
111 } else if (name == defaultAttr) { 111 } else if (name == defaultAttr) {
112 track()->setIsDefault(!value.isNull()); 112 track()->setIsDefault(!value.isNull());
113 } 113 }
114 114
115 HTMLElement::parseAttribute(name, value); 115 HTMLElement::parseAttribute(name, value);
116 } 116 }
117 117
118 String HTMLTrackElement::kind() 118 const AtomicString& HTMLTrackElement::kind()
119 { 119 {
120 return track()->kind(); 120 return track()->kind();
121 } 121 }
122 122
123 void HTMLTrackElement::setKind(const String& kind) 123 void HTMLTrackElement::setKind(const AtomicString& kind)
124 { 124 {
125 setAttribute(kindAttr, kind); 125 setAttribute(kindAttr, kind);
126 } 126 }
127 127
128 LoadableTextTrack* HTMLTrackElement::ensureTrack() 128 LoadableTextTrack* HTMLTrackElement::ensureTrack()
129 { 129 {
130 if (!m_track) { 130 if (!m_track) {
131 // kind, label and language are updated by parseAttribute 131 // kind, label and language are updated by parseAttribute
132 m_track = LoadableTextTrack::create(this); 132 m_track = LoadableTextTrack::create(this);
133 } 133 }
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 HTMLMediaElement* HTMLTrackElement::mediaElement() const 307 HTMLMediaElement* HTMLTrackElement::mediaElement() const
308 { 308 {
309 Element* parent = parentElement(); 309 Element* parent = parentElement();
310 if (parent && parent->isMediaElement()) 310 if (parent && parent->isMediaElement())
311 return toHTMLMediaElement(parentNode()); 311 return toHTMLMediaElement(parentNode());
312 return 0; 312 return 0;
313 } 313 }
314 314
315 } 315 }
316 316
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTrackElement.h ('k') | Source/core/html/LinkResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698