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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 { | 119 { |
120 m_fullScreenChangeEventTargetQueue.clear(); | 120 m_fullScreenChangeEventTargetQueue.clear(); |
121 m_fullScreenErrorEventTargetQueue.clear(); | 121 m_fullScreenErrorEventTargetQueue.clear(); |
122 | 122 |
123 if (m_fullScreenRenderer) | 123 if (m_fullScreenRenderer) |
124 setFullScreenRenderer(0); | 124 setFullScreenRenderer(0); |
125 } | 125 } |
126 | 126 |
127 void FullscreenElementStack::documentWasDisposed() | 127 void FullscreenElementStack::documentWasDisposed() |
128 { | 128 { |
129 m_fullScreenElement = 0; | 129 m_fullScreenElement = nullptr; |
130 m_fullScreenElementStack.clear(); | 130 m_fullScreenElementStack.clear(); |
131 } | 131 } |
132 | 132 |
133 bool FullscreenElementStack::fullScreenIsAllowedForElement(Element* element) con
st | 133 bool FullscreenElementStack::fullScreenIsAllowedForElement(Element* element) con
st |
134 { | 134 { |
135 ASSERT(element); | 135 ASSERT(element); |
136 return isAttributeOnAllOwners(allowfullscreenAttr, webkitallowfullscreenAttr
, element->document().ownerElement()); | 136 return isAttributeOnAllOwners(allowfullscreenAttr, webkitallowfullscreenAttr
, element->document().ownerElement()); |
137 } | 137 } |
138 | 138 |
139 void FullscreenElementStack::requestFullScreenForElement(Element* element, unsig
ned short flags, FullScreenCheckType checkType) | 139 void FullscreenElementStack::requestFullScreenForElement(Element* element, unsig
ned short flags, FullScreenCheckType checkType) |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 if (!document()->isActive()) | 426 if (!document()->isActive()) |
427 return; | 427 return; |
428 | 428 |
429 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou
ndaries(false); | 429 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou
ndaries(false); |
430 | 430 |
431 m_areKeysEnabledInFullScreen = false; | 431 m_areKeysEnabledInFullScreen = false; |
432 | 432 |
433 if (m_fullScreenRenderer) | 433 if (m_fullScreenRenderer) |
434 m_fullScreenRenderer->unwrapRenderer(); | 434 m_fullScreenRenderer->unwrapRenderer(); |
435 | 435 |
436 m_fullScreenElement = 0; | 436 m_fullScreenElement = nullptr; |
437 document()->setNeedsStyleRecalc(SubtreeStyleChange); | 437 document()->setNeedsStyleRecalc(SubtreeStyleChange); |
438 | 438 |
439 // When webkitCancelFullScreen is called, we call webkitExitFullScreen on th
e topDocument(). That | 439 // When webkitCancelFullScreen is called, we call webkitExitFullScreen on th
e topDocument(). That |
440 // means that the events will be queued there. So if we have no events here,
start the timer on | 440 // means that the events will be queued there. So if we have no events here,
start the timer on |
441 // the exiting document. | 441 // the exiting document. |
442 Document* exitingDocument = document(); | 442 Document* exitingDocument = document(); |
443 if (m_fullScreenChangeEventTargetQueue.isEmpty() && m_fullScreenErrorEventTa
rgetQueue.isEmpty()) | 443 if (m_fullScreenChangeEventTargetQueue.isEmpty() && m_fullScreenErrorEventTa
rgetQueue.isEmpty()) |
444 exitingDocument = document()->topDocument(); | 444 exitingDocument = document()->topDocument(); |
445 ASSERT(exitingDocument); | 445 ASSERT(exitingDocument); |
446 from(*exitingDocument).m_fullScreenChangeDelayTimer.startOneShot(0); | 446 from(*exitingDocument).m_fullScreenChangeDelayTimer.startOneShot(0); |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 if (!target) | 567 if (!target) |
568 target = fullscreen->webkitCurrentFullScreenElement(); | 568 target = fullscreen->webkitCurrentFullScreenElement(); |
569 } | 569 } |
570 | 570 |
571 if (!target) | 571 if (!target) |
572 target = doc; | 572 target = doc; |
573 m_fullScreenChangeEventTargetQueue.append(target); | 573 m_fullScreenChangeEventTargetQueue.append(target); |
574 } | 574 } |
575 | 575 |
576 } // namespace WebCore | 576 } // namespace WebCore |
OLD | NEW |