video:-webkit-full-screen::-webkit-media-controls-panel {
-webkit-transform-origin: left bottom;
- position: fixed;
+ position: relative;
left: 0px;
bottom: 0px;
width: 1280px;
video:-webkit-full-screen::-webkit-media-controls-panel {
-webkit-transform-origin: left bottom;
- position: fixed;
+ position: relative;
left: 0px;
bottom: 0px;
width: 720px;
setBooleanAttribute(controlsAttr, b);
}
+#if ENABLE(TIZEN_GSTREAMER_VIDEO)
+void HTMLMediaElement::showControls()
+{
+ if (hasMediaControls())
+ mediaControls()->show();
+}
+
+void HTMLMediaElement::hideControls()
+{
+ if (hasMediaControls())
+ mediaControls()->hide();
+}
+#endif
+
float HTMLMediaElement::volume() const
{
return m_volume;
#if ENABLE(FULLSCREEN_API)
if (document() && document()->settings() && document()->settings()->fullScreenEnabled()) {
document()->requestFullScreenForElement(this, 0, Document::ExemptIFrameAllowFullScreenRequirement);
-#if ENABLE(TIZEN_FULLSCREEN_API)
- if (hasMediaControls())
- mediaControls()->updateMediaControlScale();
-#endif
return;
}
#endif
}
#if ENABLE(TIZEN_FULLSCREEN_API)
-void HTMLMediaElement::updateMediaControlsStyle(bool needsRecalc)
+void HTMLMediaElement::updateMediaControlsStyle()
{
+ recalcStyle(Node::Force);
if (hasMediaControls())
mediaControls()->updateMediaControlScale();
-
- if (needsRecalc)
- recalcStyle(Node::Force);
}
#endif
if (!controls)
return false;
- controls->setMediaController(m_mediaController ? m_mediaController.get() : static_cast<MediaControllerInterface*>(this));
- controls->reset();
#if ENABLE(TIZEN_FULLSCREEN_API)
if (isFullscreen())
controls->updateMediaControlScale();
#endif
+
+ controls->setMediaController(m_mediaController ? m_mediaController.get() : static_cast<MediaControllerInterface*>(this));
+ controls->reset();
+
if (isFullscreen())
controls->enteredFullscreen();
return;
}
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ if (hasMediaControls() && isFullscreen())
+ mediaControls()->updateMediaControlScale();
+#endif
+
if (!hasMediaControls() && !createMediaControls())
return;
// controls
bool controls() const;
void setControls(bool);
+#if ENABLE(TIZEN_GSTREAMER_VIDEO)
+ void showControls();
+ void hideControls();
+#endif
float volume() const;
void setVolume(float, ExceptionCode&);
bool muted() const;
#endif
#if ENABLE(TIZEN_FULLSCREEN_API)
- void updateMediaControlsStyle(bool needsRecalc);
+ void updateMediaControlsStyle();
#endif
protected:
document()->webkitCancelFullScreen();
else {
document()->requestFullScreenForElement(toParentMediaElement(this), 0, Document::ExemptIFrameAllowFullScreenRequirement);
-#if ENABLE(TIZEN_FULLSCREEN_API)
- toParentMediaElement(this)->updateMediaControlsStyle(false);
-#endif
}
} else
#endif
namespace WebCore {
static const double timeWithoutMouseMovementBeforeHidingControls = 3;
+
#if ENABLE(TIZEN_FULLSCREEN_API)
const FloatSize compareResolution(720.0f, 1280.0f);
#endif
scaleFactor *= (screenRect.width() / compareWidth);
}
- m_panel->setInlineStyleProperty(CSSPropertyWebkitTransform, "scale(" + String::number(scaleFactor) + ", " + String::number(scaleFactor) + ")", false);
+ setInlineStyleProperty(CSSPropertyWebkitTransform, "scale(" + String::number(scaleFactor) + ", " + String::number(scaleFactor) + ")", false);
+ setInlineStyleProperty(CSSPropertyWebkitTransformOrigin, "left top", false);
}
#endif
m_panel->resetPosition();
#if ENABLE(TIZEN_FULLSCREEN_API)
- m_panel->removeInlineStyleProperty(CSSPropertyWebkitTransform);
+ removeInlineStyleProperty(CSSPropertyWebkitTransform);
+ removeInlineStyleProperty(CSSPropertyWebkitTransformOrigin);
#endif
#if !ENABLE(TIZEN_GSTREAMER_VIDEO)
#include "HTMLMediaElement.h"
#include "RenderView.h"
+#if ENABLE(TIZEN_FULLSCREEN_API)
+#include "Chrome.h"
+#include "Page.h"
+#endif
+
namespace WebCore {
RenderMedia::RenderMedia(HTMLMediaElement* video)
if (newSize == oldSize && !controlsRenderer->needsLayout())
return;
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ if (document()->webkitIsFullScreen() && document()->page())
+ newSize = IntSize(document()->page()->chrome()->windowRect().width(), document()->page()->chrome()->windowRect().height());
+#endif
+
// When calling layout() on a child node, a parent must either push a LayoutStateMaintainter, or
// instantiate LayoutStateDisabler. Since using a LayoutStateMaintainer is slightly more efficient,
// and this method will be called many times per second during playback, use a LayoutStateMaintainer:
m_element = element;
m_initialFrame = screenRectOfContents(m_element.get());
m_page->injectedBundleFullScreenClient().enterFullScreenForElement(m_page.get(), element);
+
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ hideFullScreenControls();
+#endif
}
void WebFullScreenManager::exitFullScreenForElement(WebCore::Element* element)
{
ASSERT(m_element);
m_element->document()->webkitDidEnterFullScreenForElement(m_element.get());
+
+ if (m_element->isMediaElement()) {
+ HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(m_element.get());
+ mediaElement->showControls();
+ }
}
void WebFullScreenManager::willExitFullScreen()
}
#if ENABLE(TIZEN_FULLSCREEN_API)
+void WebFullScreenManager::hideFullScreenControls()
+{
+ if (!m_element->isMediaElement())
+ return;
+
+ HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(m_element.get());
+ mediaElement->hideControls();
+}
+
void WebFullScreenManager::updateMediaControlsStyle()
{
ASSERT(m_element);
- HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(m_element.get());
- if (mediaElement)
- mediaElement->updateMediaControlsStyle(true);
+ if (m_element->isMediaElement()) {
+ HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(m_element.get());
+ mediaElement->updateMediaControlsStyle();
+ mediaElement->showControls();
+ }
}
#endif
void didExitFullScreen();
#if ENABLE(TIZEN_FULLSCREEN_API)
+ void hideFullScreenControls();
void updateMediaControlsStyle();
#endif
mainFrameView()->setConstrainsScrollingToContentEdge(constrainsScrollingToContentEdge);
#endif
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ if (fullScreenManager()->element() && fullScreenManager()->element()->document()->webkitIsFullScreen())
+ fullScreenManager()->hideFullScreenControls();
+#endif
+
send(Messages::WebPageProxy::DidChangeViewportProperties(attr));
}