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

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

Issue 600773002: Notify in console when an API fails because it needs to be invoked on user action. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 // node document: 224 // node document:
225 225
226 // The fullscreen element ready check returns false. 226 // The fullscreen element ready check returns false.
227 if (!fullscreenElementReady(element, requestType)) 227 if (!fullscreenElementReady(element, requestType))
228 break; 228 break;
229 229
230 // This algorithm is not allowed to show a pop-up: 230 // This algorithm is not allowed to show a pop-up:
231 // An algorithm is allowed to show a pop-up if, in the task in which t he algorithm is running, either: 231 // An algorithm is allowed to show a pop-up if, in the task in which t he algorithm is running, either:
232 // - an activation behavior is currently being processed whose click e vent was trusted, or 232 // - an activation behavior is currently being processed whose click e vent was trusted, or
233 // - the event listener for a trusted click event is being handled. 233 // - the event listener for a trusted click event is being handled.
234 if (!UserGestureIndicator::processingUserGesture()) 234 if (!UserGestureIndicator::processingUserGesture()) {
235 document()->executionContext()->addConsoleMessage(ConsoleMessage::cr eate(JSMessageSource, WarningMessageLevel,
236 "Permission denied for requestFullScreen() as it was invoked by script, without any user interaction involved!"));
meacer 2014/09/24 17:59:21 The message sounds a bit verbose. You might want t
Mayur Kankanwadi 2014/09/25 06:43:01 Done.
237
235 break; 238 break;
239 }
236 240
237 // Fullscreen is not supported. 241 // Fullscreen is not supported.
238 if (!fullscreenIsSupported(element.document(), element)) 242 if (!fullscreenIsSupported(element.document(), element))
239 break; 243 break;
240 244
241 // 2. Let doc be element's node document. (i.e. "this") 245 // 2. Let doc be element's node document. (i.e. "this")
242 Document* currentDoc = document(); 246 Document* currentDoc = document();
243 247
244 // 3. Let docs be all doc's ancestor browsing context's documents (if an y) and doc. 248 // 3. Let docs be all doc's ancestor browsing context's documents (if an y) and doc.
245 Deque<Document*> docs; 249 Deque<Document*> docs;
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 void Fullscreen::trace(Visitor* visitor) 607 void Fullscreen::trace(Visitor* visitor)
604 { 608 {
605 visitor->trace(m_fullScreenElement); 609 visitor->trace(m_fullScreenElement);
606 visitor->trace(m_fullScreenElementStack); 610 visitor->trace(m_fullScreenElementStack);
607 visitor->trace(m_fullScreenRenderer); 611 visitor->trace(m_fullScreenRenderer);
608 visitor->trace(m_eventQueue); 612 visitor->trace(m_eventQueue);
609 DocumentSupplement::trace(visitor); 613 DocumentSupplement::trace(visitor);
610 } 614 }
611 615
612 } // namespace blink 616 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/page/PointerLockController.cpp » ('j') | Source/core/page/PointerLockController.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698