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

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

Issue 356303004: Disallow fullscreen from within <frame>, even with allowfullscreen (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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/resources/not-allowed.html ('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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 namespace WebCore { 43 namespace WebCore {
44 44
45 using namespace HTMLNames; 45 using namespace HTMLNames;
46 46
47 static bool fullscreenIsAllowedForAllOwners(const Document& document) 47 static bool fullscreenIsAllowedForAllOwners(const Document& document)
48 { 48 {
49 const HTMLFrameOwnerElement* owner = document.ownerElement(); 49 const HTMLFrameOwnerElement* owner = document.ownerElement();
50 if (!owner) 50 if (!owner)
51 return true; 51 return true;
52 do { 52 do {
53 if (!isHTMLIFrameElement(owner))
54 return false;
53 if (!owner->hasAttribute(allowfullscreenAttr)) { 55 if (!owner->hasAttribute(allowfullscreenAttr)) {
54 if (owner->hasAttribute(webkitallowfullscreenAttr)) 56 if (owner->hasAttribute(webkitallowfullscreenAttr))
55 UseCounter::count(document, UseCounter::PrefixedAllowFullscreenA ttribute); 57 UseCounter::count(document, UseCounter::PrefixedAllowFullscreenA ttribute);
56 else 58 else
57 return false; 59 return false;
58 } 60 }
59 } while ((owner = owner->document().ownerElement())); 61 } while ((owner = owner->document().ownerElement()));
60 return true; 62 return true;
61 } 63 }
62 64
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 void FullscreenElementStack::trace(Visitor* visitor) 583 void FullscreenElementStack::trace(Visitor* visitor)
582 { 584 {
583 visitor->trace(m_fullScreenElement); 585 visitor->trace(m_fullScreenElement);
584 visitor->trace(m_fullScreenElementStack); 586 visitor->trace(m_fullScreenElementStack);
585 visitor->trace(m_fullScreenChangeEventTargetQueue); 587 visitor->trace(m_fullScreenChangeEventTargetQueue);
586 visitor->trace(m_fullScreenErrorEventTargetQueue); 588 visitor->trace(m_fullScreenErrorEventTargetQueue);
587 DocumentSupplement::trace(visitor); 589 DocumentSupplement::trace(visitor);
588 } 590 }
589 591
590 } // namespace WebCore 592 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fullscreen/resources/not-allowed.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698