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

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

Issue 428633004: Webkit setting for embedders that do not support fullscreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rename to fullscreenSupported Created 6 years, 4 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) 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 "core/HTMLNames.h" 31 #include "core/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"
36 #include "core/frame/UseCounter.h" 37 #include "core/frame/UseCounter.h"
37 #include "core/html/HTMLFrameOwnerElement.h" 38 #include "core/html/HTMLFrameOwnerElement.h"
39 #include "core/html/HTMLMediaElement.h"
38 #include "core/page/Chrome.h" 40 #include "core/page/Chrome.h"
39 #include "core/page/ChromeClient.h" 41 #include "core/page/ChromeClient.h"
40 #include "core/rendering/RenderFullScreen.h" 42 #include "core/rendering/RenderFullScreen.h"
41 #include "platform/UserGestureIndicator.h" 43 #include "platform/UserGestureIndicator.h"
42 44
43 namespace blink { 45 namespace blink {
44 46
45 using namespace HTMLNames; 47 using namespace HTMLNames;
46 48
47 static bool fullscreenIsAllowedForAllOwners(const Document& document) 49 static bool fullscreenIsAllowedForAllOwners(const Document& document)
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 } 207 }
206 208
207 // This algorithm is not allowed to show a pop-up: 209 // This algorithm is not allowed to show a pop-up:
208 // An algorithm is allowed to show a pop-up if, in the task in which t he algorithm is running, either: 210 // An algorithm is allowed to show a pop-up if, in the task in which t he algorithm is running, either:
209 // - an activation behavior is currently being processed whose click e vent was trusted, or 211 // - an activation behavior is currently being processed whose click e vent was trusted, or
210 // - the event listener for a trusted click event is being handled. 212 // - the event listener for a trusted click event is being handled.
211 if (!UserGestureIndicator::processingUserGesture()) 213 if (!UserGestureIndicator::processingUserGesture())
212 break; 214 break;
213 215
214 // There is a previously-established user preference, security risk, or platform limitation. 216 // There is a previously-established user preference, security risk, or platform limitation.
217 if (!document()->settings()->fullscreenSupported())
218 break;
219 if (document()->settings()->disallowFullscreenForNonMediaElements() && ! isHTMLMediaElement(element))
220 break;
215 221
216 // 2. Let doc be element's node document. (i.e. "this") 222 // 2. Let doc be element's node document. (i.e. "this")
217 Document* currentDoc = document(); 223 Document* currentDoc = document();
218 224
219 // 3. Let docs be all doc's ancestor browsing context's documents (if an y) and doc. 225 // 3. Let docs be all doc's ancestor browsing context's documents (if an y) and doc.
220 Deque<Document*> docs; 226 Deque<Document*> docs;
221 227
222 do { 228 do {
223 docs.prepend(currentDoc); 229 docs.prepend(currentDoc);
224 currentDoc = currentDoc->ownerElement() ? &currentDoc->ownerElement( )->document() : 0; 230 currentDoc = currentDoc->ownerElement() ? &currentDoc->ownerElement( )->document() : 0;
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 578
573 void FullscreenElementStack::trace(Visitor* visitor) 579 void FullscreenElementStack::trace(Visitor* visitor)
574 { 580 {
575 visitor->trace(m_fullScreenElement); 581 visitor->trace(m_fullScreenElement);
576 visitor->trace(m_fullScreenElementStack); 582 visitor->trace(m_fullScreenElementStack);
577 visitor->trace(m_eventQueue); 583 visitor->trace(m_eventQueue);
578 DocumentSupplement::trace(visitor); 584 DocumentSupplement::trace(visitor);
579 } 585 }
580 586
581 } // namespace blink 587 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fullscreen/full-screen-request-not-supported-expected.txt ('k') | Source/core/frame/Settings.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698