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

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

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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
« no previous file with comments | « Source/core/html/track/TextTrack.cpp ('k') | Source/core/html/track/TextTrackRegion.cpp » ('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 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 // the user agent must instead throw a SyntaxError exception. 338 // the user agent must instead throw a SyntaxError exception.
339 339
340 WritingDirection direction = m_writingDirection; 340 WritingDirection direction = m_writingDirection;
341 if (value == horizontalKeyword()) 341 if (value == horizontalKeyword())
342 direction = Horizontal; 342 direction = Horizontal;
343 else if (value == verticalGrowingLeftKeyword()) 343 else if (value == verticalGrowingLeftKeyword())
344 direction = VerticalGrowingLeft; 344 direction = VerticalGrowingLeft;
345 else if (value == verticalGrowingRightKeyword()) 345 else if (value == verticalGrowingRightKeyword())
346 direction = VerticalGrowingRight; 346 direction = VerticalGrowingRight;
347 else 347 else
348 ec = SYNTAX_ERR; 348 ec = SyntaxError;
349 349
350 if (direction == m_writingDirection) 350 if (direction == m_writingDirection)
351 return; 351 return;
352 352
353 cueWillChange(); 353 cueWillChange();
354 m_writingDirection = direction; 354 m_writingDirection = direction;
355 cueDidChange(); 355 cueDidChange();
356 } 356 }
357 357
358 void TextTrackCue::setSnapToLines(bool value) 358 void TextTrackCue::setSnapToLines(bool value)
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 // agent must instead throw a SyntaxError exception. 447 // agent must instead throw a SyntaxError exception.
448 448
449 CueAlignment alignment = m_cueAlignment; 449 CueAlignment alignment = m_cueAlignment;
450 if (value == startKeyword()) 450 if (value == startKeyword())
451 alignment = Start; 451 alignment = Start;
452 else if (value == middleKeyword()) 452 else if (value == middleKeyword())
453 alignment = Middle; 453 alignment = Middle;
454 else if (value == endKeyword()) 454 else if (value == endKeyword())
455 alignment = End; 455 alignment = End;
456 else 456 else
457 ec = SYNTAX_ERR; 457 ec = SyntaxError;
458 458
459 if (alignment == m_cueAlignment) 459 if (alignment == m_cueAlignment)
460 return; 460 return;
461 461
462 cueWillChange(); 462 cueWillChange();
463 m_cueAlignment = alignment; 463 m_cueAlignment = alignment;
464 cueDidChange(); 464 cueDidChange();
465 } 465 }
466 466
467 void TextTrackCue::setText(const String& text) 467 void TextTrackCue::setText(const String& text)
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 if (m_cueSize != cue.size()) 1185 if (m_cueSize != cue.size())
1186 return false; 1186 return false;
1187 if (align() != cue.align()) 1187 if (align() != cue.align())
1188 return false; 1188 return false;
1189 1189
1190 return true; 1190 return true;
1191 } 1191 }
1192 1192
1193 } // namespace WebCore 1193 } // namespace WebCore
1194 1194
OLDNEW
« no previous file with comments | « Source/core/html/track/TextTrack.cpp ('k') | Source/core/html/track/TextTrackRegion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698