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

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

Issue 482543002: Ignore fullscreen requests for the current fullscreen element (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/fullscreen/full-screen-twice-newapi-expected.txt ('k') | no next file » | 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 200
201 return true; 201 return true;
202 } 202 }
203 203
204 void Fullscreen::requestFullscreen(Element& element, RequestType requestType) 204 void Fullscreen::requestFullscreen(Element& element, RequestType requestType)
205 { 205 {
206 // Ignore this request if the document is not in a live frame. 206 // Ignore this request if the document is not in a live frame.
207 if (!document()->isActive()) 207 if (!document()->isActive())
208 return; 208 return;
209 209
210 // If |element| is on top of |doc|'s fullscreen element stack, terminate the se substeps.
211 if (&element == fullscreenElement())
212 return;
213
210 do { 214 do {
211 // 1. If any of the following conditions are true, terminate these steps and queue a task to fire 215 // 1. If any of the following conditions are true, terminate these steps and queue a task to fire
212 // an event named fullscreenerror with its bubbles attribute set to true on the context object's 216 // an event named fullscreenerror with its bubbles attribute set to true on the context object's
213 // node document: 217 // node document:
214 218
215 // The fullscreen element ready check returns false. 219 // The fullscreen element ready check returns false.
216 if (!elementReady(element, requestType)) 220 if (!elementReady(element, requestType))
217 break; 221 break;
218 222
219 // This algorithm is not allowed to show a pop-up: 223 // This algorithm is not allowed to show a pop-up:
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 void Fullscreen::trace(Visitor* visitor) 604 void Fullscreen::trace(Visitor* visitor)
601 { 605 {
602 visitor->trace(m_fullScreenElement); 606 visitor->trace(m_fullScreenElement);
603 visitor->trace(m_fullScreenElementStack); 607 visitor->trace(m_fullScreenElementStack);
604 visitor->trace(m_fullScreenRenderer); 608 visitor->trace(m_fullScreenRenderer);
605 visitor->trace(m_eventQueue); 609 visitor->trace(m_eventQueue);
606 DocumentSupplement::trace(visitor); 610 DocumentSupplement::trace(visitor);
607 } 611 }
608 612
609 } // namespace blink 613 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fullscreen/full-screen-twice-newapi-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698