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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 { | 313 { |
314 if (event->type() == EventTypeNames::click && mediaElement().togglePlayState
WillPlay()) { | 314 if (event->type() == EventTypeNames::click && mediaElement().togglePlayState
WillPlay()) { |
315 mediaElement().togglePlayState(); | 315 mediaElement().togglePlayState(); |
316 updateDisplayType(); | 316 updateDisplayType(); |
317 event->setDefaultHandled(); | 317 event->setDefaultHandled(); |
318 } | 318 } |
319 } | 319 } |
320 | 320 |
321 void MediaControlOverlayPlayButtonElement::updateDisplayType() | 321 void MediaControlOverlayPlayButtonElement::updateDisplayType() |
322 { | 322 { |
323 if (mediaElement().shouldShowControls() && mediaElement().togglePlayStateWil
lPlay()) { | 323 if (mediaElement().shouldShowControls() && mediaElement().togglePlayStateWil
lPlay()) |
324 show(); | 324 show(); |
325 } else | 325 else |
326 hide(); | 326 hide(); |
327 } | 327 } |
328 | 328 |
329 const AtomicString& MediaControlOverlayPlayButtonElement::shadowPseudoId() const | 329 const AtomicString& MediaControlOverlayPlayButtonElement::shadowPseudoId() const |
330 { | 330 { |
331 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-overlay-play-
button", AtomicString::ConstructFromLiteral)); | 331 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-overlay-play-
button", AtomicString::ConstructFromLiteral)); |
332 return id; | 332 return id; |
333 } | 333 } |
334 | 334 |
335 bool MediaControlOverlayPlayButtonElement::keepEventInNode(Event* event) | 335 bool MediaControlOverlayPlayButtonElement::keepEventInNode(Event* event) |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 float fontSize = smallestDimension * 0.05f; | 770 float fontSize = smallestDimension * 0.05f; |
771 if (fontSize != m_fontSize) { | 771 if (fontSize != m_fontSize) { |
772 m_fontSize = fontSize; | 772 m_fontSize = fontSize; |
773 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue:
:CSS_PX); | 773 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue:
:CSS_PX); |
774 } | 774 } |
775 } | 775 } |
776 | 776 |
777 // ---------------------------- | 777 // ---------------------------- |
778 | 778 |
779 } // namespace blink | 779 } // namespace blink |
OLD | NEW |