| 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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 RefPtrWillBeRawPtr<MediaControlFullscreenButtonElement> button = adoptRefWil
lBeNoop(new MediaControlFullscreenButtonElement(mediaControls)); | 485 RefPtrWillBeRawPtr<MediaControlFullscreenButtonElement> button = adoptRefWil
lBeNoop(new MediaControlFullscreenButtonElement(mediaControls)); |
| 486 button->ensureUserAgentShadowRoot(); | 486 button->ensureUserAgentShadowRoot(); |
| 487 button->setType("button"); | 487 button->setType("button"); |
| 488 button->hide(); | 488 button->hide(); |
| 489 return button.release(); | 489 return button.release(); |
| 490 } | 490 } |
| 491 | 491 |
| 492 void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event) | 492 void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event) |
| 493 { | 493 { |
| 494 if (event->type() == EventTypeNames::click) { | 494 if (event->type() == EventTypeNames::click) { |
| 495 if (FullscreenElementStack::isActiveFullScreenElement(&mediaElement())) | 495 if (FullscreenElementStack::isActiveFullScreenElement(mediaElement())) |
| 496 FullscreenElementStack::from(document()).webkitCancelFullScreen(); | 496 FullscreenElementStack::from(document()).webkitCancelFullScreen(); |
| 497 else | 497 else |
| 498 FullscreenElementStack::from(document()).requestFullScreenForElement
(&mediaElement(), 0, FullscreenElementStack::ExemptIFrameAllowFullScreenRequirem
ent); | 498 FullscreenElementStack::from(document()).requestFullScreenForElement
(mediaElement(), 0, FullscreenElementStack::ExemptIFrameAllowFullScreenRequireme
nt); |
| 499 event->setDefaultHandled(); | 499 event->setDefaultHandled(); |
| 500 } | 500 } |
| 501 HTMLInputElement::defaultEventHandler(event); | 501 HTMLInputElement::defaultEventHandler(event); |
| 502 } | 502 } |
| 503 | 503 |
| 504 const AtomicString& MediaControlFullscreenButtonElement::shadowPseudoId() const | 504 const AtomicString& MediaControlFullscreenButtonElement::shadowPseudoId() const |
| 505 { | 505 { |
| 506 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-fullscreen-bu
tton", AtomicString::ConstructFromLiteral)); | 506 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-fullscreen-bu
tton", AtomicString::ConstructFromLiteral)); |
| 507 return id; | 507 return id; |
| 508 } | 508 } |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 float fontSize = smallestDimension * 0.05f; | 676 float fontSize = smallestDimension * 0.05f; |
| 677 if (fontSize != m_fontSize) { | 677 if (fontSize != m_fontSize) { |
| 678 m_fontSize = fontSize; | 678 m_fontSize = fontSize; |
| 679 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue:
:CSS_PX); | 679 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue:
:CSS_PX); |
| 680 } | 680 } |
| 681 } | 681 } |
| 682 | 682 |
| 683 // ---------------------------- | 683 // ---------------------------- |
| 684 | 684 |
| 685 } // namespace WebCore | 685 } // namespace WebCore |
| OLD | NEW |