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

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

Issue 205683003: Update <video muted=""> handling to match spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update defaultMuted test Created 6 years, 9 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/parser/HTMLConstructionSite.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 if (!autoplay() && m_player) 416 if (!autoplay() && m_player)
417 setPlayerPreload(); 417 setPlayerPreload();
418 418
419 } else if (name == mediagroupAttr) { 419 } else if (name == mediagroupAttr) {
420 setMediaGroup(value); 420 setMediaGroup(value);
421 } else { 421 } else {
422 HTMLElement::parseAttribute(name, value); 422 HTMLElement::parseAttribute(name, value);
423 } 423 }
424 } 424 }
425 425
426 void HTMLMediaElement::finishParsingAttributes()
427 {
428 if (fastHasAttribute(mutedAttr))
429 m_muted = true;
430 }
431
426 void HTMLMediaElement::finishParsingChildren() 432 void HTMLMediaElement::finishParsingChildren()
427 { 433 {
428 HTMLElement::finishParsingChildren(); 434 HTMLElement::finishParsingChildren();
429 435
430 if (!RuntimeEnabledFeatures::videoTrackEnabled()) 436 if (!RuntimeEnabledFeatures::videoTrackEnabled())
431 return; 437 return;
432 438
433 if (Traversal<HTMLTrackElement>::firstChild(*this)) 439 if (Traversal<HTMLTrackElement>::firstChild(*this))
434 scheduleDelayedAction(LoadTextTrackResource); 440 scheduleDelayedAction(LoadTextTrackResource);
435 } 441 }
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 WTF_LOG(Media, "HTMLMediaElement::loadResource - m_currentSrc -> %s", urlFor LoggingMedia(m_currentSrc).utf8().data()); 829 WTF_LOG(Media, "HTMLMediaElement::loadResource - m_currentSrc -> %s", urlFor LoggingMedia(m_currentSrc).utf8().data());
824 830
825 startProgressEventTimer(); 831 startProgressEventTimer();
826 832
827 // Reset display mode to force a recalculation of what to show because we ar e resetting the player. 833 // Reset display mode to force a recalculation of what to show because we ar e resetting the player.
828 setDisplayMode(Unknown); 834 setDisplayMode(Unknown);
829 835
830 if (!autoplay()) 836 if (!autoplay())
831 setPlayerPreload(); 837 setPlayerPreload();
832 838
833 if (fastHasAttribute(mutedAttr))
834 m_muted = true;
835 updateVolume(); 839 updateVolume();
836 840
837 ASSERT(!m_mediaSource); 841 ASSERT(!m_mediaSource);
838 842
839 bool attemptLoad = true; 843 bool attemptLoad = true;
840 844
841 if (url.protocolIs(mediaSourceBlobProtocol)) { 845 if (url.protocolIs(mediaSourceBlobProtocol)) {
842 if (isMediaStreamURL(url.string())) { 846 if (isMediaStreamURL(url.string())) {
843 m_userGestureRequiredForPlay = false; 847 m_userGestureRequiredForPlay = false;
844 } else { 848 } else {
(...skipping 2800 matching lines...) Expand 10 before | Expand all | Expand 10 after
3645 { 3649 {
3646 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); 3650 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource));
3647 } 3651 }
3648 3652
3649 bool HTMLMediaElement::isInteractiveContent() const 3653 bool HTMLMediaElement::isInteractiveContent() const
3650 { 3654 {
3651 return fastHasAttribute(controlsAttr); 3655 return fastHasAttribute(controlsAttr);
3652 } 3656 }
3653 3657
3654 } 3658 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/parser/HTMLConstructionSite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698