| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |