RVH::SetTextZoomFactor was removed from s-chromium.
This patch fixes broken path to set text zoom factor.
Bug: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=14514
Reviewed by: a1.gomes, hh4813.kim, sns.park
Change-Id: I4f0959b2215a0eb9425817a84ea91ff1e8406db3
Signed-off-by: Sanghyup Lee <sh53.lee@samsung.com>
IPC_MESSAGE_ROUTED1(ViewMsg_SetViewMode,
blink::WebViewMode /* view_mode */)
+IPC_MESSAGE_ROUTED1(ViewMsg_SetTextZoomFactor,
+ float /*font zoom factor*/)
+
IPC_MESSAGE_ROUTED1(EwkFrameMsg_LoadNotFoundErrorPage,
std::string /* error url */)
text_zoom_factor_ = text_zoom_factor;
RenderViewHost* render_view_host = web_contents_->GetRenderViewHost();
-#if !defined(EWK_BRINGUP)
-// [M47_2526] The SetTextZoomFactor API was removed in RenderViewHost class
-// FIXME: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=14514
- if (render_view_host)
- render_view_host->SetTextZoomFactor(text_zoom_factor);
-#endif
+ if (!render_view_host)
+ return;
+
+ render_view_host->Send(new ViewMsg_SetTextZoomFactor(
+ render_view_host->GetRoutingID(), text_zoom_factor));
}
double EWebView::GetPageZoomFactor() const {
IPC_MESSAGE_HANDLER(EwkViewMsg_ResumeScheduledTasks, OnResumeScheduledTasks);
IPC_MESSAGE_HANDLER(EwkSettingsMsg_UpdateWebKitPreferencesEfl, OnUpdateWebKitPreferencesEfl);
IPC_MESSAGE_HANDLER(ViewMsg_SetViewMode, OnSetViewMode);
+ IPC_MESSAGE_HANDLER(ViewMsg_SetTextZoomFactor, OnSetTextZoomFactor)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
Send(new EwkHostMsg_HandleTapGestureWithContext(render_view()->GetRoutingID(),
hit_link, hit_content_editable));
}
+
+void RenderViewObserverEfl::OnSetTextZoomFactor(float zoom_factor) {
+ blink::WebView* view = render_view()->GetWebView();
+ if (!view)
+ return;
+
+ // Hide selection and autofill popups.
+ view->hidePopups();
+ view->setTextZoomFactor(zoom_factor);
+}
// This function sets CSS "view-mode" media feature value.
void OnSetViewMode(blink::WebViewMode view_mode);
+ void OnSetTextZoomFactor(float zoom_factor);
float cached_min_page_scale_factor_;
float cached_max_page_scale_factor_;