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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 | 609 |
610 return canPlay; | 610 return canPlay; |
611 } | 611 } |
612 | 612 |
613 void HTMLMediaElement::load() | 613 void HTMLMediaElement::load() |
614 { | 614 { |
615 RefPtr<HTMLMediaElement> protect(this); // loadInternal may result in a 'bef
oreload' event, which can make arbitrary DOM mutations. | 615 RefPtr<HTMLMediaElement> protect(this); // loadInternal may result in a 'bef
oreload' event, which can make arbitrary DOM mutations. |
616 | 616 |
617 LOG(Media, "HTMLMediaElement::load()"); | 617 LOG(Media, "HTMLMediaElement::load()"); |
618 | 618 |
| 619 if (document().settings() && !document().settings()->mediaEnabled()) |
| 620 return; |
| 621 |
619 if (userGestureRequiredForLoad() && !UserGestureIndicator::processingUserGes
ture()) | 622 if (userGestureRequiredForLoad() && !UserGestureIndicator::processingUserGes
ture()) |
620 return; | 623 return; |
621 | 624 |
622 m_loadInitiatedByUserGesture = UserGestureIndicator::processingUserGesture()
; | 625 m_loadInitiatedByUserGesture = UserGestureIndicator::processingUserGesture()
; |
623 if (m_loadInitiatedByUserGesture) | 626 if (m_loadInitiatedByUserGesture) |
624 removeBehaviorsRestrictionsAfterFirstUserGesture(); | 627 removeBehaviorsRestrictionsAfterFirstUserGesture(); |
625 prepareForLoad(); | 628 prepareForLoad(); |
626 loadInternal(); | 629 loadInternal(); |
627 prepareToPlay(); | 630 prepareToPlay(); |
628 } | 631 } |
(...skipping 3239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3868 { | 3871 { |
3869 scheduleLayerUpdate(); | 3872 scheduleLayerUpdate(); |
3870 } | 3873 } |
3871 | 3874 |
3872 bool HTMLMediaElement::isInteractiveContent() const | 3875 bool HTMLMediaElement::isInteractiveContent() const |
3873 { | 3876 { |
3874 return fastHasAttribute(controlsAttr); | 3877 return fastHasAttribute(controlsAttr); |
3875 } | 3878 } |
3876 | 3879 |
3877 } | 3880 } |
OLD | NEW |