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 4023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4034 void HTMLMediaElement::mediaPlayerMediaSourceOpened(blink::WebMediaSource* webMe
diaSource) | 4034 void HTMLMediaElement::mediaPlayerMediaSourceOpened(blink::WebMediaSource* webMe
diaSource) |
4035 { | 4035 { |
4036 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); | 4036 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); |
4037 } | 4037 } |
4038 | 4038 |
4039 bool HTMLMediaElement::isInteractiveContent() const | 4039 bool HTMLMediaElement::isInteractiveContent() const |
4040 { | 4040 { |
4041 return fastHasAttribute(controlsAttr); | 4041 return fastHasAttribute(controlsAttr); |
4042 } | 4042 } |
4043 | 4043 |
4044 bool HTMLMediaElement::willRespondToMouseClickEvents() | |
4045 { | |
4046 return fastHasAttribute(controlsAttr); | |
4047 } | |
4048 | |
4049 void HTMLMediaElement::defaultEventHandler(Event* event) | 4044 void HTMLMediaElement::defaultEventHandler(Event* event) |
4050 { | 4045 { |
4051 if (event->type() == EventTypeNames::click && willRespondToMouseClickEvents(
)) { | |
4052 togglePlayState(); | |
4053 event->setDefaultHandled(); | |
4054 return; | |
4055 } | |
4056 | |
4057 if (event->type() == EventTypeNames::focusin) { | 4046 if (event->type() == EventTypeNames::focusin) { |
4058 if (hasMediaControls()) | 4047 if (hasMediaControls()) |
4059 mediaControls()->mediaElementFocused(); | 4048 mediaControls()->mediaElementFocused(); |
4060 } | 4049 } |
4061 | |
4062 HTMLElement::defaultEventHandler(event); | 4050 HTMLElement::defaultEventHandler(event); |
4063 } | 4051 } |
4064 | 4052 |
4065 void HTMLMediaElement::trace(Visitor* visitor) | 4053 void HTMLMediaElement::trace(Visitor* visitor) |
4066 { | 4054 { |
4067 #if ENABLE(OILPAN) | 4055 #if ENABLE(OILPAN) |
4068 visitor->trace(m_playedTimeRanges); | 4056 visitor->trace(m_playedTimeRanges); |
4069 visitor->trace(m_asyncEventQueue); | 4057 visitor->trace(m_asyncEventQueue); |
4070 visitor->trace(m_error); | 4058 visitor->trace(m_error); |
4071 visitor->trace(m_currentSourceNode); | 4059 visitor->trace(m_currentSourceNode); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4115 | 4103 |
4116 #if ENABLE(WEB_AUDIO) | 4104 #if ENABLE(WEB_AUDIO) |
4117 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) | 4105 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) |
4118 { | 4106 { |
4119 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) | 4107 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) |
4120 audioSourceProvider()->setClient(nullptr); | 4108 audioSourceProvider()->setClient(nullptr); |
4121 } | 4109 } |
4122 #endif | 4110 #endif |
4123 | 4111 |
4124 } | 4112 } |
OLD | NEW |