Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Side by Side Diff: Source/core/html/HTMLMediaElement.cpp

Issue 60763002: Never create HTMLTrackElement when VideoTrack is not enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: consistency Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/build/scripts/templates/ElementWrapperFactory.cpp.tmpl ('k') | Source/core/html/HTMLTagNames.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698