OLD | NEW |
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 namespace blink { | 50 namespace blink { |
51 | 51 |
52 using namespace HTMLNames; | 52 using namespace HTMLNames; |
53 | 53 |
54 static bool fullscreenIsAllowedForAllOwners(const Document& document) | 54 static bool fullscreenIsAllowedForAllOwners(const Document& document) |
55 { | 55 { |
56 if (!document.frame()) | 56 if (!document.frame()) |
57 return false; | 57 return false; |
58 | 58 |
59 for (const Frame* frame = document.frame(); frame->owner(); frame = frame->t
ree().parent()) { | 59 for (const Frame* frame = document.frame(); frame->owner(); frame = frame->t
ree().parent()) { |
60 // TODO(alexmos): The allowfullscreen attribute will need to be | 60 if (!frame->owner()->allowFullscreen()) |
61 // replicated for this to work with OOPIFs. For now, deny fullscreen | |
62 // access inside OOPIFs until https://crbug.com/550497 is fixed. | |
63 if (frame->owner()->isRemote()) | |
64 return false; | |
65 | |
66 HTMLFrameOwnerElement* owner = toHTMLFrameOwnerElement(frame->owner()); | |
67 if (!isHTMLIFrameElement(owner)) | |
68 return false; | |
69 if (!owner->hasAttribute(allowfullscreenAttr)) | |
70 return false; | 61 return false; |
71 } | 62 } |
72 return true; | 63 return true; |
73 } | 64 } |
74 | 65 |
75 static bool fullscreenIsSupported(const Document& document) | 66 static bool fullscreenIsSupported(const Document& document) |
76 { | 67 { |
77 // Fullscreen is supported if there is no previously-established user prefer
ence, | 68 // Fullscreen is supported if there is no previously-established user prefer
ence, |
78 // security risk, or platform limitation. | 69 // security risk, or platform limitation. |
79 return !document.settings() || document.settings()->fullscreenSupported(); | 70 return !document.settings() || document.settings()->fullscreenSupported(); |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 DEFINE_TRACE(Fullscreen) | 598 DEFINE_TRACE(Fullscreen) |
608 { | 599 { |
609 visitor->trace(m_fullScreenElement); | 600 visitor->trace(m_fullScreenElement); |
610 visitor->trace(m_fullScreenElementStack); | 601 visitor->trace(m_fullScreenElementStack); |
611 visitor->trace(m_eventQueue); | 602 visitor->trace(m_eventQueue); |
612 Supplement<Document>::trace(visitor); | 603 Supplement<Document>::trace(visitor); |
613 ContextLifecycleObserver::trace(visitor); | 604 ContextLifecycleObserver::trace(visitor); |
614 } | 605 } |
615 | 606 |
616 } // namespace blink | 607 } // namespace blink |
OLD | NEW |