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 3473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3484 | 3484 |
3485 if (renderer()) | 3485 if (renderer()) |
3486 renderer()->updateFromElement(); | 3486 renderer()->updateFromElement(); |
3487 } | 3487 } |
3488 | 3488 |
3489 bool HTMLMediaElement::hasPendingActivity() const | 3489 bool HTMLMediaElement::hasPendingActivity() const |
3490 { | 3490 { |
3491 return (hasAudio() && isPlaying()) || m_asyncEventQueue->hasPendingEvents(); | 3491 return (hasAudio() && isPlaying()) || m_asyncEventQueue->hasPendingEvents(); |
3492 } | 3492 } |
3493 | 3493 |
| 3494 void HTMLMediaElement::defaultEventHandler(Event* event) |
| 3495 { |
| 3496 if (isVideo() && event->type() == eventNames().clickEvent && document()->set
tings() |
| 3497 && document()->settings()->clickToPlayPauseVideo()) { |
| 3498 if (paused()) |
| 3499 play(); |
| 3500 else |
| 3501 pause(); |
| 3502 return; |
| 3503 } |
| 3504 HTMLElement::defaultEventHandler(event); |
| 3505 } |
| 3506 |
3494 bool HTMLMediaElement::isFullscreen() const | 3507 bool HTMLMediaElement::isFullscreen() const |
3495 { | 3508 { |
3496 return FullscreenController::isActiveFullScreenElement(this); | 3509 return FullscreenController::isActiveFullScreenElement(this); |
3497 } | 3510 } |
3498 | 3511 |
3499 void HTMLMediaElement::enterFullscreen() | 3512 void HTMLMediaElement::enterFullscreen() |
3500 { | 3513 { |
3501 LOG(Media, "HTMLMediaElement::enterFullscreen"); | 3514 LOG(Media, "HTMLMediaElement::enterFullscreen"); |
3502 | 3515 |
3503 if (document()->settings() && document()->settings()->fullScreenEnabled()) | 3516 if (document()->settings() && document()->settings()->fullScreenEnabled()) |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3971 info.addMember(m_mediaGroup, "mediaGroup"); | 3984 info.addMember(m_mediaGroup, "mediaGroup"); |
3972 info.addMember(m_mediaController, "mediaController"); | 3985 info.addMember(m_mediaController, "mediaController"); |
3973 | 3986 |
3974 #if ENABLE(WEB_AUDIO) | 3987 #if ENABLE(WEB_AUDIO) |
3975 info.addMember(m_audioSourceNode, "audioSourceNode"); | 3988 info.addMember(m_audioSourceNode, "audioSourceNode"); |
3976 #endif | 3989 #endif |
3977 | 3990 |
3978 } | 3991 } |
3979 | 3992 |
3980 } | 3993 } |
OLD | NEW |