{
return ecore_x_dpi_get();
}
+
+double ChromeClientEfl::getDPCM()
+{
+ // dpi : dots per inch, dpcm : dots per centimeter
+ // 1 inch = 2.54 cm
+ // So, dpcm = dpi / 2.54
+ int dpi = ecore_x_dpi_get();
+ double dpcm = dpi / 2.54;
+
+ return dpcm;
+}
#endif
void ChromeClientEfl::focus()
#endif
{
#if ENABLE(TIZEN_FORM_SUBMIT_SUPPORT)
- Evas_Object* newView = ewk_view_window_create(m_view, frame, EINA_TRUE, EINA_FALSE, &features, action, frameLoadRequest.frameName());
+ // When new window is created by website's javascript, some target pages doesn't have any signs related to mobile.
+ // So, our browser doesn't show the patch as mobile page. In order to fix this problem, additional parameter is added to window creation
+ // function. - Gyuyoung Kim.
+ Eina_Bool isMobile = EINA_FALSE;
+ String url = frameLoadRequest.resourceRequest().url().string();
+ if (url.startsWith("http://www.facebook.com/connect"))
+ isMobile = EINA_TRUE;
+
+ Evas_Object* newView = ewk_view_window_create(m_view, frame, EINA_TRUE, isMobile, &features, action, frameLoadRequest.frameName());
#else
Evas_Object* newView = ewk_view_window_create(m_view, frame, EINA_TRUE, &features);
#endif
bool ChromeClientEfl::toolbarsVisible()
{
- Eina_Bool visible;
+ bool visible;
ewk_view_toolbars_visible_get(m_view, &visible);
return visible;
bool ChromeClientEfl::statusbarVisible()
{
- Eina_Bool visible;
+ bool visible;
ewk_view_statusbar_visible_get(m_view, &visible);
return visible;
bool ChromeClientEfl::scrollbarsVisible()
{
- Eina_Bool visible;
+ bool visible;
ewk_view_scrollbars_visible_get(m_view, &visible);
return visible;
bool ChromeClientEfl::menubarVisible()
{
- Eina_Bool visible;
+ bool visible;
ewk_view_menubar_visible_get(m_view, &visible);
return visible;
return IntRect();
}
+#if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
+void ChromeClientEfl::setMobileWebAppCapableState(const String& content)
+{
+ if (equalIgnoringCase(content, "yes"))
+ ewk_view_mobile_web_app_capable_state_set(m_view, content.utf8().data());
+}
+
+void ChromeClientEfl::setMobileWebAppStatusBarStyle(const String& content)
+{
+ if (equalIgnoringCase(content, "default")
+ || equalIgnoringCase(content, "black")
+ || equalIgnoringCase(content, "black-translucent"))
+ ewk_view_mobile_web_app_status_bar_style_set(m_view, content.utf8().data());
+}
+#endif
+
+#if ENABLE(TIZEN_SUPPORT_VIEWPORT)
+bool ChromeClientEfl::canContentsSizeChange(Frame* frame, const IntSize& size) const
+{
+ if (ewk_view_frame_main_get(m_view) == kit(frame))
+ return ewk_view_contents_size_change_possible(m_view, size.width(), size.height());
+
+ return true;
+}
+#endif
+
void ChromeClientEfl::contentsSizeChanged(Frame* frame, const IntSize& size) const
{
ewk_frame_contents_size_changed(kit(frame), size.width(), size.height());
ewk_view_contents_size_changed(m_view, size.width(), size.height());
}
-IntRect ChromeClientEfl::windowToScreen(const IntRect& rect) const
+IntRect ChromeClientEfl::rootViewToScreen(const IntRect& rect) const
{
#if ENABLE(TIZEN_SUPPORT_PLUGINS) && ENABLE(TIZEN_CAIRO_SCALE_PATCH)
// mariusz.g@samsung.com
#endif
}
-IntPoint ChromeClientEfl::screenToWindow(const IntPoint& point) const
+IntPoint ChromeClientEfl::screenToRootView(const IntPoint& point) const
{
notImplemented();
return point;
#if ENABLE(NOTIFICATIONS)
NotificationPresenter* ChromeClientEfl::notificationPresenter() const
{
+#if ENABLE(TIZEN_NOTIFICATION)
+ return ewk_view_notification_presenter_get(m_view);
+#endif
notImplemented();
return 0;
}
notImplemented();
}
-void ChromeClientEfl::invalidateWindow(const IntRect& updateRect, bool immediate)
+void ChromeClientEfl::invalidateRootView(const IntRect& updateRect, bool immediate)
{
notImplemented();
}
-void ChromeClientEfl::invalidateContentsAndWindow(const IntRect& updateRect, bool immediate)
+void ChromeClientEfl::invalidateContentsAndRootView(const IntRect& updateRect, bool immediate)
{
if (updateRect.isEmpty())
return;
#if ENABLE(TIZEN_OFFSET_UPDATE)
ewk_view_tiled_offset_update(m_view);
#endif
- invalidateContentsAndWindow(updateRect, immediate);
+ invalidateContentsAndRootView(updateRect, immediate);
}
void ChromeClientEfl::scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect)
notImplemented();
}
-void ChromeClientEfl::dispatchViewportDataDidChange(const ViewportArguments& arguments) const
+void ChromeClientEfl::dispatchViewportPropertiesDidChange(const ViewportArguments& arguments) const
{
ewk_view_viewport_attributes_set(m_view, arguments);
}
#endif
}
+#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
+void ChromeClientEfl::addOrUpdateScrollingLayer(Node*, PlatformLayer* scrollingLayer, PlatformLayer* contentsLayer, const IntSize& scrollSize)
+{
+ ewk_view_add_or_update_scrolling_layer(m_view, scrollingLayer, contentsLayer, scrollSize);
+}
+
+void ChromeClientEfl::removeScrollingLayer(Node*, PlatformLayer* scrollingLayer, PlatformLayer* contentsLayer)
+{
+ ewk_view_remove_scrolling_layer(m_view, scrollingLayer, contentsLayer);
+}
+#endif
+
#if ENABLE(CANVAS_CAIRO_GLES_RENDERING)
void* ChromeClientEfl::sharedCairoDevice()
{
#if ENABLE(FULLSCREEN_API)
bool ChromeClientEfl::supportsFullScreenForElement(const WebCore::Element* element, bool withKeyboard)
{
+#if ENABLE(TIZEN_FULLSCREEN_API)
+ Settings* settings = ewk_view_core_page_get(m_view)->settings();
+ return settings->fullScreenEnabled();
+#endif
+
if (withKeyboard)
return false;