OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 { | 70 { |
71 return adoptRef(new MediaControlPanelElement(mediaControls)); | 71 return adoptRef(new MediaControlPanelElement(mediaControls)); |
72 } | 72 } |
73 | 73 |
74 const AtomicString& MediaControlPanelElement::shadowPseudoId() const | 74 const AtomicString& MediaControlPanelElement::shadowPseudoId() const |
75 { | 75 { |
76 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-panel", Atomi
cString::ConstructFromLiteral)); | 76 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-panel", Atomi
cString::ConstructFromLiteral)); |
77 return id; | 77 return id; |
78 } | 78 } |
79 | 79 |
| 80 void MediaControlPanelElement::defaultEventHandler(Event* event) |
| 81 { |
| 82 // Suppress the media element activation behavior (toggle play/pause) when |
| 83 // any part of the control panel is clicked. |
| 84 if (event->type() == EventTypeNames::click) { |
| 85 event->setDefaultHandled(); |
| 86 return; |
| 87 } |
| 88 HTMLDivElement::defaultEventHandler(event); |
| 89 } |
| 90 |
80 void MediaControlPanelElement::startTimer() | 91 void MediaControlPanelElement::startTimer() |
81 { | 92 { |
82 stopTimer(); | 93 stopTimer(); |
83 | 94 |
84 // The timer is required to set the property display:'none' on the panel, | 95 // The timer is required to set the property display:'none' on the panel, |
85 // such that captions are correctly displayed at the bottom of the video | 96 // such that captions are correctly displayed at the bottom of the video |
86 // at the end of the fadeout transition. | 97 // at the end of the fadeout transition. |
87 // FIXME: Racing a transition with a setTimeout like this is wrong. | 98 // FIXME: Racing a transition with a setTimeout like this is wrong. |
88 m_transitionTimer.startOneShot(fadeOutDuration, FROM_HERE); | 99 m_transitionTimer.startOneShot(fadeOutDuration, FROM_HERE); |
89 } | 100 } |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 float fontSize = smallestDimension * 0.05f; | 674 float fontSize = smallestDimension * 0.05f; |
664 if (fontSize != m_fontSize) { | 675 if (fontSize != m_fontSize) { |
665 m_fontSize = fontSize; | 676 m_fontSize = fontSize; |
666 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue:
:CSS_PX); | 677 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue:
:CSS_PX); |
667 } | 678 } |
668 } | 679 } |
669 | 680 |
670 // ---------------------------- | 681 // ---------------------------- |
671 | 682 |
672 } // namespace WebCore | 683 } // namespace WebCore |
OLD | NEW |