| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 3655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3666 return m_lockedPendingUserGesture; | 3666 return m_lockedPendingUserGesture; |
| 3667 } | 3667 } |
| 3668 | 3668 |
| 3669 void HTMLMediaElement::unlockUserGesture() | 3669 void HTMLMediaElement::unlockUserGesture() |
| 3670 { | 3670 { |
| 3671 m_lockedPendingUserGesture = false; | 3671 m_lockedPendingUserGesture = false; |
| 3672 } | 3672 } |
| 3673 | 3673 |
| 3674 bool HTMLMediaElement::isGestureNeededForPlayback() const | 3674 bool HTMLMediaElement::isGestureNeededForPlayback() const |
| 3675 { | 3675 { |
| 3676 return m_lockedPendingUserGesture | 3676 if (!m_lockedPendingUserGesture) |
| 3677 && !m_autoplayHelper->isGestureRequirementOverridden(); | 3677 return false; |
| 3678 |
| 3679 if (muted() && RuntimeEnabledFeatures::autoplayMutedVideosEnabled()) |
| 3680 return false; |
| 3681 |
| 3682 if (m_autoplayHelper->isGestureRequirementOverridden()) |
| 3683 return false; |
| 3684 |
| 3685 return true; |
| 3678 } | 3686 } |
| 3679 | 3687 |
| 3680 void HTMLMediaElement::setNetworkState(NetworkState state) | 3688 void HTMLMediaElement::setNetworkState(NetworkState state) |
| 3681 { | 3689 { |
| 3682 if (m_networkState != state) { | 3690 if (m_networkState != state) { |
| 3683 m_networkState = state; | 3691 m_networkState = state; |
| 3684 if (MediaControls* controls = mediaControls()) | 3692 if (MediaControls* controls = mediaControls()) |
| 3685 controls->networkStateChanged(); | 3693 controls->networkStateChanged(); |
| 3686 } | 3694 } |
| 3687 } | 3695 } |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3918 | 3926 |
| 3919 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co
nst | 3927 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co
nst |
| 3920 { | 3928 { |
| 3921 IntRect result; | 3929 IntRect result; |
| 3922 if (LayoutObject* object = m_element->layoutObject()) | 3930 if (LayoutObject* object = m_element->layoutObject()) |
| 3923 result = object->absoluteBoundingBoxRect(); | 3931 result = object->absoluteBoundingBoxRect(); |
| 3924 return result; | 3932 return result; |
| 3925 } | 3933 } |
| 3926 | 3934 |
| 3927 } // namespace blink | 3935 } // namespace blink |
| OLD | NEW |