| 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 | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All |
| 7 * rights reserved. | 7 * rights reserved. |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 bool allowedToRequestFullscreen(Document& document) { | 81 bool allowedToRequestFullscreen(Document& document) { |
| 82 // An algorithm is allowed to request fullscreen if one of the following is | 82 // An algorithm is allowed to request fullscreen if one of the following is |
| 83 // true: | 83 // true: |
| 84 | 84 |
| 85 // The algorithm is triggered by a user activation. | 85 // The algorithm is triggered by a user activation. |
| 86 if (UserGestureIndicator::utilizeUserGesture()) | 86 if (UserGestureIndicator::utilizeUserGesture()) |
| 87 return true; | 87 return true; |
| 88 | 88 |
| 89 // The algorithm is triggered by a user generated orientation change. | 89 // The algorithm is triggered by a user generated orientation change. |
| 90 if (ScopedOrientationChangeIndicator::processingOrientationChange()) | 90 if (ScopedOrientationChangeIndicator::processingOrientationChange()) { |
| 91 UseCounter::count(document, |
| 92 UseCounter::FullscreenAllowedByOrientationChange); |
| 91 return true; | 93 return true; |
| 94 } |
| 92 | 95 |
| 93 String message = ExceptionMessages::failedToExecute( | 96 String message = ExceptionMessages::failedToExecute( |
| 94 "requestFullscreen", "Element", | 97 "requestFullscreen", "Element", |
| 95 "API can only be initiated by a user gesture."); | 98 "API can only be initiated by a user gesture."); |
| 96 document.addConsoleMessage( | 99 document.addConsoleMessage( |
| 97 ConsoleMessage::create(JSMessageSource, WarningMessageLevel, message)); | 100 ConsoleMessage::create(JSMessageSource, WarningMessageLevel, message)); |
| 98 | 101 |
| 99 return false; | 102 return false; |
| 100 } | 103 } |
| 101 | 104 |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 | 765 |
| 763 DEFINE_TRACE(Fullscreen) { | 766 DEFINE_TRACE(Fullscreen) { |
| 764 visitor->trace(m_currentFullScreenElement); | 767 visitor->trace(m_currentFullScreenElement); |
| 765 visitor->trace(m_fullscreenElementStack); | 768 visitor->trace(m_fullscreenElementStack); |
| 766 visitor->trace(m_eventQueue); | 769 visitor->trace(m_eventQueue); |
| 767 Supplement<Document>::trace(visitor); | 770 Supplement<Document>::trace(visitor); |
| 768 ContextLifecycleObserver::trace(visitor); | 771 ContextLifecycleObserver::trace(visitor); |
| 769 } | 772 } |
| 770 | 773 |
| 771 } // namespace blink | 774 } // namespace blink |
| OLD | NEW |