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

Side by Side Diff: Source/core/html/track/InbandTextTrack.cpp

Issue 22572005: Remove all uses of the ASCIILiteral class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rm it from wtf Created 7 years, 4 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
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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 if (cueData->line() > 0) 155 if (cueData->line() > 0)
156 cue->setLine(lround(cueData->line()), IGNORE_EXCEPTION); 156 cue->setLine(lround(cueData->line()), IGNORE_EXCEPTION);
157 if (cueData->size() > 0) 157 if (cueData->size() > 0)
158 cue->setSize(lround(cueData->size()), IGNORE_EXCEPTION); 158 cue->setSize(lround(cueData->size()), IGNORE_EXCEPTION);
159 if (cueData->backgroundColor().alpha()) 159 if (cueData->backgroundColor().alpha())
160 cue->setBackgroundColor(cueData->backgroundColor().rgb()); 160 cue->setBackgroundColor(cueData->backgroundColor().rgb());
161 if (cueData->foregroundColor().alpha()) 161 if (cueData->foregroundColor().alpha())
162 cue->setForegroundColor(cueData->foregroundColor().rgb()); 162 cue->setForegroundColor(cueData->foregroundColor().rgb());
163 163
164 if (cueData->align() == GenericCueData::Start) 164 if (cueData->align() == GenericCueData::Start)
165 cue->setAlign(ASCIILiteral("start"), IGNORE_EXCEPTION); 165 cue->setAlign("start", IGNORE_EXCEPTION);
166 else if (cueData->align() == GenericCueData::Middle) 166 else if (cueData->align() == GenericCueData::Middle)
167 cue->setAlign(ASCIILiteral("middle"), IGNORE_EXCEPTION); 167 cue->setAlign("middle", IGNORE_EXCEPTION);
168 else if (cueData->align() == GenericCueData::End) 168 else if (cueData->align() == GenericCueData::End)
169 cue->setAlign(ASCIILiteral("end"), IGNORE_EXCEPTION); 169 cue->setAlign("end", IGNORE_EXCEPTION);
170 cue->setSnapToLines(false); 170 cue->setSnapToLines(false);
171 171
172 if (hasCue(cue.get())) { 172 if (hasCue(cue.get())) {
173 LOG(Media, "InbandTextTrack::addGenericCue ignoring already added cue: s tart=%.2f, end=%.2f, content=\"%s\"\n", 173 LOG(Media, "InbandTextTrack::addGenericCue ignoring already added cue: s tart=%.2f, end=%.2f, content=\"%s\"\n",
174 cueData->startTime(), cueData->endTime(), cueData->content().utf8(). data()); 174 cueData->startTime(), cueData->endTime(), cueData->content().utf8(). data());
175 return; 175 return;
176 } 176 }
177 177
178 addCue(cue); 178 addCue(cue);
179 } 179 }
180 180
181 void InbandTextTrack::addWebVTTCue(InbandTextTrackPrivate* trackPrivate, double start, double end, const String& id, const String& content, const String& settin gs) 181 void InbandTextTrack::addWebVTTCue(InbandTextTrackPrivate* trackPrivate, double start, double end, const String& id, const String& content, const String& settin gs)
182 { 182 {
183 UNUSED_PARAM(trackPrivate); 183 UNUSED_PARAM(trackPrivate);
184 ASSERT(trackPrivate == m_private); 184 ASSERT(trackPrivate == m_private);
185 185
186 RefPtr<TextTrackCue> cue = TextTrackCue::create(scriptExecutionContext(), st art, end, content); 186 RefPtr<TextTrackCue> cue = TextTrackCue::create(scriptExecutionContext(), st art, end, content);
187 cue->setId(id); 187 cue->setId(id);
188 cue->setCueSettings(settings); 188 cue->setCueSettings(settings);
189 189
190 if (hasCue(cue.get())) 190 if (hasCue(cue.get()))
191 return; 191 return;
192 192
193 addCue(cue); 193 addCue(cue);
194 } 194 }
195 195
196 } // namespace WebCore 196 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/shadow/DateTimeFieldElements.cpp ('k') | Source/core/html/track/TextTrackCue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698