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

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

Issue 22417002: Rename ASSERT_NO_EXCEPTION_STATE and IGNORE_EXCEPTION_STATE (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « Source/core/html/track/InbandTextTrack.cpp ('k') | Source/core/html/track/TextTrackCue.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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 return; 237 return;
238 238
239 // 4.8.10.12.5 Text track API 239 // 4.8.10.12.5 Text track API
240 240
241 // The addCue(cue) method of TextTrack objects, when invoked, must run the f ollowing steps: 241 // The addCue(cue) method of TextTrack objects, when invoked, must run the f ollowing steps:
242 242
243 // 1. If the given cue is in a text track list of cues, then remove cue from that text track 243 // 1. If the given cue is in a text track list of cues, then remove cue from that text track
244 // list of cues. 244 // list of cues.
245 TextTrack* cueTrack = cue->track(); 245 TextTrack* cueTrack = cue->track();
246 if (cueTrack && cueTrack != this) 246 if (cueTrack && cueTrack != this)
247 cueTrack->removeCue(cue.get(), ASSERT_NO_EXCEPTION_STATE); 247 cueTrack->removeCue(cue.get(), ASSERT_NO_EXCEPTION);
248 248
249 // 2. Add cue to the method's TextTrack object's text track's text track lis t of cues. 249 // 2. Add cue to the method's TextTrack object's text track's text track lis t of cues.
250 cue->setTrack(this); 250 cue->setTrack(this);
251 ensureTextTrackCueList()->add(cue); 251 ensureTextTrackCueList()->add(cue);
252 252
253 if (m_client) 253 if (m_client)
254 m_client->textTrackAddCue(this, cue.get()); 254 m_client->textTrackAddCue(this, cue.get());
255 } 255 }
256 256
257 void TextTrack::removeCue(TextTrackCue* cue, ExceptionState& es) 257 void TextTrack::removeCue(TextTrackCue* cue, ExceptionState& es)
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 if (!prpRegion) 314 if (!prpRegion)
315 return; 315 return;
316 316
317 RefPtr<TextTrackRegion> region = prpRegion; 317 RefPtr<TextTrackRegion> region = prpRegion;
318 TextTrackRegionList* regionList = ensureTextTrackRegionList(); 318 TextTrackRegionList* regionList = ensureTextTrackRegionList();
319 319
320 // 1. If the given region is in a text track list of regions, then remove 320 // 1. If the given region is in a text track list of regions, then remove
321 // region from that text track list of regions. 321 // region from that text track list of regions.
322 TextTrack* regionTrack = region->track(); 322 TextTrack* regionTrack = region->track();
323 if (regionTrack && regionTrack != this) 323 if (regionTrack && regionTrack != this)
324 regionTrack->removeRegion(region.get(), ASSERT_NO_EXCEPTION_STATE); 324 regionTrack->removeRegion(region.get(), ASSERT_NO_EXCEPTION);
325 325
326 // 2. If the method's TextTrack object's text track list of regions contains 326 // 2. If the method's TextTrack object's text track list of regions contains
327 // a region with the same identifier as region replace the values of that 327 // a region with the same identifier as region replace the values of that
328 // region's width, height, anchor point, viewport anchor point and scroll 328 // region's width, height, anchor point, viewport anchor point and scroll
329 // attributes with those of region. 329 // attributes with those of region.
330 TextTrackRegion* existingRegion = regionList->getRegionById(region->id()); 330 TextTrackRegion* existingRegion = regionList->getRegionById(region->id());
331 if (existingRegion) { 331 if (existingRegion) {
332 existingRegion->updateParametersFromRegion(region.get()); 332 existingRegion->updateParametersFromRegion(region.get());
333 return; 333 return;
334 } 334 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 { 489 {
490 // "Main program" content is intrinsic to the presentation of the media file , regardless of locale. Content such as 490 // "Main program" content is intrinsic to the presentation of the media file , regardless of locale. Content such as
491 // directors commentary is not "main program" because it is not essential fo r the presentation. HTML5 doesn't have 491 // directors commentary is not "main program" because it is not essential fo r the presentation. HTML5 doesn't have
492 // a way to express this in a machine-reable form, it is typically done with the track label, so we assume that caption 492 // a way to express this in a machine-reable form, it is typically done with the track label, so we assume that caption
493 // tracks are main content and all other track types are not. 493 // tracks are main content and all other track types are not.
494 return m_kind == captionsKeyword(); 494 return m_kind == captionsKeyword();
495 } 495 }
496 496
497 } // namespace WebCore 497 } // namespace WebCore
498 498
OLDNEW
« no previous file with comments | « Source/core/html/track/InbandTextTrack.cpp ('k') | Source/core/html/track/TextTrackCue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698