| 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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event) | 548 void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event) |
| 549 { | 549 { |
| 550 if (event->type() == EventTypeNames::click) { | 550 if (event->type() == EventTypeNames::click) { |
| 551 // Only use the new full screen API if the fullScreenEnabled setting has | 551 // Only use the new full screen API if the fullScreenEnabled setting has |
| 552 // been explicitly enabled. Otherwise, use the old fullscreen API. This | 552 // been explicitly enabled. Otherwise, use the old fullscreen API. This |
| 553 // allows apps which embed a WebView to retain the existing full screen | 553 // allows apps which embed a WebView to retain the existing full screen |
| 554 // video implementation without requiring them to implement their own fu
ll | 554 // video implementation without requiring them to implement their own fu
ll |
| 555 // screen behavior. | 555 // screen behavior. |
| 556 if (document().settings() && document().settings()->fullScreenEnabled())
{ | 556 if (document().settings() && document().settings()->fullScreenEnabled())
{ |
| 557 if (FullscreenElementStack::isActiveFullScreenElement(toParentMediaE
lement(this))) | 557 if (FullscreenElementStack::isActiveFullScreenElement(toParentMediaE
lement(this))) |
| 558 FullscreenElementStack::from(&document())->webkitCancelFullScree
n(); | 558 FullscreenElementStack::from(document()).webkitCancelFullScreen(
); |
| 559 else | 559 else |
| 560 FullscreenElementStack::from(&document())->requestFullScreenForE
lement(toParentMediaElement(this), 0, FullscreenElementStack::ExemptIFrameAllowF
ullScreenRequirement); | 560 FullscreenElementStack::from(document()).requestFullScreenForEle
ment(toParentMediaElement(this), 0, FullscreenElementStack::ExemptIFrameAllowFul
lScreenRequirement); |
| 561 } else | 561 } else |
| 562 mediaController()->enterFullscreen(); | 562 mediaController()->enterFullscreen(); |
| 563 event->setDefaultHandled(); | 563 event->setDefaultHandled(); |
| 564 } | 564 } |
| 565 HTMLInputElement::defaultEventHandler(event); | 565 HTMLInputElement::defaultEventHandler(event); |
| 566 } | 566 } |
| 567 | 567 |
| 568 const AtomicString& MediaControlFullscreenButtonElement::shadowPseudoId() const | 568 const AtomicString& MediaControlFullscreenButtonElement::shadowPseudoId() const |
| 569 { | 569 { |
| 570 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-fullscreen-bu
tton", AtomicString::ConstructFromLiteral)); | 570 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-fullscreen-bu
tton", AtomicString::ConstructFromLiteral)); |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 float fontSize = smallestDimension * 0.05f; | 746 float fontSize = smallestDimension * 0.05f; |
| 747 if (fontSize != m_fontSize) { | 747 if (fontSize != m_fontSize) { |
| 748 m_fontSize = fontSize; | 748 m_fontSize = fontSize; |
| 749 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue:
:CSS_PX); | 749 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue:
:CSS_PX); |
| 750 } | 750 } |
| 751 } | 751 } |
| 752 | 752 |
| 753 // ---------------------------- | 753 // ---------------------------- |
| 754 | 754 |
| 755 } // namespace WebCore | 755 } // namespace WebCore |
| OLD | NEW |