[Title] Add parameter of smartcallback to exit fullscreen element by Hardware back key.
[Problem] P130719-5603
[Cause] There is no way for distinguish the case that user press button to enter fullscreen by default mediaplayer and W3C fullscreen api.
[Solution] Added parameter to smartcallback for WRT.WQ
Change-Id: I045e73964112df15c1c2ee03e5471810c37a4169
, m_fullScreenRenderer(0)
, m_fullScreenChangeDelayTimer(this, &Document::fullScreenChangeDelayTimerFired)
, m_isAnimatingFullScreen(false)
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ , m_exitFullScreenByHwBackKey(false)
+#endif
#endif
, m_loadEventDelayCount(0)
, m_loadEventDelayTimer(this, &Document::loadEventDelayTimerFired)
// 5. Return, and run the remaining steps asynchronously.
// 6. Optionally, perform some animation.
m_areKeysEnabledInFullScreen = flags & Element::ALLOW_KEYBOARD_INPUT;
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ m_exitFullScreenByHwBackKey = flags & Element::HARDWARE_BACKKEY_EXIT;
+#endif
page()->chrome()->client()->enterFullScreenForElement(element);
// 7. Optionally, display a message indicating how the user can exit displaying the context object fullscreen.
m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(false);
m_areKeysEnabledInFullScreen = false;
-
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ m_exitFullScreenByHwBackKey = false;
+#endif
+
if (m_fullScreenRenderer)
m_fullScreenRenderer->unwrapRenderer();
void removeFullScreenElementOfSubtree(Node*, bool amongChildrenOnly = false);
bool isAnimatingFullScreen() const;
void setAnimatingFullScreen(bool);
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ bool exitFullScreenByHwBackKey() const { return m_exitFullScreenByHwBackKey; }
+#endif
// W3C API
bool webkitFullscreenEnabled() const;
Deque<RefPtr<Node> > m_fullScreenChangeEventTargetQueue;
Deque<RefPtr<Node> > m_fullScreenErrorEventTargetQueue;
bool m_isAnimatingFullScreen;
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ bool m_exitFullScreenByHwBackKey;
+#endif
LayoutRect m_savedPlaceholderFrameRect;
RefPtr<RenderStyle> m_savedPlaceholderRenderStyle;
#endif
enum {
ALLOW_KEYBOARD_INPUT = 1 << 0,
LEGACY_MOZILLA_REQUEST = 1 << 1,
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ HARDWARE_BACKKEY_EXIT = 1 << 2
+#endif
};
void webkitRequestFullScreen(unsigned short flags);
#if ENABLE(FULLSCREEN_API)
if (document() && document()->settings() && document()->settings()->fullScreenEnabled()) {
document()->requestFullScreenForElement(this, 0, Document::ExemptIFrameAllowFullScreenRequirement);
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ scheduleEvent(eventNames().webkitbeginfullscreenEvent);
+#endif
return;
}
#endif
#if ENABLE(FULLSCREEN_API)
if (document() && document()->settings() && document()->settings()->fullScreenEnabled()) {
- if (document()->webkitIsFullScreen() && document()->webkitCurrentFullScreenElement() == this)
+ if (document()->webkitIsFullScreen() && document()->webkitCurrentFullScreenElement() == this) {
document()->webkitCancelFullScreen();
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ scheduleEvent(eventNames().webkitendfullscreenEvent);
+#endif
+ }
return;
}
#endif
void* HTMLMediaElement::preDispatchEventHandler(Event* event)
{
- if (event && event->type() == eventNames().webkitfullscreenchangeEvent) {
+ if (event && event->type() == eventNames().webkitfullscreenchangeEvent)
configureMediaControls();
-#if ENABLE(TIZEN_GSTREAMER_VIDEO)
- if (!isFullscreen())
- scheduleEvent(eventNames().webkitendfullscreenEvent);
-#endif
- }
return 0;
}
if (document()->webkitIsFullScreen() && document()->webkitCurrentFullScreenElement() == toParentMediaElement(this))
document()->webkitCancelFullScreen();
else {
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ document()->requestFullScreenForElement(toParentMediaElement(this), Element::HARDWARE_BACKKEY_EXIT, Document::ExemptIFrameAllowFullScreenRequirement);
+#else
document()->requestFullScreenForElement(toParentMediaElement(this), 0, Document::ExemptIFrameAllowFullScreenRequirement);
+#endif
}
} else
#endif
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
ewk_view_main_frame_scrollbar_visible_set(impl->view(), false);
- evas_object_smart_callback_call(impl->view(), "fullscreen,enterfullscreen", 0);
+ bool isNeed = impl->page()->fullScreenManager()->exitFullScreenByHwBackKey();
+ evas_object_smart_callback_call(impl->view(), "fullscreen,enterfullscreen", &isNeed);
return true;
}
: m_page(page)
, m_webView(0)
, m_isFullScreen(false)
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ , m_exitFullScreenByHwBackKey(false)
+#endif
{
}
void requestExitFullScreen();
#if ENABLE(TIZEN_FULLSCREEN_API)
+ bool exitFullScreenByHwBackKey() { return m_exitFullScreenByHwBackKey; }
+ void setExitFullScreenByHwBackKey(bool);
void updateMediaControlsStyle();
#endif
WebPageProxy* m_page;
PlatformWebView* m_webView;
bool m_isFullScreen;
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ bool m_exitFullScreenByHwBackKey;
+#endif
void didReceiveWebFullScreenManagerProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
void didReceiveSyncWebFullScreenManagerProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder* arguments, OwnPtr<CoreIPC::ArgumentEncoder>& reply);
BeganEnterFullScreen(WebCore::IntRect initialRect, WebCore::IntRect finalRect)
BeganExitFullScreen(WebCore::IntRect initialRect, WebCore::IntRect finalRect)
Close()
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ SetExitFullScreenByHwBackKey(bool isNeeded)
+#endif
}
#endif
didExitFullScreen();
m_isFullScreen = false;
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ setExitFullScreenByHwBackKey(false);
+#endif
}
#if ENABLE(TIZEN_FULLSCREEN_API)
{
m_page->process()->send(Messages::WebFullScreenManager::updateMediaControlsStyle(), m_page->pageID());
}
+
+void WebFullScreenManagerProxy::setExitFullScreenByHwBackKey(bool isNeeded)
+{
+ m_exitFullScreenByHwBackKey = isNeeded;
+}
#endif
void WebFullScreenManagerProxy::beganEnterFullScreen(const IntRect& initialFrame, const IntRect& finalFrame)
if (m_client.enterFullScreenForElement) {
RefPtr<InjectedBundleNodeHandle> nodeHandle = InjectedBundleNodeHandle::getOrCreate(element);
m_client.enterFullScreenForElement(toAPI(page), toAPI(nodeHandle.get()));
- } else
+ } else {
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ if (element && element->document() && element->document()->exitFullScreenByHwBackKey())
+ page->send(Messages::WebFullScreenManagerProxy::SetExitFullScreenByHwBackKey(true));
+#endif
page->send(Messages::WebFullScreenManagerProxy::EnterFullScreen());
+ }
}
void InjectedBundlePageFullScreenClient::exitFullScreenForElement(WebPage *page, WebCore::Element *element)