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

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

Issue 2557943002: Sync requestFullscreen() and exitFullscreen() algorithms with the spec (Closed)
Patch Set: rebase Created 4 years 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 3396 matching lines...) Expand 10 before | Expand all | Expand 10 after
3407 return true; 3407 return true;
3408 3408
3409 // Wait for any pending events to be fired. 3409 // Wait for any pending events to be fired.
3410 if (m_asyncEventQueue->hasPendingEvents()) 3410 if (m_asyncEventQueue->hasPendingEvents())
3411 return true; 3411 return true;
3412 3412
3413 return false; 3413 return false;
3414 } 3414 }
3415 3415
3416 bool HTMLMediaElement::isFullscreen() const { 3416 bool HTMLMediaElement::isFullscreen() const {
3417 return Fullscreen::isCurrentFullScreenElement(*this); 3417 return Fullscreen::isFullscreenElement(*this);
3418 } 3418 }
3419 3419
3420 void HTMLMediaElement::didEnterFullscreen() { 3420 void HTMLMediaElement::didEnterFullscreen() {
3421 configureMediaControls(); 3421 configureMediaControls();
3422 if (mediaControls()) 3422 if (mediaControls())
3423 mediaControls()->enteredFullscreen(); 3423 mediaControls()->enteredFullscreen();
3424 // FIXME: There is no embedder-side handling in layout test mode. 3424 // FIXME: There is no embedder-side handling in layout test mode.
3425 if (webMediaPlayer() && !LayoutTestSupport::isRunningLayoutTest()) 3425 if (webMediaPlayer() && !LayoutTestSupport::isRunningLayoutTest())
3426 webMediaPlayer()->enteredFullscreen(); 3426 webMediaPlayer()->enteredFullscreen();
3427 // Cache this in case the player is destroyed before leaving fullscreen. 3427 // Cache this in case the player is destroyed before leaving fullscreen.
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
4098 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); 4098 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE);
4099 } 4099 }
4100 4100
4101 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { 4101 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) {
4102 m_mostlyFillingViewport = true; 4102 m_mostlyFillingViewport = true;
4103 if (m_webMediaPlayer) 4103 if (m_webMediaPlayer)
4104 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); 4104 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport);
4105 } 4105 }
4106 4106
4107 } // namespace blink 4107 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/LayoutTreeBuilder.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698