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 4007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4018 void HTMLMediaElement::mediaPlayerMediaSourceOpened(blink::WebMediaSource* webMe
diaSource) | 4018 void HTMLMediaElement::mediaPlayerMediaSourceOpened(blink::WebMediaSource* webMe
diaSource) |
4019 { | 4019 { |
4020 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); | 4020 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); |
4021 } | 4021 } |
4022 | 4022 |
4023 bool HTMLMediaElement::isInteractiveContent() const | 4023 bool HTMLMediaElement::isInteractiveContent() const |
4024 { | 4024 { |
4025 return fastHasAttribute(controlsAttr); | 4025 return fastHasAttribute(controlsAttr); |
4026 } | 4026 } |
4027 | 4027 |
4028 bool HTMLMediaElement::willRespondToMouseClickEvents() | |
4029 { | |
4030 return fastHasAttribute(controlsAttr); | |
4031 } | |
4032 | |
4033 void HTMLMediaElement::defaultEventHandler(Event* event) | 4028 void HTMLMediaElement::defaultEventHandler(Event* event) |
4034 { | 4029 { |
4035 if (event->type() == EventTypeNames::click && willRespondToMouseClickEvents(
)) { | |
4036 togglePlayState(); | |
4037 event->setDefaultHandled(); | |
4038 return; | |
4039 } | |
4040 | |
4041 if (event->type() == EventTypeNames::focusin) { | 4030 if (event->type() == EventTypeNames::focusin) { |
4042 if (hasMediaControls()) | 4031 if (hasMediaControls()) |
4043 mediaControls()->mediaElementFocused(); | 4032 mediaControls()->mediaElementFocused(); |
4044 } | 4033 } |
4045 | |
4046 HTMLElement::defaultEventHandler(event); | 4034 HTMLElement::defaultEventHandler(event); |
4047 } | 4035 } |
4048 | 4036 |
4049 void HTMLMediaElement::trace(Visitor* visitor) | 4037 void HTMLMediaElement::trace(Visitor* visitor) |
4050 { | 4038 { |
4051 #if ENABLE(OILPAN) | 4039 #if ENABLE(OILPAN) |
4052 visitor->trace(m_playedTimeRanges); | 4040 visitor->trace(m_playedTimeRanges); |
4053 visitor->trace(m_asyncEventQueue); | 4041 visitor->trace(m_asyncEventQueue); |
4054 visitor->trace(m_error); | 4042 visitor->trace(m_error); |
4055 visitor->trace(m_currentSourceNode); | 4043 visitor->trace(m_currentSourceNode); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4099 | 4087 |
4100 #if ENABLE(WEB_AUDIO) | 4088 #if ENABLE(WEB_AUDIO) |
4101 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) | 4089 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) |
4102 { | 4090 { |
4103 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) | 4091 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) |
4104 audioSourceProvider()->setClient(nullptr); | 4092 audioSourceProvider()->setClient(nullptr); |
4105 } | 4093 } |
4106 #endif | 4094 #endif |
4107 | 4095 |
4108 } | 4096 } |
OLD | NEW |