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

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

Issue 153823002: Avoid double lookup of crossorigin attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | no next file » | 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 3907 matching lines...) Expand 10 before | Expand all | Expand 10 after
3918 void HTMLMediaElement::applyMediaFragmentURI() 3918 void HTMLMediaElement::applyMediaFragmentURI()
3919 { 3919 {
3920 if (m_fragmentStartTime != MediaPlayer::invalidTime()) { 3920 if (m_fragmentStartTime != MediaPlayer::invalidTime()) {
3921 m_sentEndEvent = false; 3921 m_sentEndEvent = false;
3922 seek(m_fragmentStartTime, IGNORE_EXCEPTION); 3922 seek(m_fragmentStartTime, IGNORE_EXCEPTION);
3923 } 3923 }
3924 } 3924 }
3925 3925
3926 MediaPlayerClient::CORSMode HTMLMediaElement::mediaPlayerCORSMode() const 3926 MediaPlayerClient::CORSMode HTMLMediaElement::mediaPlayerCORSMode() const
3927 { 3927 {
3928 if (!fastHasAttribute(crossoriginAttr)) 3928 const AtomicString& crossOriginMode = fastGetAttribute(crossoriginAttr);
3929 if (crossOriginMode.isNull())
3929 return Unspecified; 3930 return Unspecified;
3930 if (equalIgnoringCase(fastGetAttribute(crossoriginAttr), "use-credentials")) 3931 if (equalIgnoringCase(crossOriginMode, "use-credentials"))
3931 return UseCredentials; 3932 return UseCredentials;
3932 return Anonymous; 3933 return Anonymous;
3933 } 3934 }
3934 3935
3935 void HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture() 3936 void HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture()
3936 { 3937 {
3937 m_restrictions = NoRestrictions; 3938 m_restrictions = NoRestrictions;
3938 } 3939 }
3939 3940
3940 void HTMLMediaElement::mediaPlayerSetWebLayer(blink::WebLayer* webLayer) 3941 void HTMLMediaElement::mediaPlayerSetWebLayer(blink::WebLayer* webLayer)
(...skipping 25 matching lines...) Expand all
3966 { 3967 {
3967 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); 3968 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource));
3968 } 3969 }
3969 3970
3970 bool HTMLMediaElement::isInteractiveContent() const 3971 bool HTMLMediaElement::isInteractiveContent() const
3971 { 3972 {
3972 return fastHasAttribute(controlsAttr); 3973 return fastHasAttribute(controlsAttr);
3973 } 3974 }
3974 3975
3975 } 3976 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698