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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 2803243002: Use a ResizeObserver to determine default font-size for text tracks (Closed)
Patch Set: Update media/track/track-cue-rendering.html Created 3 years, 8 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
OLDNEW
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 3629 matching lines...) Expand 10 before | Expand all | Expand 10 after
3640 } 3640 }
3641 3641
3642 TextTrackContainer& HTMLMediaElement::ensureTextTrackContainer() { 3642 TextTrackContainer& HTMLMediaElement::ensureTextTrackContainer() {
3643 ShadowRoot& shadowRoot = ensureUserAgentShadowRoot(); 3643 ShadowRoot& shadowRoot = ensureUserAgentShadowRoot();
3644 assertShadowRootChildren(shadowRoot); 3644 assertShadowRootChildren(shadowRoot);
3645 3645
3646 Node* firstChild = shadowRoot.firstChild(); 3646 Node* firstChild = shadowRoot.firstChild();
3647 if (firstChild && firstChild->isTextTrackContainer()) 3647 if (firstChild && firstChild->isTextTrackContainer())
3648 return toTextTrackContainer(*firstChild); 3648 return toTextTrackContainer(*firstChild);
3649 3649
3650 TextTrackContainer* textTrackContainer = 3650 TextTrackContainer* textTrackContainer = TextTrackContainer::create(*this);
3651 TextTrackContainer::create(document());
3652 3651
3653 // The text track container should be inserted before the media controls, 3652 // The text track container should be inserted before the media controls,
3654 // so that they are rendered behind them. 3653 // so that they are rendered behind them.
3655 shadowRoot.insertBefore(textTrackContainer, firstChild); 3654 shadowRoot.insertBefore(textTrackContainer, firstChild);
3656 3655
3657 assertShadowRootChildren(shadowRoot); 3656 assertShadowRootChildren(shadowRoot);
3658 3657
3659 return *textTrackContainer; 3658 return *textTrackContainer;
3660 } 3659 }
3661 3660
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
4250 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); 4249 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE);
4251 } 4250 }
4252 4251
4253 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { 4252 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) {
4254 m_mostlyFillingViewport = true; 4253 m_mostlyFillingViewport = true;
4255 if (m_webMediaPlayer) 4254 if (m_webMediaPlayer)
4256 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); 4255 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport);
4257 } 4256 }
4258 4257
4259 } // namespace blink 4258 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698