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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 { | 276 { |
277 if (event->type() == EventTypeNames::click && mediaElement().togglePlayState
WillPlay()) { | 277 if (event->type() == EventTypeNames::click && mediaElement().togglePlayState
WillPlay()) { |
278 mediaElement().togglePlayState(); | 278 mediaElement().togglePlayState(); |
279 updateDisplayType(); | 279 updateDisplayType(); |
280 event->setDefaultHandled(); | 280 event->setDefaultHandled(); |
281 } | 281 } |
282 } | 282 } |
283 | 283 |
284 void MediaControlOverlayPlayButtonElement::updateDisplayType() | 284 void MediaControlOverlayPlayButtonElement::updateDisplayType() |
285 { | 285 { |
286 if (mediaElement().togglePlayStateWillPlay()) { | 286 if (mediaElement().shouldShowControls() && mediaElement().togglePlayStateWil
lPlay()) { |
287 show(); | 287 show(); |
288 } else | 288 } else |
289 hide(); | 289 hide(); |
290 } | 290 } |
291 | 291 |
292 const AtomicString& MediaControlOverlayPlayButtonElement::shadowPseudoId() const | 292 const AtomicString& MediaControlOverlayPlayButtonElement::shadowPseudoId() const |
293 { | 293 { |
294 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-overlay-play-
button", AtomicString::ConstructFromLiteral)); | 294 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-overlay-play-
button", AtomicString::ConstructFromLiteral)); |
295 return id; | 295 return id; |
296 } | 296 } |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 float fontSize = smallestDimension * 0.05f; | 675 float fontSize = smallestDimension * 0.05f; |
676 if (fontSize != m_fontSize) { | 676 if (fontSize != m_fontSize) { |
677 m_fontSize = fontSize; | 677 m_fontSize = fontSize; |
678 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue:
:CSS_PX); | 678 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue:
:CSS_PX); |
679 } | 679 } |
680 } | 680 } |
681 | 681 |
682 // ---------------------------- | 682 // ---------------------------- |
683 | 683 |
684 } // namespace WebCore | 684 } // namespace WebCore |
OLD | NEW |