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

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

Issue 1022743002: Document calls to the "rules for updating the text track rendering" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: leave comments only 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') | no next file » | 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 return new LayoutTextTrackContainer(this); 54 return new LayoutTextTrackContainer(this);
55 } 55 }
56 56
57 void TextTrackContainer::updateDisplay(HTMLMediaElement& mediaElement) 57 void TextTrackContainer::updateDisplay(HTMLMediaElement& mediaElement)
58 { 58 {
59 if (!mediaElement.closedCaptionsVisible()) { 59 if (!mediaElement.closedCaptionsVisible()) {
60 removeChildren(); 60 removeChildren();
61 return; 61 return;
62 } 62 }
63 63
64 // http://dev.w3.org/html5/webvtt/#dfn-rules-for-updating-the-display-of-web vtt-text-tracks
65
64 // 1. If the media element is an audio element, or is another playback 66 // 1. If the media element is an audio element, or is another playback
65 // mechanism with no rendering area, abort these steps. There is nothing to 67 // mechanism with no rendering area, abort these steps. There is nothing to
66 // render. 68 // render.
67 if (isHTMLAudioElement(mediaElement)) 69 if (isHTMLAudioElement(mediaElement))
68 return; 70 return;
69 71
70 // 2. Let video be the media element or other playback mechanism. 72 // 2. Let video be the media element or other playback mechanism.
71 HTMLVideoElement& video = toHTMLVideoElement(mediaElement); 73 HTMLVideoElement& video = toHTMLVideoElement(mediaElement);
72 74
73 // 3. Let output be an empty list of absolutely positioned CSS block boxes. 75 // 3. Let output be an empty list of absolutely positioned CSS block boxes.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 117 }
116 118
117 // 11. Return output. 119 // 11. Return output.
118 if (hasChildren()) 120 if (hasChildren())
119 removeInlineStyleProperty(CSSPropertyDisplay); 121 removeInlineStyleProperty(CSSPropertyDisplay);
120 else 122 else
121 setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone); 123 setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone);
122 } 124 }
123 125
124 } // namespace blink 126 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/track/CueTimeline.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698