| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 { | 194 { |
| 195 RefPtr<MediaControlMuteButtonElement> button = adoptRef(new MediaControlMute
ButtonElement(mediaControls)); | 195 RefPtr<MediaControlMuteButtonElement> button = adoptRef(new MediaControlMute
ButtonElement(mediaControls)); |
| 196 button->ensureUserAgentShadowRoot(); | 196 button->ensureUserAgentShadowRoot(); |
| 197 button->setType("button"); | 197 button->setType("button"); |
| 198 return button.release(); | 198 return button.release(); |
| 199 } | 199 } |
| 200 | 200 |
| 201 void MediaControlMuteButtonElement::defaultEventHandler(Event* event) | 201 void MediaControlMuteButtonElement::defaultEventHandler(Event* event) |
| 202 { | 202 { |
| 203 if (event->type() == EventTypeNames::click) { | 203 if (event->type() == EventTypeNames::click) { |
| 204 mediaControllerInterface().setMuted(!mediaControllerInterface().muted())
; | 204 mediaElement().setMuted(!mediaElement().muted()); |
| 205 event->setDefaultHandled(); | 205 event->setDefaultHandled(); |
| 206 } | 206 } |
| 207 | 207 |
| 208 HTMLInputElement::defaultEventHandler(event); | 208 HTMLInputElement::defaultEventHandler(event); |
| 209 } | 209 } |
| 210 | 210 |
| 211 void MediaControlMuteButtonElement::updateDisplayType() | 211 void MediaControlMuteButtonElement::updateDisplayType() |
| 212 { | 212 { |
| 213 setDisplayType(mediaControllerInterface().muted() ? MediaUnMuteButton : Medi
aMuteButton); | 213 setDisplayType(mediaElement().muted() ? MediaUnMuteButton : MediaMuteButton)
; |
| 214 } | 214 } |
| 215 | 215 |
| 216 const AtomicString& MediaControlMuteButtonElement::shadowPseudoId() const | 216 const AtomicString& MediaControlMuteButtonElement::shadowPseudoId() const |
| 217 { | 217 { |
| 218 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-mute-button",
AtomicString::ConstructFromLiteral)); | 218 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-mute-button",
AtomicString::ConstructFromLiteral)); |
| 219 return id; | 219 return id; |
| 220 } | 220 } |
| 221 | 221 |
| 222 // ---------------------------- | 222 // ---------------------------- |
| 223 | 223 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 | 426 |
| 427 if (!inDocument() || !document().isActive()) | 427 if (!inDocument() || !document().isActive()) |
| 428 return; | 428 return; |
| 429 | 429 |
| 430 MediaControlInputElement::defaultEventHandler(event); | 430 MediaControlInputElement::defaultEventHandler(event); |
| 431 | 431 |
| 432 if (event->type() == EventTypeNames::mouseover || event->type() == EventType
Names::mouseout || event->type() == EventTypeNames::mousemove) | 432 if (event->type() == EventTypeNames::mouseover || event->type() == EventType
Names::mouseout || event->type() == EventTypeNames::mousemove) |
| 433 return; | 433 return; |
| 434 | 434 |
| 435 double volume = value().toDouble(); | 435 double volume = value().toDouble(); |
| 436 mediaControllerInterface().setVolume(volume, ASSERT_NO_EXCEPTION); | 436 mediaElement().setVolume(volume, ASSERT_NO_EXCEPTION); |
| 437 mediaControllerInterface().setMuted(false); | 437 mediaElement().setMuted(false); |
| 438 } | 438 } |
| 439 | 439 |
| 440 bool MediaControlVolumeSliderElement::willRespondToMouseMoveEvents() | 440 bool MediaControlVolumeSliderElement::willRespondToMouseMoveEvents() |
| 441 { | 441 { |
| 442 if (!inDocument() || !document().isActive()) | 442 if (!inDocument() || !document().isActive()) |
| 443 return false; | 443 return false; |
| 444 | 444 |
| 445 return MediaControlInputElement::willRespondToMouseMoveEvents(); | 445 return MediaControlInputElement::willRespondToMouseMoveEvents(); |
| 446 } | 446 } |
| 447 | 447 |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 float fontSize = smallestDimension * 0.05f; | 669 float fontSize = smallestDimension * 0.05f; |
| 670 if (fontSize != m_fontSize) { | 670 if (fontSize != m_fontSize) { |
| 671 m_fontSize = fontSize; | 671 m_fontSize = fontSize; |
| 672 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue:
:CSS_PX); | 672 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue:
:CSS_PX); |
| 673 } | 673 } |
| 674 } | 674 } |
| 675 | 675 |
| 676 // ---------------------------- | 676 // ---------------------------- |
| 677 | 677 |
| 678 } // namespace WebCore | 678 } // namespace WebCore |
| OLD | NEW |