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

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

Issue 23464095: WTF::notFound looks too much like a local variable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 DEFINE_STATIC_LOCAL(const AtomicString, scrollUpValueKeyword, ("up", AtomicS tring::ConstructFromLiteral)); 264 DEFINE_STATIC_LOCAL(const AtomicString, scrollUpValueKeyword, ("up", AtomicS tring::ConstructFromLiteral));
265 265
266 bool isValidSetting; 266 bool isValidSetting;
267 String numberAsString; 267 String numberAsString;
268 int number; 268 int number;
269 unsigned position; 269 unsigned position;
270 FloatPoint anchorPosition; 270 FloatPoint anchorPosition;
271 271
272 switch (setting) { 272 switch (setting) {
273 case Id: 273 case Id:
274 if (value.find("-->") == notFound) 274 if (value.find("-->") == kNotFound)
275 m_id = value; 275 m_id = value;
276 break; 276 break;
277 case Width: 277 case Width:
278 number = WebVTTParser::parseFloatPercentageValue(value, isValidSetting); 278 number = WebVTTParser::parseFloatPercentageValue(value, isValidSetting);
279 if (isValidSetting) 279 if (isValidSetting)
280 m_width = number; 280 m_width = number;
281 else 281 else
282 LOG(Media, "TextTrackRegion::parseSettingValue, invalid Width"); 282 LOG(Media, "TextTrackRegion::parseSettingValue, invalid Width");
283 break; 283 break;
284 case Height: 284 case Height:
(...skipping 30 matching lines...) Expand all
315 case None: 315 case None:
316 break; 316 break;
317 } 317 }
318 } 318 }
319 319
320 void TextTrackRegion::parseSetting(const String& input, unsigned* position) 320 void TextTrackRegion::parseSetting(const String& input, unsigned* position)
321 { 321 {
322 String setting = WebVTTParser::collectWord(input, position); 322 String setting = WebVTTParser::collectWord(input, position);
323 323
324 size_t equalOffset = setting.find('=', 1); 324 size_t equalOffset = setting.find('=', 1);
325 if (equalOffset == notFound || !equalOffset || equalOffset == setting.length () - 1) 325 if (equalOffset == kNotFound || !equalOffset || equalOffset == setting.lengt h() - 1)
326 return; 326 return;
327 327
328 RegionSetting name = getSettingFromString(setting.substring(0, equalOffset)) ; 328 RegionSetting name = getSettingFromString(setting.substring(0, equalOffset)) ;
329 String value = setting.substring(equalOffset + 1, setting.length() - 1); 329 String value = setting.substring(equalOffset + 1, setting.length() - 1);
330 330
331 parseSettingValue(name, value); 331 parseSettingValue(name, value);
332 } 332 }
333 333
334 const AtomicString& TextTrackRegion::textTrackCueContainerShadowPseudoId() 334 const AtomicString& TextTrackRegion::textTrackCueContainerShadowPseudoId()
335 { 335 {
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 { 501 {
502 LOG(Media, "TextTrackRegion::scrollTimerFired"); 502 LOG(Media, "TextTrackRegion::scrollTimerFired");
503 503
504 stopTimer(); 504 stopTimer();
505 displayLastTextTrackCueBox(); 505 displayLastTextTrackCueBox();
506 } 506 }
507 507
508 } // namespace WebCore 508 } // namespace WebCore
509 509
510 #endif 510 #endif
OLDNEW
« no previous file with comments | « Source/core/html/track/TextTrackList.cpp ('k') | Source/core/html/track/TextTrackRegionList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698