| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 break; | 166 break; |
| 167 | 167 |
| 168 // The context object's node document, or an ancestor browsing context's
document does not have | 168 // The context object's node document, or an ancestor browsing context's
document does not have |
| 169 // the fullscreen enabled flag set. | 169 // the fullscreen enabled flag set. |
| 170 if (requestType != PrefixedVideoRequest && !fullscreenIsAllowedForAllOwn
ers(element.document())) | 170 if (requestType != PrefixedVideoRequest && !fullscreenIsAllowedForAllOwn
ers(element.document())) |
| 171 break; | 171 break; |
| 172 | 172 |
| 173 // The context object's node document fullscreen element stack is not em
pty and its top element | 173 // The context object's node document fullscreen element stack is not em
pty and its top element |
| 174 // is not an ancestor of the context object. (NOTE: Ignore this requirem
ent if the request was | 174 // is not an ancestor of the context object. (NOTE: Ignore this requirem
ent if the request was |
| 175 // made via the legacy Mozilla-style API.) | 175 // made via the legacy Mozilla-style API.) |
| 176 if (!m_fullScreenElementStack.isEmpty()) { | 176 if (Element* lastElementOnStack = fullscreenElement()) { |
| 177 Element* lastElementOnStack = m_fullScreenElementStack.last().get(); | 177 if (!element.isDescendantOf(lastElementOnStack)) { |
| 178 if (lastElementOnStack == &element || !lastElementOnStack->contains(
&element)) { | |
| 179 if (inLegacyMozillaMode) | 178 if (inLegacyMozillaMode) |
| 180 UseCounter::count(element.document(), UseCounter::LegacyFull
ScreenErrorExemption); | 179 UseCounter::count(element.document(), UseCounter::LegacyFull
ScreenErrorExemption); |
| 181 else | 180 else |
| 182 break; | 181 break; |
| 183 } | 182 } |
| 184 } | 183 } |
| 185 | 184 |
| 186 // A descendant browsing context's document has a non-empty fullscreen e
lement stack. | 185 // A descendant browsing context's document has a non-empty fullscreen e
lement stack. |
| 187 bool descendentHasNonEmptyStack = false; | 186 bool descendentHasNonEmptyStack = false; |
| 188 for (Frame* descendant = document()->frame() ? document()->frame()->tree
().traverseNext() : 0; descendant; descendant = descendant->tree().traverseNext(
)) { | 187 for (Frame* descendant = document()->frame() ? document()->frame()->tree
().traverseNext() : 0; descendant; descendant = descendant->tree().traverseNext(
)) { |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 | 568 |
| 570 void FullscreenElementStack::trace(Visitor* visitor) | 569 void FullscreenElementStack::trace(Visitor* visitor) |
| 571 { | 570 { |
| 572 visitor->trace(m_fullScreenElement); | 571 visitor->trace(m_fullScreenElement); |
| 573 visitor->trace(m_fullScreenElementStack); | 572 visitor->trace(m_fullScreenElementStack); |
| 574 visitor->trace(m_eventQueue); | 573 visitor->trace(m_eventQueue); |
| 575 DocumentSupplement::trace(visitor); | 574 DocumentSupplement::trace(visitor); |
| 576 } | 575 } |
| 577 | 576 |
| 578 } // namespace WebCore | 577 } // namespace WebCore |
| OLD | NEW |