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 2063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2074 break; | 2074 break; |
2075 case MediaPlayer::Auto: | 2075 case MediaPlayer::Auto: |
2076 return "auto"; | 2076 return "auto"; |
2077 break; | 2077 break; |
2078 } | 2078 } |
2079 | 2079 |
2080 ASSERT_NOT_REACHED(); | 2080 ASSERT_NOT_REACHED(); |
2081 return String(); | 2081 return String(); |
2082 } | 2082 } |
2083 | 2083 |
2084 void HTMLMediaElement::setPreload(const String& preload) | 2084 void HTMLMediaElement::setPreload(const AtomicString& preload) |
2085 { | 2085 { |
2086 WTF_LOG(Media, "HTMLMediaElement::setPreload(%s)", preload.utf8().data()); | 2086 WTF_LOG(Media, "HTMLMediaElement::setPreload(%s)", preload.string().utf8().d ata()); |
eseidel
2013/12/31 23:22:35
I'm a little surprsied that AtomicSTring doens't h
Inactive
2014/01/01 19:26:29
Right, this would be convenient. I will propose th
| |
2087 setAttribute(preloadAttr, preload); | 2087 setAttribute(preloadAttr, preload); |
2088 } | 2088 } |
2089 | 2089 |
2090 void HTMLMediaElement::play() | 2090 void HTMLMediaElement::play() |
2091 { | 2091 { |
2092 WTF_LOG(Media, "HTMLMediaElement::play()"); | 2092 WTF_LOG(Media, "HTMLMediaElement::play()"); |
2093 | 2093 |
2094 if (userGestureRequiredForRateChange() && !UserGestureIndicator::processingU serGesture()) | 2094 if (userGestureRequiredForRateChange() && !UserGestureIndicator::processingU serGesture()) |
2095 return; | 2095 return; |
2096 if (UserGestureIndicator::processingUserGesture()) | 2096 if (UserGestureIndicator::processingUserGesture()) |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2527 | 2527 |
2528 TrackDisplayUpdateScope scope(this); | 2528 TrackDisplayUpdateScope scope(this); |
2529 for (int i = m_textTracks->length() - 1; i >= 0; --i) { | 2529 for (int i = m_textTracks->length() - 1; i >= 0; --i) { |
2530 TextTrack* track = m_textTracks->item(i); | 2530 TextTrack* track = m_textTracks->item(i); |
2531 | 2531 |
2532 if (track->trackType() == TextTrack::InBand) | 2532 if (track->trackType() == TextTrack::InBand) |
2533 removeTrack(track); | 2533 removeTrack(track); |
2534 } | 2534 } |
2535 } | 2535 } |
2536 | 2536 |
2537 PassRefPtr<TextTrack> HTMLMediaElement::addTextTrack(const String& kind, const S tring& label, const String& language, ExceptionState& exceptionState) | 2537 PassRefPtr<TextTrack> HTMLMediaElement::addTextTrack(const AtomicString& kind, c onst AtomicString& label, const AtomicString& language, ExceptionState& exceptio nState) |
2538 { | 2538 { |
2539 ASSERT(RuntimeEnabledFeatures::videoTrackEnabled()); | 2539 ASSERT(RuntimeEnabledFeatures::videoTrackEnabled()); |
2540 | 2540 |
2541 // 4.8.10.12.4 Text track API | 2541 // 4.8.10.12.4 Text track API |
2542 // The addTextTrack(kind, label, language) method of media elements, when in voked, must run the following steps: | 2542 // The addTextTrack(kind, label, language) method of media elements, when in voked, must run the following steps: |
2543 | 2543 |
2544 // 1. If kind is not one of the following strings, then throw a SyntaxError exception and abort these steps | 2544 // 1. If kind is not one of the following strings, then throw a SyntaxError exception and abort these steps |
2545 if (!TextTrack::isValidKindKeyword(kind)) { | 2545 if (!TextTrack::isValidKindKeyword(kind)) { |
2546 exceptionState.throwUninformativeAndGenericDOMException(SyntaxError); | 2546 exceptionState.throwUninformativeAndGenericDOMException(SyntaxError); |
2547 return 0; | 2547 return 0; |
(...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3910 if (m_webLayer) | 3910 if (m_webLayer) |
3911 m_webLayer->setOpaque(m_opaque); | 3911 m_webLayer->setOpaque(m_opaque); |
3912 } | 3912 } |
3913 | 3913 |
3914 bool HTMLMediaElement::isInteractiveContent() const | 3914 bool HTMLMediaElement::isInteractiveContent() const |
3915 { | 3915 { |
3916 return fastHasAttribute(controlsAttr); | 3916 return fastHasAttribute(controlsAttr); |
3917 } | 3917 } |
3918 | 3918 |
3919 } | 3919 } |
OLD | NEW |