| 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 3641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3652 bool HTMLMediaElement::isLockedPendingUserGesture() const | 3652 bool HTMLMediaElement::isLockedPendingUserGesture() const |
| 3653 { | 3653 { |
| 3654 return m_lockedPendingUserGesture; | 3654 return m_lockedPendingUserGesture; |
| 3655 } | 3655 } |
| 3656 | 3656 |
| 3657 void HTMLMediaElement::unlockUserGesture() | 3657 void HTMLMediaElement::unlockUserGesture() |
| 3658 { | 3658 { |
| 3659 m_lockedPendingUserGesture = false; | 3659 m_lockedPendingUserGesture = false; |
| 3660 } | 3660 } |
| 3661 | 3661 |
| 3662 bool HTMLMediaElement::isGestureNeededForPlayback() const | 3662 bool HTMLMediaElement::isGestureNeededForPlayback() |
| 3663 { | 3663 { |
| 3664 return m_lockedPendingUserGesture | 3664 if (!m_lockedPendingUserGesture) |
| 3665 && !m_autoplayHelper->isGestureRequirementOverridden(); | 3665 return false; |
| 3666 |
| 3667 if (muted() && RuntimeEnabledFeatures::videosAsImagesEnabled()) |
| 3668 return false; |
| 3669 |
| 3670 if (m_autoplayHelper->isGestureRequirementOverridden()) |
| 3671 return false; |
| 3672 |
| 3673 return true; |
| 3666 } | 3674 } |
| 3667 | 3675 |
| 3668 void HTMLMediaElement::setNetworkState(NetworkState state) | 3676 void HTMLMediaElement::setNetworkState(NetworkState state) |
| 3669 { | 3677 { |
| 3670 if (m_networkState != state) { | 3678 if (m_networkState != state) { |
| 3671 m_networkState = state; | 3679 m_networkState = state; |
| 3672 if (MediaControls* controls = mediaControls()) | 3680 if (MediaControls* controls = mediaControls()) |
| 3673 controls->networkStateChanged(); | 3681 controls->networkStateChanged(); |
| 3674 } | 3682 } |
| 3675 } | 3683 } |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3881 | 3889 |
| 3882 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co
nst | 3890 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co
nst |
| 3883 { | 3891 { |
| 3884 IntRect result; | 3892 IntRect result; |
| 3885 if (LayoutObject* object = m_element->layoutObject()) | 3893 if (LayoutObject* object = m_element->layoutObject()) |
| 3886 result = object->absoluteBoundingBoxRect(); | 3894 result = object->absoluteBoundingBoxRect(); |
| 3887 return result; | 3895 return result; |
| 3888 } | 3896 } |
| 3889 | 3897 |
| 3890 } // namespace blink | 3898 } // namespace blink |
| OLD | NEW |