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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 if (!owner->hasAttribute(allowfullscreenAttr)) | 54 if (!owner->hasAttribute(allowfullscreenAttr)) |
55 return false; | 55 return false; |
56 } | 56 } |
57 return true; | 57 return true; |
58 } | 58 } |
59 | 59 |
60 static bool fullscreenIsSupported(const Document& document) | 60 static bool fullscreenIsSupported(const Document& document) |
61 { | 61 { |
62 // Fullscreen is supported if there is no previously-established user prefer
ence, | 62 // Fullscreen is supported if there is no previously-established user prefer
ence, |
63 // security risk, or platform limitation. | 63 // security risk, or platform limitation. |
64 return document.settings()->fullscreenSupported(); | 64 return !document.settings() || document.settings()->fullscreenSupported(); |
65 } | 65 } |
66 | 66 |
67 static bool fullscreenIsSupported(const Document& document, const Element& eleme
nt) | 67 static bool fullscreenIsSupported(const Document& document, const Element& eleme
nt) |
68 { | 68 { |
69 if (document.settings()->disallowFullscreenForNonMediaElements() && !isHTMLM
ediaElement(element)) | 69 if (!document.settings() || (document.settings()->disallowFullscreenForNonMe
diaElements() && !isHTMLMediaElement(element))) |
70 return false; | 70 return false; |
71 return fullscreenIsSupported(document); | 71 return fullscreenIsSupported(document); |
72 } | 72 } |
73 | 73 |
74 static PassRefPtrWillBeRawPtr<Event> createEvent(const AtomicString& type, Event
Target& target) | 74 static PassRefPtrWillBeRawPtr<Event> createEvent(const AtomicString& type, Event
Target& target) |
75 { | 75 { |
76 RefPtrWillBeRawPtr<Event> event = Event::createBubble(type); | 76 RefPtrWillBeRawPtr<Event> event = Event::createBubble(type); |
77 event->setTarget(&target); | 77 event->setTarget(&target); |
78 return event; | 78 return event; |
79 } | 79 } |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 | 590 |
591 void FullscreenElementStack::trace(Visitor* visitor) | 591 void FullscreenElementStack::trace(Visitor* visitor) |
592 { | 592 { |
593 visitor->trace(m_fullScreenElement); | 593 visitor->trace(m_fullScreenElement); |
594 visitor->trace(m_fullScreenElementStack); | 594 visitor->trace(m_fullScreenElementStack); |
595 visitor->trace(m_eventQueue); | 595 visitor->trace(m_eventQueue); |
596 DocumentSupplement::trace(visitor); | 596 DocumentSupplement::trace(visitor); |
597 } | 597 } |
598 | 598 |
599 } // namespace blink | 599 } // namespace blink |
OLD | NEW |