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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 break; | 167 break; |
168 | 168 |
169 // The context object's node document, or an ancestor browsing context's
document does not have | 169 // The context object's node document, or an ancestor browsing context's
document does not have |
170 // the fullscreen enabled flag set. | 170 // the fullscreen enabled flag set. |
171 if (requestType != PrefixedVideoRequest && !fullscreenIsAllowedForAllOwn
ers(element.document())) | 171 if (requestType != PrefixedVideoRequest && !fullscreenIsAllowedForAllOwn
ers(element.document())) |
172 break; | 172 break; |
173 | 173 |
174 // The context object's node document fullscreen element stack is not em
pty and its top element | 174 // The context object's node document fullscreen element stack is not em
pty and its top element |
175 // is not an ancestor of the context object. (NOTE: Ignore this requirem
ent if the request was | 175 // is not an ancestor of the context object. (NOTE: Ignore this requirem
ent if the request was |
176 // made via the legacy Mozilla-style API.) | 176 // made via the legacy Mozilla-style API.) |
177 if (!m_fullScreenElementStack.isEmpty() && !inLegacyMozillaMode) { | 177 if (!m_fullScreenElementStack.isEmpty()) { |
178 Element* lastElementOnStack = m_fullScreenElementStack.last().get(); | 178 Element* lastElementOnStack = m_fullScreenElementStack.last().get(); |
179 if (lastElementOnStack == &element || !lastElementOnStack->contains(
&element)) | 179 if (lastElementOnStack == &element || !lastElementOnStack->contains(
&element)) { |
180 break; | 180 if (inLegacyMozillaMode) |
| 181 UseCounter::count(element.document(), UseCounter::LegacyFull
ScreenErrorExemption); |
| 182 else |
| 183 break; |
| 184 } |
181 } | 185 } |
182 | 186 |
183 // A descendant browsing context's document has a non-empty fullscreen e
lement stack. | 187 // A descendant browsing context's document has a non-empty fullscreen e
lement stack. |
184 bool descendentHasNonEmptyStack = false; | 188 bool descendentHasNonEmptyStack = false; |
185 for (Frame* descendant = document()->frame() ? document()->frame()->tree
().traverseNext() : 0; descendant; descendant = descendant->tree().traverseNext(
)) { | 189 for (Frame* descendant = document()->frame() ? document()->frame()->tree
().traverseNext() : 0; descendant; descendant = descendant->tree().traverseNext(
)) { |
186 if (!descendant->isLocalFrame()) | 190 if (!descendant->isLocalFrame()) |
187 continue; | 191 continue; |
188 ASSERT(toLocalFrame(descendant)->document()); | 192 ASSERT(toLocalFrame(descendant)->document()); |
189 if (fullscreenElementFrom(*toLocalFrame(descendant)->document())) { | 193 if (fullscreenElementFrom(*toLocalFrame(descendant)->document())) { |
190 descendentHasNonEmptyStack = true; | 194 descendentHasNonEmptyStack = true; |
191 break; | 195 break; |
192 } | 196 } |
193 } | 197 } |
194 if (descendentHasNonEmptyStack && !inLegacyMozillaMode) | 198 if (descendentHasNonEmptyStack) { |
195 break; | 199 if (inLegacyMozillaMode) |
| 200 UseCounter::count(element.document(), UseCounter::LegacyFullScre
enErrorExemption); |
| 201 else |
| 202 break; |
| 203 } |
196 | 204 |
197 // This algorithm is not allowed to show a pop-up: | 205 // This algorithm is not allowed to show a pop-up: |
198 // An algorithm is allowed to show a pop-up if, in the task in which t
he algorithm is running, either: | 206 // An algorithm is allowed to show a pop-up if, in the task in which t
he algorithm is running, either: |
199 // - an activation behavior is currently being processed whose click e
vent was trusted, or | 207 // - an activation behavior is currently being processed whose click e
vent was trusted, or |
200 // - the event listener for a trusted click event is being handled. | 208 // - the event listener for a trusted click event is being handled. |
201 if (!UserGestureIndicator::processingUserGesture()) | 209 if (!UserGestureIndicator::processingUserGesture()) |
202 break; | 210 break; |
203 | 211 |
204 // There is a previously-established user preference, security risk, or
platform limitation. | 212 // There is a previously-established user preference, security risk, or
platform limitation. |
205 | 213 |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 void FullscreenElementStack::trace(Visitor* visitor) | 590 void FullscreenElementStack::trace(Visitor* visitor) |
583 { | 591 { |
584 visitor->trace(m_fullScreenElement); | 592 visitor->trace(m_fullScreenElement); |
585 visitor->trace(m_fullScreenElementStack); | 593 visitor->trace(m_fullScreenElementStack); |
586 visitor->trace(m_fullScreenChangeEventTargetQueue); | 594 visitor->trace(m_fullScreenChangeEventTargetQueue); |
587 visitor->trace(m_fullScreenErrorEventTargetQueue); | 595 visitor->trace(m_fullScreenErrorEventTargetQueue); |
588 DocumentSupplement::trace(visitor); | 596 DocumentSupplement::trace(visitor); |
589 } | 597 } |
590 | 598 |
591 } // namespace WebCore | 599 } // namespace WebCore |
OLD | NEW |