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

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: 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
« no previous file with comments | « no previous file | Source/core/loader/EmptyClients.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 { 141 {
142 // NOTE: the context dispose phase is not supported in oilpan. Please 142 // NOTE: the context dispose phase is not supported in oilpan. Please
143 // consider using the detach phase instead. 143 // consider using the detach phase instead.
144 m_fullScreenElement = nullptr; 144 m_fullScreenElement = nullptr;
145 m_fullScreenElementStack.clear(); 145 m_fullScreenElementStack.clear();
146 } 146 }
147 #endif 147 #endif
148 148
149 void FullscreenElementStack::requestFullScreenForElement(Element& element, Reque stType requestType) 149 void FullscreenElementStack::requestFullScreenForElement(Element& element, Reque stType requestType)
150 { 150 {
151 if (!document()->frameHost()->chrome().client().fullscreenEnabled(&element)) {
philipj_slow 2014/07/29 11:22:53 This needs to be in the do { } while(0) loop below
Ignacio Solla 2014/07/29 18:05:58 I have moved this inside the while loop as you rec
152 return;
153 }
154
151 // Ignore this request if the document is not in a live frame. 155 // Ignore this request if the document is not in a live frame.
152 if (!document()->isActive()) 156 if (!document()->isActive())
153 return; 157 return;
154 158
155 // The Mozilla Full Screen API <https://wiki.mozilla.org/Gecko:FullScreenAPI > has different requirements 159 // The Mozilla Full Screen API <https://wiki.mozilla.org/Gecko:FullScreenAPI > has different requirements
156 // for full screen mode, and do not have the concept of a full screen elemen t stack. 160 // for full screen mode, and do not have the concept of a full screen elemen t stack.
157 bool inLegacyMozillaMode = requestType == PrefixedMozillaRequest || requestT ype == PrefixedMozillaAllowKeyboardInputRequest; 161 bool inLegacyMozillaMode = requestType == PrefixedMozillaRequest || requestT ype == PrefixedMozillaAllowKeyboardInputRequest;
158 162
159 do { 163 do {
160 // 1. If any of the following conditions are true, terminate these steps and queue a task to fire 164 // 1. If any of the following conditions are true, terminate these steps and queue a task to fire
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 enqueueChangeEvent(*currentDoc); 259 enqueueChangeEvent(*currentDoc);
256 continue; 260 continue;
257 } 261 }
258 262
259 // 4. Otherwise, do nothing for this document. It stays the same. 263 // 4. Otherwise, do nothing for this document. It stays the same.
260 } while (++current != docs.end()); 264 } while (++current != docs.end());
261 265
262 // 5. Return, and run the remaining steps asynchronously. 266 // 5. Return, and run the remaining steps asynchronously.
263 // 6. Optionally, perform some animation. 267 // 6. Optionally, perform some animation.
264 m_areKeysEnabledInFullScreen = requestType != PrefixedMozillaRequest && requestType != PrefixedVideoRequest; 268 m_areKeysEnabledInFullScreen = requestType != PrefixedMozillaRequest && requestType != PrefixedVideoRequest;
269
philipj_slow 2014/07/29 11:22:53 stray newline
Ignacio Solla 2014/07/29 18:05:58 Done.
265 document()->frameHost()->chrome().client().enterFullScreenForElement(&el ement); 270 document()->frameHost()->chrome().client().enterFullScreenForElement(&el ement);
266 271
267 // 7. Optionally, display a message indicating how the user can exit dis playing the context object fullscreen. 272 // 7. Optionally, display a message indicating how the user can exit dis playing the context object fullscreen.
268 return; 273 return;
269 } while (0); 274 } while (0);
270 275
271 enqueueErrorEvent(element); 276 enqueueErrorEvent(element);
272 } 277 }
273 278
274 void FullscreenElementStack::fullyExitFullscreen() 279 void FullscreenElementStack::fullyExitFullscreen()
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 577
573 void FullscreenElementStack::trace(Visitor* visitor) 578 void FullscreenElementStack::trace(Visitor* visitor)
574 { 579 {
575 visitor->trace(m_fullScreenElement); 580 visitor->trace(m_fullScreenElement);
576 visitor->trace(m_fullScreenElementStack); 581 visitor->trace(m_fullScreenElementStack);
577 visitor->trace(m_eventQueue); 582 visitor->trace(m_eventQueue);
578 DocumentSupplement::trace(visitor); 583 DocumentSupplement::trace(visitor);
579 } 584 }
580 585
581 } // namespace blink 586 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/loader/EmptyClients.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698