[M108 Migration][Viewport] Refactors orientation change and sets custom viewport size
Due to additional resize code called during orientation change,
orientation callback was called too early (when screen
dimensions were not set yet).
Even though resize callback was called again from
RenderWidgetHostImpl::WasResized() when all data was set,
orientation events were not dispatched again (due to the fact,
that orientation was changed during first, early call) and
wrong values of screen dimensions were set as final values.
Chromium-efl consists of Evas_Object widgets which appear on top of
webview resulting in overlapping the web page content, for example,
1) virtual keyboard,
2) popup menu picker.
As for 1), EFL allows auto-resizing the window on vk show/hide by using
elm_conformant widget. Because it does not work for TIZEN 3.0 [1]
Browser app manually resizes webview on vk appearance [2].
As for 2), chromium-efl fully implements select picker internally and
app is not aware of it.
This patch overrides GetVisibleViewportSize() and returns smaller
viewport while showing select picker. According to the comment from [3]
this method allows us to define smaller viewport if a portion of the
view is obstructed.
GetVisibleViewportSize() is always called on any size update and result
in sending a new size to the Renderer.
To make <select> element visible, this patch implements:
EWebView::ScrollFocusedNodeIntoView because
RenderWidgetHostViewEfl::ScrollFocusedEditableNode scrolls webview for
editable elements only.
This change fixes WCS TC 195.
Additionally, refactor picker code in EWebView class:
1. Rename ShowPopupMenu -> HandlePopupMenu
it does not only show picker but also changes viewport.
2. PopupMenuClose and HidePopupMenu return void.
3. PopupMenuClose calls ReleasePopupMenuList as it was already exposed.
4. Get rid of CloseSelectPicker and IsSelectPickerShown as they are
no longer used.
[1] TSAM-537
[2] virtual gfx::Size GetVisibleViewportSize() const = 0
src/content/public/browser/render_widget_host_view.h
Reference: https://review.tizen.org/gerrit/278914
Change-Id: I2fc82ebe04d42d6a2ab21b1bb29d04f5037d4306
Signed-off-by: v-saha <v.saha@samsung.com>
16 files changed: