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

Unified Diff: Source/core/dom/FullscreenElementStack.cpp

Issue 196723014: Replace Element::isMediaElement() with isHTMLMediaElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: less null checks Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/events/EventPath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/FullscreenElementStack.cpp
diff --git a/Source/core/dom/FullscreenElementStack.cpp b/Source/core/dom/FullscreenElementStack.cpp
index 046d275e54b97e9bcad3b7e968d98e482da2e0be..fc56e7b843d258ffafc5a0d53d83aca09f634140 100644
--- a/Source/core/dom/FullscreenElementStack.cpp
+++ b/Source/core/dom/FullscreenElementStack.cpp
@@ -35,6 +35,7 @@
#include "core/frame/LocalFrame.h"
#include "core/frame/Settings.h"
#include "core/html/HTMLFrameOwnerElement.h"
+#include "core/html/HTMLMediaElement.h"
#include "core/page/Chrome.h"
#include "core/page/ChromeClient.h"
#include "core/rendering/RenderFullScreen.h"
@@ -189,7 +190,7 @@ void FullscreenElementStack::requestFullScreenForElement(Element* element, unsig
// - an activation behavior is currently being processed whose click event was trusted, or
// - the event listener for a trusted click event is being handled.
// FIXME: Does this need to null-check settings()?
- if (!UserGestureIndicator::processingUserGesture() && (!element->isMediaElement() || document()->settings()->mediaFullscreenRequiresUserGesture()))
+ if (!UserGestureIndicator::processingUserGesture() && (!isHTMLMediaElement(*element) || document()->settings()->mediaFullscreenRequiresUserGesture()))
break;
// There is a previously-established user preference, security risk, or platform limitation.
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/events/EventPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698