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