| 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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 | 615 |
| 616 return canPlay; | 616 return canPlay; |
| 617 } | 617 } |
| 618 | 618 |
| 619 void HTMLMediaElement::load() | 619 void HTMLMediaElement::load() |
| 620 { | 620 { |
| 621 RefPtr<HTMLMediaElement> protect(this); // loadInternal may result in a 'bef
oreload' event, which can make arbitrary DOM mutations. | 621 RefPtr<HTMLMediaElement> protect(this); // loadInternal may result in a 'bef
oreload' event, which can make arbitrary DOM mutations. |
| 622 | 622 |
| 623 WTF_LOG(Media, "HTMLMediaElement::load()"); | 623 WTF_LOG(Media, "HTMLMediaElement::load()"); |
| 624 | 624 |
| 625 if (document().settings() && !document().settings()->mediaEnabled()) | |
| 626 return; | |
| 627 | |
| 628 if (UserGestureIndicator::processingUserGesture()) | 625 if (UserGestureIndicator::processingUserGesture()) |
| 629 removeBehaviorsRestrictionsAfterFirstUserGesture(); | 626 removeBehaviorsRestrictionsAfterFirstUserGesture(); |
| 630 | 627 |
| 631 prepareForLoad(); | 628 prepareForLoad(); |
| 632 loadInternal(); | 629 loadInternal(); |
| 633 prepareToPlay(); | 630 prepareToPlay(); |
| 634 } | 631 } |
| 635 | 632 |
| 636 void HTMLMediaElement::prepareForLoad() | 633 void HTMLMediaElement::prepareForLoad() |
| 637 { | 634 { |
| (...skipping 3282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3920 { | 3917 { |
| 3921 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); | 3918 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); |
| 3922 } | 3919 } |
| 3923 | 3920 |
| 3924 bool HTMLMediaElement::isInteractiveContent() const | 3921 bool HTMLMediaElement::isInteractiveContent() const |
| 3925 { | 3922 { |
| 3926 return fastHasAttribute(controlsAttr); | 3923 return fastHasAttribute(controlsAttr); |
| 3927 } | 3924 } |
| 3928 | 3925 |
| 3929 } | 3926 } |
| OLD | NEW |