OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights |
3 * reserved. | 3 * 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 3645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3656 } | 3656 } |
3657 | 3657 |
3658 TextTrackContainer& HTMLMediaElement::EnsureTextTrackContainer() { | 3658 TextTrackContainer& HTMLMediaElement::EnsureTextTrackContainer() { |
3659 ShadowRoot& shadow_root = EnsureUserAgentShadowRoot(); | 3659 ShadowRoot& shadow_root = EnsureUserAgentShadowRoot(); |
3660 AssertShadowRootChildren(shadow_root); | 3660 AssertShadowRootChildren(shadow_root); |
3661 | 3661 |
3662 Node* first_child = shadow_root.FirstChild(); | 3662 Node* first_child = shadow_root.FirstChild(); |
3663 if (first_child && first_child->IsTextTrackContainer()) | 3663 if (first_child && first_child->IsTextTrackContainer()) |
3664 return ToTextTrackContainer(*first_child); | 3664 return ToTextTrackContainer(*first_child); |
3665 | 3665 |
3666 TextTrackContainer* text_track_container = | 3666 TextTrackContainer* text_track_container = TextTrackContainer::Create(*this); |
3667 TextTrackContainer::Create(GetDocument()); | |
3668 | 3667 |
3669 // The text track container should be inserted before the media controls, | 3668 // The text track container should be inserted before the media controls, |
3670 // so that they are rendered behind them. | 3669 // so that they are rendered behind them. |
3671 shadow_root.InsertBefore(text_track_container, first_child); | 3670 shadow_root.InsertBefore(text_track_container, first_child); |
3672 | 3671 |
3673 AssertShadowRootChildren(shadow_root); | 3672 AssertShadowRootChildren(shadow_root); |
3674 | 3673 |
3675 return *text_track_container; | 3674 return *text_track_container; |
3676 } | 3675 } |
3677 | 3676 |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4269 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); | 4268 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); |
4270 } | 4269 } |
4271 | 4270 |
4272 void HTMLMediaElement::ViewportFillDebouncerTimerFired(TimerBase*) { | 4271 void HTMLMediaElement::ViewportFillDebouncerTimerFired(TimerBase*) { |
4273 mostly_filling_viewport_ = true; | 4272 mostly_filling_viewport_ = true; |
4274 if (web_media_player_) | 4273 if (web_media_player_) |
4275 web_media_player_->BecameDominantVisibleContent(mostly_filling_viewport_); | 4274 web_media_player_->BecameDominantVisibleContent(mostly_filling_viewport_); |
4276 } | 4275 } |
4277 | 4276 |
4278 } // namespace blink | 4277 } // namespace blink |
OLD | NEW |