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

Side by Side Diff: Source/core/dom/FullscreenElementStack.cpp

Issue 212323003: Remove the mediaFullscreenRequiresUserGesture setting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: drop include Created 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2013 Google Inc. All rights reserved. 9 * Copyright (C) 2013 Google Inc. All rights reserved.
10 * 10 *
(...skipping 15 matching lines...) Expand all
26 */ 26 */
27 27
28 #include "config.h" 28 #include "config.h"
29 #include "core/dom/FullscreenElementStack.h" 29 #include "core/dom/FullscreenElementStack.h"
30 30
31 #include "HTMLNames.h" 31 #include "HTMLNames.h"
32 #include "core/dom/Document.h" 32 #include "core/dom/Document.h"
33 #include "core/events/Event.h" 33 #include "core/events/Event.h"
34 #include "core/frame/FrameHost.h" 34 #include "core/frame/FrameHost.h"
35 #include "core/frame/LocalFrame.h" 35 #include "core/frame/LocalFrame.h"
36 #include "core/frame/Settings.h"
37 #include "core/frame/UseCounter.h" 36 #include "core/frame/UseCounter.h"
38 #include "core/html/HTMLFrameOwnerElement.h" 37 #include "core/html/HTMLFrameOwnerElement.h"
39 #include "core/html/HTMLMediaElement.h"
40 #include "core/page/Chrome.h" 38 #include "core/page/Chrome.h"
41 #include "core/page/ChromeClient.h" 39 #include "core/page/ChromeClient.h"
42 #include "core/rendering/RenderFullScreen.h" 40 #include "core/rendering/RenderFullScreen.h"
43 #include "platform/UserGestureIndicator.h" 41 #include "platform/UserGestureIndicator.h"
44 42
45 namespace WebCore { 43 namespace WebCore {
46 44
47 using namespace HTMLNames; 45 using namespace HTMLNames;
48 46
49 static bool fullscreenIsAllowedForAllOwners(const Document& document) 47 static bool fullscreenIsAllowedForAllOwners(const Document& document)
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 break; 186 break;
189 } 187 }
190 } 188 }
191 if (descendentHasNonEmptyStack && !inLegacyMozillaMode) 189 if (descendentHasNonEmptyStack && !inLegacyMozillaMode)
192 break; 190 break;
193 191
194 // This algorithm is not allowed to show a pop-up: 192 // This algorithm is not allowed to show a pop-up:
195 // An algorithm is allowed to show a pop-up if, in the task in which t he algorithm is running, either: 193 // An algorithm is allowed to show a pop-up if, in the task in which t he algorithm is running, either:
196 // - an activation behavior is currently being processed whose click e vent was trusted, or 194 // - an activation behavior is currently being processed whose click e vent was trusted, or
197 // - the event listener for a trusted click event is being handled. 195 // - the event listener for a trusted click event is being handled.
198 // FIXME: Does this need to null-check settings()? 196 if (!UserGestureIndicator::processingUserGesture())
199 if (!UserGestureIndicator::processingUserGesture() && (!isHTMLMediaEleme nt(*element) || document()->settings()->mediaFullscreenRequiresUserGesture()))
200 break; 197 break;
201 198
202 // There is a previously-established user preference, security risk, or platform limitation. 199 // There is a previously-established user preference, security risk, or platform limitation.
203 200
204 // 2. Let doc be element's node document. (i.e. "this") 201 // 2. Let doc be element's node document. (i.e. "this")
205 Document* currentDoc = document(); 202 Document* currentDoc = document();
206 203
207 // 3. Let docs be all doc's ancestor browsing context's documents (if an y) and doc. 204 // 3. Let docs be all doc's ancestor browsing context's documents (if an y) and doc.
208 Deque<Document*> docs; 205 Deque<Document*> docs;
209 206
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 if (!target) 568 if (!target)
572 target = fullscreen->webkitCurrentFullScreenElement(); 569 target = fullscreen->webkitCurrentFullScreenElement();
573 } 570 }
574 571
575 if (!target) 572 if (!target)
576 target = doc; 573 target = doc;
577 m_fullScreenChangeEventTargetQueue.append(target); 574 m_fullScreenChangeEventTargetQueue.append(target);
578 } 575 }
579 576
580 } // namespace WebCore 577 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/media/video-enter-fullscreen-without-user-gesture-expected.txt ('k') | Source/core/frame/Settings.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698