Chromium Code Reviews| 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 17 matching lines...) Expand all Loading... | |
| 28 #include "config.h" | 28 #include "config.h" |
| 29 #include "core/dom/FullscreenElementStack.h" | 29 #include "core/dom/FullscreenElementStack.h" |
| 30 | 30 |
| 31 #include "HTMLNames.h" | 31 #include "HTMLNames.h" |
| 32 #include "core/dom/Document.h" | 32 #include "core/dom/Document.h" |
| 33 #include "core/events/Event.h" | 33 #include "core/events/Event.h" |
| 34 #include "core/frame/FrameHost.h" | 34 #include "core/frame/FrameHost.h" |
| 35 #include "core/frame/LocalFrame.h" | 35 #include "core/frame/LocalFrame.h" |
| 36 #include "core/frame/Settings.h" | 36 #include "core/frame/Settings.h" |
| 37 #include "core/html/HTMLFrameOwnerElement.h" | 37 #include "core/html/HTMLFrameOwnerElement.h" |
| 38 #include "core/html/HTMLMediaElement.h" | |
| 38 #include "core/page/Chrome.h" | 39 #include "core/page/Chrome.h" |
| 39 #include "core/page/ChromeClient.h" | 40 #include "core/page/ChromeClient.h" |
| 40 #include "core/rendering/RenderFullScreen.h" | 41 #include "core/rendering/RenderFullScreen.h" |
| 41 #include "platform/UserGestureIndicator.h" | 42 #include "platform/UserGestureIndicator.h" |
| 42 | 43 |
| 43 namespace WebCore { | 44 namespace WebCore { |
| 44 | 45 |
| 45 using namespace HTMLNames; | 46 using namespace HTMLNames; |
| 46 | 47 |
| 47 static bool isAttributeOnAllOwners(const WebCore::QualifiedName& attribute, cons t WebCore::QualifiedName& prefixedAttribute, const HTMLFrameOwnerElement* owner) | 48 static bool isAttributeOnAllOwners(const WebCore::QualifiedName& attribute, cons t WebCore::QualifiedName& prefixedAttribute, const HTMLFrameOwnerElement* owner) |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 182 } | 183 } |
| 183 } | 184 } |
| 184 if (descendentHasNonEmptyStack && !inLegacyMozillaMode) | 185 if (descendentHasNonEmptyStack && !inLegacyMozillaMode) |
| 185 break; | 186 break; |
| 186 | 187 |
| 187 // This algorithm is not allowed to show a pop-up: | 188 // This algorithm is not allowed to show a pop-up: |
| 188 // An algorithm is allowed to show a pop-up if, in the task in which t he algorithm is running, either: | 189 // An algorithm is allowed to show a pop-up if, in the task in which t he algorithm is running, either: |
| 189 // - an activation behavior is currently being processed whose click e vent was trusted, or | 190 // - an activation behavior is currently being processed whose click e vent was trusted, or |
| 190 // - the event listener for a trusted click event is being handled. | 191 // - the event listener for a trusted click event is being handled. |
| 191 // FIXME: Does this need to null-check settings()? | 192 // FIXME: Does this need to null-check settings()? |
| 192 if (!UserGestureIndicator::processingUserGesture() && (!element->isMedia Element() || document()->settings()->mediaFullscreenRequiresUserGesture())) | 193 if (!UserGestureIndicator::processingUserGesture() && (!isHTMLMediaEleme nt(element) || document()->settings()->mediaFullscreenRequiresUserGesture())) |
|
Inactive
2014/03/13 18:46:24
Ditto
| |
| 193 break; | 194 break; |
| 194 | 195 |
| 195 // There is a previously-established user preference, security risk, or platform limitation. | 196 // There is a previously-established user preference, security risk, or platform limitation. |
| 196 if (!document()->settings() || !document()->settings()->fullScreenEnable d()) | 197 if (!document()->settings() || !document()->settings()->fullScreenEnable d()) |
| 197 break; | 198 break; |
| 198 | 199 |
| 199 // 2. Let doc be element's node document. (i.e. "this") | 200 // 2. Let doc be element's node document. (i.e. "this") |
| 200 Document* currentDoc = document(); | 201 Document* currentDoc = document(); |
| 201 | 202 |
| 202 // 3. Let docs be all doc's ancestor browsing context's documents (if an y) and doc. | 203 // 3. Let docs be all doc's ancestor browsing context's documents (if an y) and doc. |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 570 if (!target) | 571 if (!target) |
| 571 target = fullscreen->webkitCurrentFullScreenElement(); | 572 target = fullscreen->webkitCurrentFullScreenElement(); |
| 572 } | 573 } |
| 573 | 574 |
| 574 if (!target) | 575 if (!target) |
| 575 target = doc; | 576 target = doc; |
| 576 m_fullScreenChangeEventTargetQueue.append(target); | 577 m_fullScreenChangeEventTargetQueue.append(target); |
| 577 } | 578 } |
| 578 | 579 |
| 579 } // namespace WebCore | 580 } // namespace WebCore |
| OLD | NEW |