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