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

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

Issue 1013393004: Eliminate TextTrackCue::updateDisplayTree() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: coerce m_isPastNode to bool Created 5 years, 9 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/CueTimeline.cpp ('k') | Source/core/html/track/TextTrackCue.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) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google 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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // text track cue display state has a set of CSS boxes, then add those boxes 99 // text track cue display state has a set of CSS boxes, then add those boxes
100 // to output, and remove cue from cues. 100 // to output, and remove cue from cues.
101 101
102 // There is nothing explicitly to be done here, as all the caching occurs 102 // There is nothing explicitly to be done here, as all the caching occurs
103 // within the TextTrackCue instance itself. If parameters of the cue change, 103 // within the TextTrackCue instance itself. If parameters of the cue change,
104 // the display tree is cleared. 104 // the display tree is cleared.
105 105
106 // 10. For each text track cue cue in cues that has not yet had 106 // 10. For each text track cue cue in cues that has not yet had
107 // corresponding CSS boxes added to output, in text track cue order, run the 107 // corresponding CSS boxes added to output, in text track cue order, run the
108 // following substeps: 108 // following substeps:
109 double movieTime = video.currentTime();
109 for (size_t i = 0; i < activeCues.size(); ++i) { 110 for (size_t i = 0; i < activeCues.size(); ++i) {
110 TextTrackCue* cue = activeCues[i].data(); 111 TextTrackCue* cue = activeCues[i].data();
111 112
112 ASSERT(cue->isActive()); 113 ASSERT(cue->isActive());
113 if (!cue->track() || !cue->track()->isRendered() || !cue->isActive()) 114 if (!cue->track() || !cue->track()->isRendered() || !cue->isActive())
114 continue; 115 continue;
115 116
116 cue->updateDisplay(*this); 117 cue->updateDisplay(*this);
118 cue->updatePastAndFutureNodes(movieTime);
117 } 119 }
118 120
119 // 11. Return output. 121 // 11. Return output.
120 if (hasChildren()) 122 if (hasChildren())
121 removeInlineStyleProperty(CSSPropertyDisplay); 123 removeInlineStyleProperty(CSSPropertyDisplay);
122 else 124 else
123 setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone); 125 setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone);
124 } 126 }
125 127
126 } // namespace blink 128 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/track/CueTimeline.cpp ('k') | Source/core/html/track/TextTrackCue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698