| 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 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1899 } | 1899 } |
| 1900 | 1900 |
| 1901 void HTMLMediaElement::setPreload(const AtomicString& preload) | 1901 void HTMLMediaElement::setPreload(const AtomicString& preload) |
| 1902 { | 1902 { |
| 1903 WTF_LOG(Media, "HTMLMediaElement::setPreload(%p, %s)", this, preload.utf8().
data()); | 1903 WTF_LOG(Media, "HTMLMediaElement::setPreload(%p, %s)", this, preload.utf8().
data()); |
| 1904 setAttribute(preloadAttr, preload); | 1904 setAttribute(preloadAttr, preload); |
| 1905 } | 1905 } |
| 1906 | 1906 |
| 1907 WebMediaPlayer::Preload HTMLMediaElement::preloadType() const | 1907 WebMediaPlayer::Preload HTMLMediaElement::preloadType() const |
| 1908 { | 1908 { |
| 1909 // TODO(philipj): The spec requires case-sensitive string matching: | |
| 1910 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=28951 | |
| 1911 const AtomicString& preload = fastGetAttribute(preloadAttr); | 1909 const AtomicString& preload = fastGetAttribute(preloadAttr); |
| 1912 if (equalIgnoringCase(preload, "none")) { | 1910 if (equalIgnoringCase(preload, "none")) { |
| 1913 UseCounter::count(document(), UseCounter::HTMLMediaElementPreloadNone); | 1911 UseCounter::count(document(), UseCounter::HTMLMediaElementPreloadNone); |
| 1914 return WebMediaPlayer::PreloadNone; | 1912 return WebMediaPlayer::PreloadNone; |
| 1915 } | 1913 } |
| 1916 if (equalIgnoringCase(preload, "metadata")) { | 1914 if (equalIgnoringCase(preload, "metadata")) { |
| 1917 UseCounter::count(document(), UseCounter::HTMLMediaElementPreloadMetadat
a); | 1915 UseCounter::count(document(), UseCounter::HTMLMediaElementPreloadMetadat
a); |
| 1918 return WebMediaPlayer::PreloadMetaData; | 1916 return WebMediaPlayer::PreloadMetaData; |
| 1919 } | 1917 } |
| 1920 if (equalIgnoringCase(preload, "auto")) { | 1918 if (equalIgnoringCase(preload, "auto")) { |
| (...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3772 visitor->trace(m_client); | 3770 visitor->trace(m_client); |
| 3773 } | 3771 } |
| 3774 | 3772 |
| 3775 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) | 3773 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) |
| 3776 { | 3774 { |
| 3777 visitor->trace(m_client); | 3775 visitor->trace(m_client); |
| 3778 } | 3776 } |
| 3779 #endif | 3777 #endif |
| 3780 | 3778 |
| 3781 } | 3779 } |
| OLD | NEW |