From 9c8c6c7f3bd227828381955cd12294ba0a782da7 Mon Sep 17 00:00:00 2001 From: Antonio Gomes Date: Tue, 19 May 2015 11:29:28 -0400 Subject: [PATCH] Make egde effect effective Now that Edge Effect is brought up (see [1]), patch make it effective for scroll/pinch gestures. What is does? It hides the overscroll indicator when it is not needed. [1] http://165.213.202.130/gerrit/#/c/76762/ : Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=13002 Reviewed by: Piotr Tworek, arno renevier Change-Id: I98a80374d6b8424b9af80a862c5795b21fc28a00 Signed-off-by: Antonio Gomes --- .../browser/renderer_host/render_widget_host_view_efl.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc b/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc index 33839c7..e4548de 100644 --- a/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc +++ b/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc @@ -1400,7 +1400,10 @@ void RenderWidgetHostViewEfl::HandleGesture( was_scrolled_ = true; if (GetSelectionController()) GetSelectionController()->SetScrollStatus(true); - } else if (web_view_ && event.type == blink::WebInputEvent::GestureScrollUpdate) { + } else +#endif + DCHECK(edge_effect_.get()); + if (event.type == blink::WebInputEvent::GestureScrollUpdate) { if (event.data.scrollUpdate.deltaX < 0) edge_effect_->Hide("edge,left"); else if (event.data.scrollUpdate.deltaX > 0) @@ -1409,12 +1412,11 @@ void RenderWidgetHostViewEfl::HandleGesture( edge_effect_->Hide("edge,top"); else if (event.data.scrollUpdate.deltaY > 0) edge_effect_->Hide("edge,bottom"); - } else if (web_view_ && event.type == blink::WebInputEvent::GesturePinchBegin) { + } else if (event.type == blink::WebInputEvent::GesturePinchBegin) { edge_effect_->Disable(); - } else if (web_view_ && event.type == blink::WebInputEvent::GesturePinchEnd) { + } else if (event.type == blink::WebInputEvent::GesturePinchEnd) { edge_effect_->Enable(); } -#endif } void RenderWidgetHostViewEfl::HandleGesture(ui::GestureEvent* event) { -- 2.7.4