From 2540e206b50ea0d36afb6639d77d86dd7e761ffc Mon Sep 17 00:00:00 2001 From: "ayush.k123" Date: Fri, 10 Feb 2023 08:42:20 +0530 Subject: [PATCH] [M108 Migration][NativeControl] Select Picker This CL 1. Includes changes required for select picker feature and its refactoring. 2. Fixes Backward/Foward buttons in SelectPicker TC. 3. Makes changes to handle popup resize in a better way. 4. Segregates SelectPicker into ewk independant base classes 5. Removes Listbox rendering for Multiple Select for TV Reference: https://review.tizen.org/gerrit/280120/ https://review.tizen.org/gerrit/280208/ https://review.tizen.org/gerrit/280225/ https://review.tizen.org/gerrit/280633/ https://review.tizen.org/gerrit/281109/ Change-Id: I104484fe74197e104537c01f53b57dc9e65546e3 Signed-off-by: Ayush Kumar --- third_party/blink/public/web/web_view.h | 29 + .../blink/renderer/core/exported/web_view_impl.cc | 236 +++ .../blink/renderer/core/exported/web_view_impl.h | 35 + .../core/html/forms/external_popup_menu.cc | 6 + .../chromium_impl/content/browser/browser_efl.gni | 10 + .../browser/select_picker/form_navigable_picker.cc | 207 +++ .../browser/select_picker/form_navigable_picker.h | 73 + .../browser/select_picker/select_picker_base.cc | 231 +++ .../browser/select_picker/select_picker_base.h | 78 + .../select_picker/select_picker_mobile_base.cc | 164 ++ .../select_picker/select_picker_mobile_base.h | 39 + .../browser/select_picker/select_picker_tv_base.cc | 55 + .../browser/select_picker/select_picker_tv_base.h | 31 + .../browser/select_picker/select_picker_util.cc | 62 + .../browser/select_picker/select_picker_util.h | 43 + .../core/layout/layout_theme_chromium_tizen.cc | 2 +- tizen_src/ewk/efl_integration/BUILD.gn | 9 +- .../browser/select_picker/select_picker_mobile.cc | 45 + .../browser/select_picker/select_picker_mobile.h | 34 + .../browser/select_picker/select_picker_tv.cc | 49 + .../browser/select_picker/select_picker_tv.h | 34 + .../browser/selectpicker/popup_menu_item.cc | 77 - .../browser/selectpicker/popup_menu_item.h | 144 -- .../browser/selectpicker/popup_menu_item_private.h | 35 - .../browser/selectpicker/popup_picker.cc | 492 ------ .../browser/selectpicker/popup_picker.h | 68 - .../browser/web_view_browser_message_filter.cc | 11 + tizen_src/ewk/efl_integration/eweb_view.cc | 249 +-- tizen_src/ewk/efl_integration/eweb_view.h | 31 +- .../renderer/render_frame_observer_efl.cc | 42 +- .../renderer/render_frame_observer_efl.h | 3 - tizen_src/ewk/efl_integration/resource/BUILD.gn | 9 +- tizen_src/ewk/efl_integration/resource/control.edc | 9 +- .../ewk/efl_integration/resource/controlTV.edc | 1833 ++++++++++++++++++++ .../resource/images/highlight_stroke.png | Bin 0 -> 1134 bytes .../resource/images/obe_list_scroll_down.png | Bin 0 -> 3183 bytes .../resource/images/obe_list_scroll_down_f.png | Bin 0 -> 3186 bytes .../resource/images/obe_list_scroll_up.png | Bin 0 -> 3198 bytes .../resource/images/obe_list_scroll_up_f.png | Bin 0 -> 3200 bytes .../web_contents_efl_delegate_ewk.cc | 2 +- .../efl_integration/web_contents_observer_efl.cc | 7 +- 41 files changed, 3407 insertions(+), 1077 deletions(-) create mode 100644 tizen_src/chromium_impl/content/browser/select_picker/form_navigable_picker.cc create mode 100644 tizen_src/chromium_impl/content/browser/select_picker/form_navigable_picker.h create mode 100644 tizen_src/chromium_impl/content/browser/select_picker/select_picker_base.cc create mode 100644 tizen_src/chromium_impl/content/browser/select_picker/select_picker_base.h create mode 100644 tizen_src/chromium_impl/content/browser/select_picker/select_picker_mobile_base.cc create mode 100644 tizen_src/chromium_impl/content/browser/select_picker/select_picker_mobile_base.h create mode 100644 tizen_src/chromium_impl/content/browser/select_picker/select_picker_tv_base.cc create mode 100644 tizen_src/chromium_impl/content/browser/select_picker/select_picker_tv_base.h create mode 100644 tizen_src/chromium_impl/content/browser/select_picker/select_picker_util.cc create mode 100644 tizen_src/chromium_impl/content/browser/select_picker/select_picker_util.h create mode 100644 tizen_src/ewk/efl_integration/browser/select_picker/select_picker_mobile.cc create mode 100644 tizen_src/ewk/efl_integration/browser/select_picker/select_picker_mobile.h create mode 100644 tizen_src/ewk/efl_integration/browser/select_picker/select_picker_tv.cc create mode 100644 tizen_src/ewk/efl_integration/browser/select_picker/select_picker_tv.h delete mode 100644 tizen_src/ewk/efl_integration/browser/selectpicker/popup_menu_item.cc delete mode 100644 tizen_src/ewk/efl_integration/browser/selectpicker/popup_menu_item.h delete mode 100644 tizen_src/ewk/efl_integration/browser/selectpicker/popup_menu_item_private.h delete mode 100644 tizen_src/ewk/efl_integration/browser/selectpicker/popup_picker.cc delete mode 100644 tizen_src/ewk/efl_integration/browser/selectpicker/popup_picker.h create mode 100644 tizen_src/ewk/efl_integration/resource/controlTV.edc create mode 100644 tizen_src/ewk/efl_integration/resource/images/highlight_stroke.png create mode 100644 tizen_src/ewk/efl_integration/resource/images/obe_list_scroll_down.png create mode 100644 tizen_src/ewk/efl_integration/resource/images/obe_list_scroll_down_f.png create mode 100644 tizen_src/ewk/efl_integration/resource/images/obe_list_scroll_up.png create mode 100644 tizen_src/ewk/efl_integration/resource/images/obe_list_scroll_up_f.png diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h index 91135d7..f8ad0aa 100644 --- a/third_party/blink/public/web/web_view.h +++ b/third_party/blink/public/web/web_view.h @@ -366,6 +366,20 @@ class BLINK_EXPORT WebView { virtual void SetDeviceColorSpaceForTesting( const gfx::ColorSpace& color_space) = 0; +#if BUILDFLAG(IS_EFL) + enum class TraverseFocusThrough : char { + EditableElement = 1 << 0, + SelectElement = 1 << 1, + EditableAndSelectElements = EditableElement | SelectElement + }; + virtual bool MoveFocusToPrevious( + TraverseFocusThrough = + TraverseFocusThrough::EditableAndSelectElements) = 0; + virtual bool MoveFocusToNext( + TraverseFocusThrough = + TraverseFocusThrough::EditableAndSelectElements) = 0; +#endif + // Scheduling ----------------------------------------------------------- virtual PageScheduler* Scheduler() const = 0; @@ -498,4 +512,19 @@ class BLINK_EXPORT WebView { } // namespace blink +#if BUILDFLAG(IS_EFL) +static inline blink::WebView::TraverseFocusThrough operator|( + blink::WebView::TraverseFocusThrough a, + blink::WebView::TraverseFocusThrough b) { + return static_cast( + static_cast(a) | static_cast(b)); +} +static inline blink::WebView::TraverseFocusThrough operator&( + blink::WebView::TraverseFocusThrough a, + blink::WebView::TraverseFocusThrough b) { + return static_cast( + static_cast(a) & static_cast(b)); +} +#endif + #endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_VIEW_H_ diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc index ab133fb..dc80bce 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc @@ -196,7 +196,11 @@ #if BUILDFLAG(IS_EFL) #include "third_party/blink/renderer/core/dom/container_node.h" +#include "third_party/blink/renderer/core/dom/parent_node.h" #include "third_party/blink/renderer/core/dom/static_node_list.h" +#include "third_party/blink/renderer/core/html/forms/html_form_element.h" +#include "third_party/blink/renderer/core/html/forms/html_input_element.h" +#include "third_party/blink/renderer/core/html/forms/html_select_element.h" #endif #if BUILDFLAG(IS_TIZEN) @@ -4021,6 +4025,238 @@ void WebViewImpl::ScrollFocusedNodeIntoView() { if (Element* element = FocusedElement()) element->scrollIntoViewIfNeeded(true /*centerIfNeeded*/); } + +bool WebViewImpl::FiltersInSelectElement(WebView::TraverseFocusThrough filter) { + return static_cast((char)filter & + (char)WebView::TraverseFocusThrough::SelectElement); +} + +bool WebViewImpl::FiltersInEditableElement( + WebView::TraverseFocusThrough filter) { + return static_cast( + (char)filter & (char)WebView::TraverseFocusThrough::EditableElement); +} + +bool WebViewImpl::IsFormNavigationTextInput(Element& element) const { + if (element.HasTagName(html_names::kInputTag) && + DynamicTo(element)->IsReadOnly()) { + return false; + } + + LayoutObject* renderer = element.GetLayoutObject(); + return renderer && + (IsEditable(element) || renderer->IsTextControlIncludingNG()); +} + +bool WebViewImpl::IsSelectElement(const Element& element) const { + return element.GetLayoutObject() && + element.HasTagName(html_names::kSelectTag); +} + +gfx::Rect WebViewImpl::GetElementBounds(const Element& element) const { + element.GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kFocus); + gfx::Rect absolute_rect = ToPixelSnappedRect(element.Node::BoundingBox()); + return (element.GetDocument().View() + ? element.GetDocument().View()->FrameToViewport(absolute_rect) + : gfx::Rect()); +} + +bool WebViewImpl::PerformClickOnElement(Element& element) { + if (gfx::Rect() == GetElementBounds(element)) + return false; + + // Set focus to false to compare it with focusedElement of document. + element.Focus(); + + Element* focus_element = FocusedElement(); + + if (!focus_element || focus_element != &element) + return false; + + // SimulatedClickCreationScope::kFromAccessibility simulates MouseUpDown + // Events + focus_element->DispatchSimulatedClick( + nullptr, SimulatedClickCreationScope::kFromAccessibility); + + if (IsFormNavigationTextInput(*focus_element)) { + LocalFrame* focused_frame = DynamicTo(FocusedCoreFrame()); + WebTextInputInfo info = + focused_frame->GetInputMethodController().TextInputInfo(); + focused_frame->GetInputMethodController().SetEditableSelectionOffsets( + PlainTextRange(info.selection_start, info.selection_end)); + } + + return true; +} + +Element* WebViewImpl::NextTextOrSelectElement(Element* element, + TraverseFocusThrough filter) { + if (!element) + return 0; + + Element* next_element = element; + + if (next_element->IsFrameOwnerElement()) { + HTMLFrameOwnerElement& htmlFrameOwnerElement = + *DynamicTo(next_element); + + // Checks if the frame is empty or not. + if (!htmlFrameOwnerElement.ContentFrame()) + return 0; + + Document* owner_document = htmlFrameOwnerElement.contentDocument(); + if (!owner_document || !(next_element = owner_document->body())) + return 0; + + // Checks if content editable flag on body has set. + if (IsEditable(*next_element) && FiltersInEditableElement(filter)) + return next_element; + } + + while ((next_element = ElementTraversal::Next(*next_element))) { + if (next_element->HasTagName(html_names::kIFrameTag) || + next_element->HasTagName(html_names::kFrameTag)) { + Element* frame_owner_element = next_element; + + next_element = NextTextOrSelectElement(next_element, filter); + if (!next_element) { + next_element = frame_owner_element; + continue; + } + } + if (FiltersInSelectElement(filter) && IsSelectElement(*next_element)) + break; + } + + // If couldn't find anything in the current document scope, + // try finding in other document scope if present any. + if (!next_element) { + if (element->GetDocument().GetFrame() != MainFrameImpl()->GetFrame() && + !element->IsFrameOwnerElement()) { + next_element = NextTextOrSelectElement( + ElementTraversal::Next(*element->GetDocument().LocalOwner()), filter); + } + } + + return next_element; +} + +Element* WebViewImpl::PreviousTextOrSelectElement(Element* element, + TraverseFocusThrough filter) { + if (!element) + return 0; + + Element* previous_element = element; + + if (previous_element->IsFrameOwnerElement()) { + HTMLFrameOwnerElement& htmlFrameOwnerElement = + *DynamicTo(previous_element); + // Checks if the frame is empty or not. + if (!htmlFrameOwnerElement.ContentFrame()) + return 0; + + Document* owner_document = htmlFrameOwnerElement.contentDocument(); + if (!owner_document) + return 0; + + previous_element = ParentNode::lastElementChild(*owner_document); + while (previous_element && ElementTraversal::FirstWithin(*previous_element)) + previous_element = ParentNode::lastElementChild(*previous_element); + + if (!previous_element) + return 0; + + if (previous_element->IsFocusable()) { + if (FiltersInEditableElement(filter) && + IsFormNavigationTextInput(*previous_element)) + return previous_element; + if (FiltersInSelectElement(filter) && IsSelectElement(*previous_element)) + return previous_element; + } + } + + while ((previous_element = ElementTraversal::Previous(*previous_element))) { + if (previous_element->HasTagName(html_names::kIFrameTag) || + previous_element->HasTagName(html_names::kFrameTag)) { + Element* frame_owner_element = previous_element; + + previous_element = PreviousTextOrSelectElement(previous_element, filter); + if (!previous_element) { + previous_element = frame_owner_element; + continue; + } + } + + if (!previous_element->IsFocusable()) + continue; + + if (FiltersInEditableElement(filter) && + IsFormNavigationTextInput(*previous_element)) { + break; + } + + if (FiltersInSelectElement(filter) && IsSelectElement(*previous_element)) + break; + } + + // If couldn't find anything in the current document scope, + // try finding in other document scope if present any. + if (!previous_element && + element->GetDocument().GetFrame() != MainFrameImpl()->GetFrame() && + !element->IsFrameOwnerElement()) { + previous_element = PreviousTextOrSelectElement( + ElementTraversal::Previous(*element->GetDocument().LocalOwner()), + filter); + } + + return previous_element; +} + +bool WebViewImpl::MoveFocusToNext(TraverseFocusThrough filter) { + Element* focus_element = FocusedElement(); + if (!focus_element || (!IsFormNavigationTextInput(*focus_element) && + !IsSelectElement(*focus_element))) { + return false; + } + + Element* next_element = NextTextOrSelectElement(focus_element, filter); + if (!next_element) + return false; + + // Scroll the element into center of screen. + next_element->scrollIntoViewIfNeeded(true /*centerIfNeeded*/); + + bool handled = PerformClickOnElement(*next_element); + + if (FocusedFrame() && IsFormNavigationTextInput(*next_element)) + FocusedFrame()->ExecuteCommand(WebString::FromUTF8("MoveToEndOfDocument")); + + return handled; +} + +bool WebViewImpl::MoveFocusToPrevious(TraverseFocusThrough filter) { + Element* focus_element = FocusedElement(); + + if (!focus_element || (!IsFormNavigationTextInput(*focus_element) && + !IsSelectElement(*focus_element))) { + return false; + } + + Element* previous_element = + PreviousTextOrSelectElement(focus_element, filter); + if (!previous_element) + return false; + + // Scroll the element into center of screen. + previous_element->scrollIntoViewIfNeeded(true /*centerIfNeeded*/); + + bool handled = PerformClickOnElement(*previous_element); + + if (FocusedFrame() && IsFormNavigationTextInput(*previous_element)) + FocusedFrame()->ExecuteCommand(WebString::FromUTF8("MoveToEndOfDocument")); + + return handled; +} #endif #if defined(TIZEN_VIDEO_HOLE) diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h index 5c3d4a2..11556ab 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h @@ -151,6 +151,14 @@ class CORE_EXPORT WebViewImpl final : public WebView, void SetNoStatePrefetchClient(WebNoStatePrefetchClient*) override; WebSettings* GetSettings() override; WebString PageEncoding() const override; +#if BUILDFLAG(IS_EFL) + bool MoveFocusToNext( + TraverseFocusThrough = + TraverseFocusThrough::EditableAndSelectElements) override; + bool MoveFocusToPrevious( + TraverseFocusThrough = + TraverseFocusThrough::EditableAndSelectElements) override; +#endif void SetTabKeyCyclesThroughElements(bool value) override; bool IsActive() const override; void SetIsActive(bool value) override; @@ -410,6 +418,10 @@ class CORE_EXPORT WebViewImpl final : public WebView, void MainFrameLayoutUpdated(); void ResizeAfterLayout(); void DidCommitCompositorFrameForLocalMainFrame(); +#if BUILDFLAG(IS_EFL) + bool FiltersInSelectElement(WebView::TraverseFocusThrough filter); + bool FiltersInEditableElement(WebView::TraverseFocusThrough filter); +#endif void DidChangeContentsSize(); void PageScaleFactorChanged(); void OutermostMainFrameScrollOffsetChanged(); @@ -683,6 +695,17 @@ class CORE_EXPORT WebViewImpl final : public WebView, scheduler::WebAgentGroupScheduler& agent_group_scheduler, const SessionStorageNamespaceId& session_storage_namespace_id, absl::optional page_base_background_color); + +#if BUILDFLAG(IS_EFL) + enum FormInputAction { + FormInputNone = 0x00, + FormInputPrevText = 0x01, + FormInputPrevSelect = 0x02, + FormInputNextText = 0x04, + FormInputNextSelect = 0x08, + }; +#endif + ~WebViewImpl() override; void ConfigureAutoResizeMode(); @@ -911,6 +934,18 @@ class CORE_EXPORT WebViewImpl final : public WebView, web_pref::WebPreferences web_preferences_; blink::RendererPreferences renderer_preferences_; +#if BUILDFLAG(IS_EFL) + bool IsFormNavigationTextInput(Element&) const; + bool IsSelectElement(const Element&) const; + bool PerformClickOnElement(Element&); + Element* NextTextOrSelectElement( + Element*, + TraverseFocusThrough = TraverseFocusThrough::EditableAndSelectElements); + Element* PreviousTextOrSelectElement( + Element*, + TraverseFocusThrough = TraverseFocusThrough::EditableAndSelectElements); + gfx::Rect GetElementBounds(const Element&) const; +#endif // The local root whose document has |popup_mouse_wheel_event_listener_| // registered. diff --git a/third_party/blink/renderer/core/html/forms/external_popup_menu.cc b/third_party/blink/renderer/core/html/forms/external_popup_menu.cc index e28ce00..d953952 100644 --- a/third_party/blink/renderer/core/html/forms/external_popup_menu.cc +++ b/third_party/blink/renderer/core/html/forms/external_popup_menu.cc @@ -252,7 +252,13 @@ void ExternalPopupMenu::DidAcceptIndices(const Vector& indices) { list_indices.push_back(ToPopupMenuItemIndex(indices[i], *owner_element)); owner_element->SelectMultipleOptionsByPopup(list_indices); } + +#if !BUILDFLAG(IS_EFL) + // Reset disconnects popup_client which will hide the popup menu. + // Which is not the expected behavior for EFL port after choosing a item in + // select menu. Reset(); +#endif } void ExternalPopupMenu::DidCancel() { diff --git a/tizen_src/chromium_impl/content/browser/browser_efl.gni b/tizen_src/chromium_impl/content/browser/browser_efl.gni index 3c93549..5532b96 100644 --- a/tizen_src/chromium_impl/content/browser/browser_efl.gni +++ b/tizen_src/chromium_impl/content/browser/browser_efl.gni @@ -99,6 +99,16 @@ external_content_browser_efl_sources = [ "//tizen_src/chromium_impl/content/browser/selection/selection_handle_efl.h", "//tizen_src/chromium_impl/content/browser/selection/selection_magnifier_efl.cc", "//tizen_src/chromium_impl/content/browser/selection/selection_magnifier_efl.h", + "//tizen_src/chromium_impl/content/browser/select_picker/form_navigable_picker.cc", + "//tizen_src/chromium_impl/content/browser/select_picker/form_navigable_picker.h", + "//tizen_src/chromium_impl/content/browser/select_picker/select_picker_base.cc", + "//tizen_src/chromium_impl/content/browser/select_picker/select_picker_base.h", + "//tizen_src/chromium_impl/content/browser/select_picker/select_picker_mobile_base.cc", + "//tizen_src/chromium_impl/content/browser/select_picker/select_picker_mobile_base.h", + "//tizen_src/chromium_impl/content/browser/select_picker/select_picker_tv_base.cc", + "//tizen_src/chromium_impl/content/browser/select_picker/select_picker_tv_base.h", + "//tizen_src/chromium_impl/content/browser/select_picker/select_picker_util.cc", + "//tizen_src/chromium_impl/content/browser/select_picker/select_picker_util.h", "//tizen_src/chromium_impl/content/browser/tracing/tracing_controller_efl.cc", "//tizen_src/chromium_impl/content/browser/tracing/tracing_controller_efl.h", "//tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.cc", diff --git a/tizen_src/chromium_impl/content/browser/select_picker/form_navigable_picker.cc b/tizen_src/chromium_impl/content/browser/select_picker/form_navigable_picker.cc new file mode 100644 index 0000000..2d3d543 --- /dev/null +++ b/tizen_src/chromium_impl/content/browser/select_picker/form_navigable_picker.cc @@ -0,0 +1,207 @@ +// Copyright 2016 Samsung Electronics. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "content/browser/select_picker/form_navigable_picker.h" + +#include "base/files/file_path.h" +#include "base/path_service.h" +#include "content/browser/renderer_host/render_frame_host_impl.h" +#include "content/common/paths_efl.h" +#include "tizen_src/ewk/efl_integration/common/web_contents_utils.h" + +#if BUILDFLAG(IS_TIZEN) +#include +#endif + +namespace { +const char* const kMouseClicked1 = "mouse,clicked,1"; +const char* const kImagePrevBgObj = "elm.image.prev_bg"; +const char* const kImageNextBgObj = "elm.image.next_bg"; +const char* const kImageDoneBgObj = "elm.image.done_bg"; +const char* const kDimmObj = "dimm"; +} // namespace + +FormNavigablePicker::FormNavigablePicker(Evas_Object* evas_object, + int selected_index, + bool is_multi_select) + : SelectPickerBase(evas_object, selected_index, is_multi_select), + form_navigator_info_{0, 0, true, true} { + ecore_events_filter_ = + ecore_event_filter_add(nullptr, EcoreEventFilterCallback, nullptr, this); + if (!ecore_events_filter_) + LOG(ERROR) << "Unable to create ecore events filter"; +} + +void FormNavigablePicker::RegisterCallbacks() { + auto edje_obj = elm_layout_edje_get(layout_); + edje_object_signal_callback_add(edje_obj, kMouseClicked1, kImagePrevBgObj, + NavigateToPrevCallback, this); + edje_object_signal_callback_add(edje_obj, kMouseClicked1, kImageNextBgObj, + NavigateToNextCallback, this); + edje_object_signal_callback_add(edje_obj, kMouseClicked1, kImageDoneBgObj, + ListClosedCallback, this); + edje_object_signal_callback_add(edje_obj, kMouseClicked1, kDimmObj, + ListClosedCallback, this); +#if BUILDFLAG(IS_TIZEN) + eext_object_event_callback_add(layout_, EEXT_CALLBACK_BACK, HWBackKeyCallback, + this); +#endif + evas_object_event_callback_add(evas_object_, EVAS_CALLBACK_KEY_UP, + KeyUpCallback, this); + evas_object_propagate_events_set(layout_, false); +} + +void FormNavigablePicker::UnregisterCallbacks() { + auto edje_obj = elm_layout_edje_get(layout_); + edje_object_signal_callback_del(edje_obj, kMouseClicked1, kImagePrevBgObj, + NavigateToPrevCallback); + edje_object_signal_callback_del(edje_obj, kMouseClicked1, kImageNextBgObj, + NavigateToNextCallback); + edje_object_signal_callback_del(edje_obj, kMouseClicked1, kImageDoneBgObj, + ListClosedCallback); + edje_object_signal_callback_del(edje_obj, kMouseClicked1, kDimmObj, + ListClosedCallback); +#if defined(OS_TIZEN) + eext_object_event_callback_del(layout_, EEXT_CALLBACK_BACK, + HWBackKeyCallback); +#endif + evas_object_event_callback_del(evas_object_, EVAS_CALLBACK_KEY_UP, + KeyUpCallback); + if (ecore_events_filter_) + ecore_event_filter_del(ecore_events_filter_); +} + +void FormNavigablePicker::ShowButtons() { + auto edje_obj = elm_layout_edje_get(layout_); + edje_object_signal_emit(edje_obj, "show,prev_button,signal", ""); + edje_object_signal_emit(edje_obj, "show,next_button,signal", ""); + edje_object_signal_emit(edje_obj, "show,picker,signal", ""); +} + +void FormNavigablePicker::UpdateFormNavigation(int form_element_count, + int current_node_index) { + form_navigator_info_ = {form_element_count, current_node_index}; + UpdateNavigationButtons(); +} + +void FormNavigablePicker::UpdateNavigationButtons() { + auto edje_obj = elm_layout_edje_get(layout_); + if (form_navigator_info_.index > 0 && !form_navigator_info_.is_prev) { + edje_object_signal_emit(edje_obj, "enable,prev_button,signal", ""); + form_navigator_info_.is_prev = true; + } else if (form_navigator_info_.index == 0) { + edje_object_signal_emit(edje_obj, "disable,prev_button,signal", ""); + form_navigator_info_.is_prev = false; + } + if (form_navigator_info_.index < form_navigator_info_.count - 1 && + !form_navigator_info_.is_next) { + edje_object_signal_emit(edje_obj, "enable,next_button,signal", ""); + form_navigator_info_.is_next = true; + } else if (form_navigator_info_.index == form_navigator_info_.count - 1) { + edje_object_signal_emit(edje_obj, "disable,next_button,signal", ""); + form_navigator_info_.is_next = false; + } +} + +void FormNavigablePicker::RegisterCallbacks(const char* edj, bool overlay) { + base::FilePath edj_dir; + base::FilePath control_edj; + base::PathService::Get(PathsEfl::EDJE_RESOURCE_DIR, &edj_dir); + control_edj = edj_dir.Append(FILE_PATH_LITERAL(edj)); + if (!elm_layout_file_set(layout_, control_edj.AsUTF8Unsafe().c_str(), + "elm/picker")) { + LOG(ERROR) << "error elm_layout_file_set, " << edj; + } else { + if (overlay) + elm_theme_overlay_add(nullptr, control_edj.AsUTF8Unsafe().c_str()); + RegisterCallbacks(); + } + ShowButtons(); +} + +Evas_Object* FormNavigablePicker::AddBackground() { + Evas_Object* bg = elm_bg_add(layout_); + elm_object_part_content_set(layout_, "bg", bg); + return bg; +} + +void FormNavigablePicker::AddDoneButton() { + edje_object_part_text_set(elm_layout_edje_get(layout_), "elm.text.done", + "Done"); +} + +void FormNavigablePicker::UpdatePickerData( + int selected_index, + std::vector items, + bool is_multiple_selection) { + RequestFormNavigationInformation(); + SelectPickerBase::UpdatePickerData(selected_index, std::move(items), + is_multiple_selection); +} + +void FormNavigablePicker::NavigateToNextCallback(void* data, + Evas_Object* obj, + const char* emission, + const char* source) { + auto picker = static_cast(data); + picker->FormNavigate(true); +} + +void FormNavigablePicker::NavigateToPrevCallback(void* data, + Evas_Object* obj, + const char* emission, + const char* source) { + auto picker = static_cast(data); + picker->FormNavigate(false); +} + +void FormNavigablePicker::KeyUpCallback(void* data, + Evas* e, + Evas_Object* obj, + void* event_info) { + auto key_struct = static_cast(event_info); + if (!web_contents_utils::MapsToHWBackKey(key_struct->keyname)) + return; +#if BUILDFLAG(IS_TIZEN) + HWBackKeyCallback(data, obj, event_info); +#endif +} + +#if BUILDFLAG(IS_TIZEN) +void FormNavigablePicker::HWBackKeyCallback(void* data, + Evas_Object* obj, + void* event_info) { + ListClosedCallback(data, obj, 0, 0); +} +#endif + +void FormNavigablePicker::ListClosedCallback(void* data, + Evas_Object* obj, + const char* emission, + const char* source) { + auto picker = static_cast(data); + if (picker->is_multiple_selection_) + picker->DidMultipleSelectPopupMenuItem(); + else + picker->DidSelectPopupMenuItem(); + picker->HidePopupMenu(); +} + +Eina_Bool FormNavigablePicker::EcoreEventFilterCallback(void* user_data, + void* /*loop_data*/, + int type, + void* event) { + auto picker = static_cast(user_data); + if (type == ECORE_EVENT_KEY_DOWN && picker->IsVisible()) { + std::string key_name = static_cast(event)->keyname; + if (!key_name.compare("Up") || !key_name.compare("Left")) { + picker->FormNavigate(false); + return ECORE_CALLBACK_CANCEL; + } else if (!key_name.compare("Right") || !key_name.compare("Down")) { + picker->FormNavigate(true); + return ECORE_CALLBACK_CANCEL; + } + } + return ECORE_CALLBACK_PASS_ON; +} diff --git a/tizen_src/chromium_impl/content/browser/select_picker/form_navigable_picker.h b/tizen_src/chromium_impl/content/browser/select_picker/form_navigable_picker.h new file mode 100644 index 0000000..983db71 --- /dev/null +++ b/tizen_src/chromium_impl/content/browser/select_picker/form_navigable_picker.h @@ -0,0 +1,73 @@ +// Copyright 2016 Samsung Electronics. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CONTENT_BROWSER_SELECT_PICKER_FORM_NAVIGABLE_PICKER_H_ +#define CONTENT_BROWSER_SELECT_PICKER_FORM_NAVIGABLE_PICKER_H_ + +#include "content/browser/select_picker/select_picker_base.h" + +class FormNavigablePicker : public SelectPickerBase { + public: + virtual ~FormNavigablePicker() override {} + + FormNavigablePicker(const FormNavigablePicker&) = delete; + FormNavigablePicker& operator=(const FormNavigablePicker&) = delete; + + void UpdateFormNavigation(int form_element_count, + int current_node_index) override; + void UpdatePickerData(int selected_index, + std::vector items, + bool is_multiple_selection) override; + + protected: + explicit FormNavigablePicker(Evas_Object* evas_object, + int selected_index, + bool is_multi_select); + void RegisterCallbacks(const char* edj, bool overlay); + void RegisterCallbacks(); + void UnregisterCallbacks(); + Evas_Object* AddBackground(); + void AddDoneButton(); + void ShowButtons(); + + virtual void FormNavigate(bool direction) = 0; + virtual void RequestFormNavigationInformation() = 0; + virtual void HidePopupMenu() = 0; + + private: + void UpdateNavigationButtons(); + static void KeyUpCallback(void* data, + Evas* e, + Evas_Object* obj, + void* event_info); +#if BUILDFLAG(IS_TIZEN) + static void HWBackKeyCallback(void* data, Evas_Object* obj, void* event_info); +#endif + static void ListClosedCallback(void* data, + Evas_Object* obj, + const char* emission, + const char* source); + static void NavigateToPrevCallback(void* data, + Evas_Object* obj, + const char* emission, + const char* source); + static void NavigateToNextCallback(void* data, + Evas_Object* obj, + const char* emission, + const char* source); + static Eina_Bool EcoreEventFilterCallback(void* data, + void* loop_data, + int type, + void* event); + + Ecore_Event_Filter* ecore_events_filter_; + struct FormNavigatorInfo { + int count; + int index; + bool is_prev; + bool is_next; + } form_navigator_info_; +}; + +#endif // CONTENT_BROWSER_SELECT_PICKER_FORM_NAVIGABLE_PICKER_H_ diff --git a/tizen_src/chromium_impl/content/browser/select_picker/select_picker_base.cc b/tizen_src/chromium_impl/content/browser/select_picker/select_picker_base.cc new file mode 100644 index 0000000..a4668c7 --- /dev/null +++ b/tizen_src/chromium_impl/content/browser/select_picker/select_picker_base.cc @@ -0,0 +1,231 @@ +// Copyright 2016 Samsung Electronics. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "content/browser/select_picker/select_picker_base.h" + +#include "base/strings/utf_string_conversions.h" +#include "content/browser/select_picker/select_picker_util.h" +#include "content/browser/web_contents/web_contents_view_aura.h" + +namespace { + +const char* const kSelectedCbName = "selected"; +const char* const kUnselectedCbName = "unselected"; +const char* const kElmText = "elm.text"; + +template +void InsertSorted(std::vector& vec, const T value) { + vec.insert(std::upper_bound(vec.begin(), vec.end(), value), value); +} + +template +size_t SearchValue(const std::vector& vec, const T value) { + auto it = find(vec.begin(), vec.end(), value); + if (it == vec.end()) + return std::string::npos; + return std::distance(vec.begin(), it); +} + +template +void RemoveValue(std::vector& vec, const T value) { + vec.erase(std::remove(vec.begin(), vec.end(), value), vec.end()); +} + +char* LabelGetCallback(void* data, Evas_Object* obj, const char* part) { + auto callback_data = static_cast(data); + if (!strncmp(part, kElmText, strlen(kElmText))) + return elm_entry_utf8_to_markup((callback_data->GetLabel()).c_str()); + return nullptr; +} +} // namespace + +SelectPickerBase::SelectPickerBase(Evas_Object* evas_object, + int selected_index, + bool is_multiple_selection) + : evas_object_(evas_object), + popup_list_(nullptr), + selected_index_(selected_index), + is_multiple_selection_(is_multiple_selection) { + window_ = + elm_object_top_widget_get(elm_object_parent_widget_get(evas_object_)); + layout_ = elm_layout_add(window_); +} + +SelectPickerBase::~SelectPickerBase() { + DestroyPopupList(); + elm_genlist_item_class_free(group_class_); + elm_genlist_item_class_free(item_class_); + evas_object_del(layout_); +} + +void SelectPickerBase::InitializeItemClass() { + item_class_ = elm_genlist_item_class_new(); + item_class_->item_style = GetItemStyle(); + item_class_->func.text_get = LabelGetCallback; + item_class_->func.content_get = nullptr; + item_class_->func.state_get = nullptr; + item_class_->func.del = nullptr; +} + +void SelectPickerBase::InitializeGroupClass() { + group_class_ = elm_genlist_item_class_new(); + group_class_->item_style = "group_index"; + group_class_->func.text_get = LabelGetCallback; + group_class_->func.content_get = nullptr; + group_class_->func.state_get = nullptr; + group_class_->func.del = nullptr; +} + +const char* SelectPickerBase::GetItemStyle() const { + return "default"; +} + +void SelectPickerBase::UpdatePickerData( + int selected_index, + std::vector items, + bool is_multiple_selection) { + ClearData(); + selected_index_ = selected_index; + is_multiple_selection_ = is_multiple_selection; + CreateAndPopulatePopupList(std::move(items)); +} + +gfx::Rect SelectPickerBase::GetGeometryDIP() const { + return gfx::Rect(); +} + +void SelectPickerBase::DestroyPopupList() { + if (popup_list_) { + if (is_multiple_selection_) { + evas_object_smart_callback_del(popup_list_, kSelectedCbName, + MenuItemActivatedCallback); + evas_object_smart_callback_del(popup_list_, kUnselectedCbName, + MenuItemDeactivatedCallback); + } + elm_genlist_clear(popup_list_); + evas_object_del(popup_list_); + } + for (const auto& item : select_picker_data_) + delete item; +} + +void SelectPickerBase::ClearData() { + DestroyPopupList(); + select_picker_data_.clear(); + selected_indexes_.clear(); +} + +void SelectPickerBase::ItemSelectedCallback(void* data, + Evas_Object* obj, + void* event_info) { + auto callback_data = static_cast(data); + callback_data->GetSelectPicker()->ItemSelected(callback_data, event_info); +} + +void SelectPickerBase::ItemSelected(GenlistCallbackData* data, + void* event_info) { + if (data->IsEnabled()) { + selected_index_ = data->GetIndex(); + DidSelectPopupMenuItem(); + } +} + +void SelectPickerBase::DidSelectPopupMenuItem() { + if (select_picker_data_.empty()) + return; + // When user select empty space then no index is selected, so selectedIndex + // value is -1. In that case we should call valueChanged() with -1 index. + // That in turn call popupDidHide() in didChangeSelectedIndex() for reseting + // the value of m_popupIsVisible in RenderMenuList. + if (selected_index_ != -1 && + selected_index_ >= static_cast(select_picker_data_.size())) + return; + // In order to reuse RenderFrameHostImpl::DidSelectPopupMenuItems() method + // in Android, put selectedIndex into std::vector. + std::vector selectedIndices; + selectedIndices.push_back(selected_index_); + if (wcva()) + wcva()->wcva_helper()->DidSelectPopupMenuItems(selectedIndices); +} + +void SelectPickerBase::MenuItemActivatedCallback(void* data, + Evas_Object* obj, + void* event_info) { + auto picker = static_cast(data); + auto selected = static_cast(event_info); + // Subtract 1 from value returned by elm_genlist_item_index_get + // to match webkit expectation (index starting from 0). + int index = elm_genlist_item_index_get(selected) - 1; + if (picker->is_multiple_selection_) { + size_t pos = SearchValue(picker->selected_indexes_, index); + if (pos == std::string::npos) + InsertSorted(picker->selected_indexes_, index); + else + RemoveValue(picker->selected_indexes_, index); + } + picker->DidMultipleSelectPopupMenuItem(); +} + +void SelectPickerBase::MenuItemDeactivatedCallback(void* data, + Evas_Object* obj, + void* event_info) { + auto picker = static_cast(data); + auto deselectedItem = static_cast(event_info); + // Subtract 1 from value returned by elm_genlist_item_index_get + // to match webkit expectation (index starting from 0). + int deselectedIndex = elm_genlist_item_index_get(deselectedItem) - 1; + size_t pos = SearchValue(picker->selected_indexes_, deselectedIndex); + if (pos == std::string::npos) + InsertSorted(picker->selected_indexes_, deselectedIndex); + else + RemoveValue(picker->selected_indexes_, deselectedIndex); + picker->DidMultipleSelectPopupMenuItem(); +} + +void SelectPickerBase::DidMultipleSelectPopupMenuItem() { + if (!wcva() || select_picker_data_.empty()) + return; + wcva()->wcva_helper()->DidSelectPopupMenuItems(selected_indexes_); +} + +void SelectPickerBase::InitializeSelectedPickerData( + std::vector items) { + bool need_scroll_to_top = true; + for (size_t index = 0; index < items.size(); index++) { + bool checked = items[index]->checked; + auto data = new GenlistCallbackData( + index, this, std::move(items[index]), popup_list_, item_class_, + group_class_, is_multiple_selection_, ItemSelectedCallback); + + if (is_multiple_selection_ && checked) { + selected_indexes_.push_back(index); + if (need_scroll_to_top) { + data->ScrollToTop(); + need_scroll_to_top = false; + } + } + select_picker_data_.push_back(data); + } + + if (is_multiple_selection_) { + evas_object_smart_callback_add(popup_list_, kSelectedCbName, + MenuItemActivatedCallback, this); + evas_object_smart_callback_add(popup_list_, kUnselectedCbName, + MenuItemDeactivatedCallback, this); + } else if (selected_index_ >= 0) { + select_picker_data_[selected_index_]->ScrollToTop(); + } +} + +void SelectPickerBase::Show() { + evas_object_show(layout_); +} + +void SelectPickerBase::Hide() { + evas_object_hide(layout_); +} + +bool SelectPickerBase::IsVisible() const { + return evas_object_visible_get(layout_); +} diff --git a/tizen_src/chromium_impl/content/browser/select_picker/select_picker_base.h b/tizen_src/chromium_impl/content/browser/select_picker/select_picker_base.h new file mode 100644 index 0000000..95d62a6 --- /dev/null +++ b/tizen_src/chromium_impl/content/browser/select_picker/select_picker_base.h @@ -0,0 +1,78 @@ +// Copyright 2016 Samsung Electronics. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CONTENT_BROWSER_SELECT_PICKER_SELECT_PICKER_BASE_H_ +#define CONTENT_BROWSER_SELECT_PICKER_SELECT_PICKER_BASE_H_ + +#include +#include + +#include "third_party/blink/public/mojom/choosers/popup_menu.mojom.h" +#include "ui/gfx/geometry/rect.h" + +class GenlistCallbackData; + +namespace content { +class WebContentsViewAura; +} + +class SelectPickerBase { + public: + virtual ~SelectPickerBase(); + + SelectPickerBase(const SelectPickerBase&) = delete; + SelectPickerBase& operator=(const SelectPickerBase&) = delete; + + virtual void UpdateFormNavigation(int form_element_count, + int current_node_index) {} + virtual void UpdatePickerData(int selected_index, + std::vector items, + bool is_multiple_selection); + virtual gfx::Rect GetGeometryDIP() const; + + void Show(); + void Hide(); + bool IsVisible() const; + void InitializeItemClass(); + void InitializeGroupClass(); + virtual void Init(std::vector items, + const gfx::Rect& bounds) = 0; + + protected: + explicit SelectPickerBase(Evas_Object* evas_object, + int selected_index, + bool is_multiple_selection); + virtual const char* GetItemStyle() const; + virtual void ClearData(); + virtual void CreateAndPopulatePopupList( + std::vector items) = 0; + virtual void ItemSelected(GenlistCallbackData* data, void* event_info); + void InitializeSelectedPickerData( + std::vector items); + void DidSelectPopupMenuItem(); + void DidMultipleSelectPopupMenuItem(); + + virtual content::WebContentsViewAura* wcva() const { return nullptr; } + + Evas_Object* evas_object_; + Evas_Object* popup_list_; + Evas_Object* layout_; + Evas_Object* window_; + int selected_index_; + bool is_multiple_selection_; + Elm_Genlist_Item_Class* item_class_; + + private: + static void ItemSelectedCallback(void*, Evas_Object*, void*); + static void MenuItemActivatedCallback(void*, Evas_Object*, void*); + static void MenuItemDeactivatedCallback(void*, Evas_Object*, void*); + + void DestroyPopupList(); + + Elm_Genlist_Item_Class* group_class_; + std::vector select_picker_data_; + std::vector selected_indexes_; +}; + +#endif // CONTENT_BROWSER_SELECT_PICKER_SELECT_PICKER_BASE_H_ diff --git a/tizen_src/chromium_impl/content/browser/select_picker/select_picker_mobile_base.cc b/tizen_src/chromium_impl/content/browser/select_picker/select_picker_mobile_base.cc new file mode 100644 index 0000000..55ae1ab --- /dev/null +++ b/tizen_src/chromium_impl/content/browser/select_picker/select_picker_mobile_base.cc @@ -0,0 +1,164 @@ +// Copyright 2014-17 Samsung Electronics. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "content/browser/select_picker/select_picker_mobile_base.h" + +#include "content/browser/select_picker/select_picker_util.h" + +#include "tizen/system_info.h" +#include "ui/display/display.h" +#include "ui/display/screen.h" +#include "ui/gfx/geometry/dip_util.h" +#include "ui/gfx/geometry/rect.h" +#include "ui/gfx/geometry/rect_conversions.h" + +namespace { + +const char* const kChangedCbName = "changed"; + +void RadioIconChangedCallback(void* data, Evas_Object* obj, void* event_info) { + auto callback_data = static_cast(data); + callback_data->SetSelection(true); +} + +} // namespace + +SelectPickerMobileBase::SelectPickerMobileBase(Evas_Object* evas_object, + int selected_index, + bool is_multiple_selection) + : FormNavigablePicker(evas_object, selected_index, is_multiple_selection), + radio_main_(nullptr) { + evas_object_size_hint_weight_set(layout_, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(window_, layout_); + evas_object_propagate_events_set(layout_, false); +} + +SelectPickerMobileBase::~SelectPickerMobileBase() { + Hide(); + DestroyRadioList(); +} + +void SelectPickerMobileBase::Init(std::vector items, + const gfx::Rect& bounds) { + // Request form navigation information as early as possible, + // given that is renderer will ping-back with actual requested data. + RequestFormNavigationInformation(); + + RegisterCallbacks("control.edj", false); + CreateAndPopulatePopupList(std::move(items)); + AddBackground(); + AddDoneButton(); + + // Need to update evas objects here in order to get proper geometry + // at AdjustViewPortHeightToPopupMenu. + evas_norender(evas_object_evas_get(window_)); +} + +void SelectPickerMobileBase::DestroyRadioList() { + if (!radio_main_) + return; + + if (is_multiple_selection_) + evas_object_smart_callback_del(popup_list_, kChangedCbName, + RadioIconChangedCallback); + elm_genlist_clear(radio_main_); + evas_object_del(radio_main_); +} + +void SelectPickerMobileBase::ClearData() { + DestroyRadioList(); + FormNavigablePicker::ClearData(); +} + +Evas_Object* SelectPickerMobileBase::IconGetCallback(void* data, + Evas_Object* obj, + const char* part) { + auto callback_data = static_cast(data); + auto picker = + static_cast(callback_data->GetSelectPicker()); + if (callback_data->IsEnabled() && !strcmp(part, "elm.swallow.end")) { + Evas_Object* radio = elm_radio_add(obj); + elm_object_focus_allow_set(radio, false); + elm_radio_state_value_set(radio, callback_data->GetIndex()); + elm_radio_group_add(radio, picker->radio_main_); + + evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_propagate_events_set(radio, EINA_FALSE); + + elm_radio_value_set(picker->radio_main_, picker->selected_index_); + evas_object_smart_callback_add(radio, kChangedCbName, + RadioIconChangedCallback, (void*)data); + return radio; + } + return nullptr; +} + +void SelectPickerMobileBase::ItemSelected(GenlistCallbackData* data, + void* event_info) { + // Efl highlights item by default. We only want radio button to be checked. + Evas_Object* radio_icon = elm_object_item_part_content_get( + (Elm_Object_Item*)event_info, "elm.swallow.end"); + data->SetSelection(false); + + if (data->IsEnabled()) { + elm_radio_value_set(radio_icon, data->GetIndex()); + selected_index_ = data->GetIndex(); + DidSelectPopupMenuItem(); + } +} + +void SelectPickerMobileBase::CreateAndPopulatePopupList( + std::vector items) { + popup_list_ = elm_genlist_add(layout_); + elm_genlist_mode_set(popup_list_, ELM_LIST_COMPRESS); + elm_object_style_set(popup_list_, "solid/default"); + evas_object_size_hint_weight_set(popup_list_, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(popup_list_, EVAS_HINT_FILL, EVAS_HINT_FILL); + + elm_object_focus_allow_set(popup_list_, false); + + item_class_->func.content_get = + is_multiple_selection_ ? nullptr : IconGetCallback; + + elm_genlist_multi_select_set(popup_list_, is_multiple_selection_); + + if (!is_multiple_selection_) { + radio_main_ = elm_radio_add(popup_list_); + if (!radio_main_) { + LOG(ERROR) << "elm_radio_add failed."; + return; + } + + elm_radio_state_value_set(radio_main_, 0); + elm_radio_value_set(radio_main_, 0); + + InitializeSelectedPickerData(std::move(items)); + if (selected_index_ >= 0) { + elm_radio_value_set(radio_main_, selected_index_); + } + + evas_object_smart_callback_add(popup_list_, kChangedCbName, + RadioIconChangedCallback, this); + } else { + InitializeSelectedPickerData(std::move(items)); + } + + elm_object_part_content_set(layout_, "elm.swallow.content", popup_list_); +} + +gfx::Rect SelectPickerMobileBase::GetGeometryDIP() const { + if (IsMobileProfile()) { + int x, y, w, h; + edje_object_part_geometry_get(elm_layout_edje_get(layout_), "bg", &x, &y, + &w, &h); + return gfx::ToEnclosingRect(gfx::ConvertRectToDips( + gfx::Rect(x, y, w, h), display::Screen::GetScreen() + ->GetPrimaryDisplay() + .device_scale_factor())); + } else { + return gfx::Rect(); + } +} diff --git a/tizen_src/chromium_impl/content/browser/select_picker/select_picker_mobile_base.h b/tizen_src/chromium_impl/content/browser/select_picker/select_picker_mobile_base.h new file mode 100644 index 0000000..a60b360 --- /dev/null +++ b/tizen_src/chromium_impl/content/browser/select_picker/select_picker_mobile_base.h @@ -0,0 +1,39 @@ +// Copyright 2022 Samsung Electronics. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CONTENT_BROWSER_SELECT_PICKER_SELECT_PICKER_MOBILE_BASE_H_ +#define CONTENT_BROWSER_SELECT_PICKER_SELECT_PICKER_MOBILE_BASE_H_ + +#include "content/browser/select_picker/form_navigable_picker.h" + +class GenlistCallbackData; + +class SelectPickerMobileBase : public FormNavigablePicker { + public: + explicit SelectPickerMobileBase(Evas_Object* evas_object, + int selected_index, + bool is_multiple_selection); + virtual ~SelectPickerMobileBase() override; + + SelectPickerMobileBase(const SelectPickerMobileBase&) = delete; + SelectPickerMobileBase& operator=(const SelectPickerMobileBase&) = delete; + + private: + static Evas_Object* IconGetCallback(void*, Evas_Object*, const char*); + + // SelectPickerBase + gfx::Rect GetGeometryDIP() const override; + void Init(std::vector items, + const gfx::Rect& bounds) override; + void ItemSelected(GenlistCallbackData* data, void* event_info) override; + void ClearData() override; + void CreateAndPopulatePopupList( + std::vector items) override; + + void DestroyRadioList(); + + Evas_Object* radio_main_; +}; + +#endif // CONTENT_BROWSER_SELECT_PICKER_SELECT_PICKER_MOBILE_BASE_H_ diff --git a/tizen_src/chromium_impl/content/browser/select_picker/select_picker_tv_base.cc b/tizen_src/chromium_impl/content/browser/select_picker/select_picker_tv_base.cc new file mode 100644 index 0000000..1422a45 --- /dev/null +++ b/tizen_src/chromium_impl/content/browser/select_picker/select_picker_tv_base.cc @@ -0,0 +1,55 @@ +// Copyright 2022 Samsung Electronics. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "content/browser/select_picker/select_picker_tv_base.h" + +namespace { +// Size of element and do resize only when - // the picker overlaps the element will prevent Blink from doing re-layout. - // Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=15488. - rwhva()->offscreen_helper()->SetCustomViewportSize(gfx::Size( - rect.width(), is_popup_menu_visible ? rect.height() - picker_height - : rect.height() + picker_height)); + rwhva()->offscreen_helper()->SetCustomViewportSize( + is_popup_menu_visible + ? gfx::Size(view_rect.width(), + view_rect.height() - picker_height + bottom_height) + : gfx::Size()); } void EWebView::SetScaleChangedCallback(Ewk_View_Scale_Changed_Callback callback, @@ -2676,6 +2549,12 @@ bool EWebView::HandleResize(int width, int height) { if (!native_view_) return false; evas_object_resize(native_view_, width, height); + + if (select_picker_) { + AdjustViewPortHeightToPopupMenu(true /* is_popup_menu_visible */); + ScrollFocusedNodeIntoView(); + } + return true; } diff --git a/tizen_src/ewk/efl_integration/eweb_view.h b/tizen_src/ewk/efl_integration/eweb_view.h index 9d87a7a..ee88fa3 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.h +++ b/tizen_src/ewk/efl_integration/eweb_view.h @@ -21,9 +21,9 @@ #include "base/containers/id_map.h" #include "base/synchronization/waitable_event.h" #include "browser/input_picker/input_picker.h" -#include "browser/selectpicker/popup_picker.h" #include "content/browser/date_time_chooser_efl.h" #include "content/browser/renderer_host/event_with_latency_info.h" +#include "content/browser/select_picker/select_picker_base.h" #include "content/browser/selection/selection_controller_efl.h" #include "content/browser/web_contents/web_contents_view_aura.h" #include "content/browser/web_contents/web_contents_view_aura_helper_efl.h" @@ -381,19 +381,11 @@ class EWebView { void SetContentSecurityPolicy(const char* policy, Ewk_CSP_Header_Type type); void HandlePopupMenu(std::vector items, int selectedIndex, - bool multiple); + bool multiple, + const gfx::Rect& bounds); void HidePopupMenu(); - void UpdateFormNavigation(int formElementCount, - int currentNodeIndex, - bool prevState, - bool nextState); - void FormNavigate(bool direction); - bool FormIsNavigating() const { return formIsNavigating_; } - void SetFormIsNavigating(bool formIsNavigating); - Eina_Bool PopupMenuUpdate(Eina_List* items, int selectedIndex); - Eina_Bool DidSelectPopupMenuItem(int selectedIndex); - Eina_Bool DidMultipleSelectPopupMenuItem(std::vector& selectedIndices); - void PopupMenuClose(); + void DidSelectPopupMenuItems(std::vector& indices); + void DidCancelPopupMenu(); void HandleLongPressGesture(const content::ContextMenuParams&); void ShowContextMenu(const content::ContextMenuParams&); void CancelContextMenu(int request_id); @@ -408,6 +400,7 @@ class EWebView { Eina_Hash* headers, const char* body); + SelectPickerBase* GetSelectPicker() const { return select_picker_.get(); } content::SelectionControllerEfl* GetSelectionController() const; content::PopupControllerEfl* GetPopupController() const { return popup_controller_.get(); @@ -706,7 +699,6 @@ class EWebView { #endif JavaScriptDialogManagerEfl* GetJavaScriptDialogManagerEfl(); - void ReleasePopupMenuList(); // Changes viewport without resizing Evas_Object representing webview // and its corresponding RWHV to let Blink renders custom viewport // while showing picker. @@ -747,16 +739,6 @@ class EWebView { std::unique_ptr<_Ewk_Auth_Challenge> auth_challenge_; std::string selected_text_cached_; - Eina_List* popupMenuItems_; - Popup_Picker* popupPicker_; - bool formIsNavigating_; - typedef struct { - int count; - int position; - bool prevState; - bool nextState; - } formNavigation; - formNavigation formNavigation_; std::unique_ptr context_menu_; #if !defined(EWK_BRINGUP) // FIXME: m71 bringup std::unique_ptr file_chooser_; @@ -863,6 +845,7 @@ class EWebView { content::AcceptLanguagesHelper::AcceptLangsChangedCallback accept_langs_changed_callback_; + std::unique_ptr select_picker_; std::unique_ptr host_; std::unique_ptr focus_client_; std::unique_ptr window_parenting_client_; diff --git a/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.cc b/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.cc index 154762e..19fc4e7 100644 --- a/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.cc +++ b/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.cc @@ -83,9 +83,6 @@ bool RenderFrameObserverEfl::OnMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(RenderFrameObserverEfl, message) IPC_MESSAGE_HANDLER(EwkFrameMsg_LoadNotFoundErrorPage, OnLoadNotFoundErrorPage) -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup - IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItems, OnSelectPopupMenuItems) -#endif IPC_MESSAGE_HANDLER(EwkFrameMsg_MoveToNextOrPreviousSelectElement, OnMoveToNextOrPreviousSelectElement) IPC_MESSAGE_HANDLER(EwkFrameMsg_RequestSelectCollectionInformation, OnRequestSelectCollectionInformation); IPC_MESSAGE_UNHANDLED(handled = false) @@ -93,25 +90,6 @@ bool RenderFrameObserverEfl::OnMessageReceived(const IPC::Message& message) { return handled; } -void RenderFrameObserverEfl::OnSelectPopupMenuItems( - bool canceled, - const std::vector& selected_indices) { -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup - RenderFrameImpl* render_frame_impl_ = static_cast(render_frame()); - ExternalPopupMenu* external_popup_menu_ = render_frame_impl_->external_popup_menu_.get(); - if (external_popup_menu_ == NULL) - return; - // It is possible to receive more than one of these calls if the user presses - // a select faster than it takes for the show-select-popup IPC message to make - // it to the browser UI thread. Ignore the extra-messages. - // TODO(jcivelli): http:/b/5793321 Implement a better fix, as detailed in bug. - canceled = canceled || !hasHTMLTagNameSelect(GetFocusedElement(render_frame()->GetWebFrame())); - external_popup_menu_->DidSelectItems(canceled, selected_indices); - if (canceled) - render_frame_impl_->DidHideExternalPopupMenu(); -#endif -} - void RenderFrameObserverEfl::OnLoadNotFoundErrorPage(std::string errorUrl) { #if !defined(EWK_BRINGUP) // FIXME: m108 bringup blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); @@ -128,13 +106,13 @@ void RenderFrameObserverEfl::OnLoadNotFoundErrorPage(std::string errorUrl) { } void RenderFrameObserverEfl::OnMoveToNextOrPreviousSelectElement(bool direction) { -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup - content::RenderView* render_view_ = render_frame()->GetRenderView(); - if (direction) - render_view_->GetWebView()->moveFocusToNext(WebView::TraverseFocusThrough::SelectElement); - else - render_view_->GetWebView()->moveFocusToPrevious(WebView::TraverseFocusThrough::SelectElement); -#endif + if (direction) { + render_frame()->GetWebView()->MoveFocusToNext( + WebView::TraverseFocusThrough::SelectElement); + } else { + render_frame()->GetWebView()->MoveFocusToPrevious( + WebView::TraverseFocusThrough::SelectElement); + } } void RenderFrameObserverEfl::OnRequestSelectCollectionInformation() { @@ -181,11 +159,11 @@ void RenderFrameObserverEfl::DidChangeScrollOffset() { if (render_frame()->GetRenderView()->GetMainRenderFrame() != render_frame()) return; blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); - blink::WebSize contentsSize = frame->ContentsSize(); + blink::WebSize documentSize = frame->DocumentSize(); blink::WebRect visibleContentRect = frame->VisibleContentRect(); blink::WebSize maximumScrollOffset( - contentsSize.width - visibleContentRect.width, - contentsSize.height - visibleContentRect.height); + documentSize.width - visibleContentRect.width, + documentSize.height - visibleContentRect.height); if (max_scroll_offset_ != maximumScrollOffset) { max_scroll_offset_ = maximumScrollOffset; diff --git a/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.h b/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.h index 045c65d..9f3dfe2 100644 --- a/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.h +++ b/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.h @@ -60,9 +60,6 @@ class RenderFrameObserverEfl : public RenderFrameObserver { RenderFrame* frame) override; private: - void OnSelectPopupMenuItems(bool canceled, - const std::vector& selected_indices); - void OnLoadNotFoundErrorPage(std::string errorUrl); void OnMoveToNextOrPreviousSelectElement(bool direction); diff --git a/tizen_src/ewk/efl_integration/resource/BUILD.gn b/tizen_src/ewk/efl_integration/resource/BUILD.gn index 33f8000..493a38c 100644 --- a/tizen_src/ewk/efl_integration/resource/BUILD.gn +++ b/tizen_src/ewk/efl_integration/resource/BUILD.gn @@ -9,9 +9,7 @@ template("edje_res_ewk") { action_foreach(edje_target_name) { script = "//tizen_src/build/cmd_execution.py" sources = invoker.sources - outputs = [ - "$root_out_dir/resources/{{source_name_part}}.edj", - ] + outputs = [ "$root_out_dir/resources/{{source_name_part}}.edj" ] args = [ "$edje_compiler", "-id", @@ -22,9 +20,7 @@ template("edje_res_ewk") { } source_set(target_name) { - deps = [ - ":$edje_target_name", - ] + deps = [ ":$edje_target_name" ] } } @@ -34,5 +30,6 @@ edje_res_ewk("edje_resources_ewk") { "AutofillPopup.edc", "JavaScriptPopup.edc", "control.edc", + "controlTV.edc", ] } diff --git a/tizen_src/ewk/efl_integration/resource/control.edc b/tizen_src/ewk/efl_integration/resource/control.edc index 9f3e959..8989867 100644 --- a/tizen_src/ewk/efl_integration/resource/control.edc +++ b/tizen_src/ewk/efl_integration/resource/control.edc @@ -239,8 +239,8 @@ collections { } description { state: "show" 0.0; inherit: "default" 0.0; - rel1 { relative: 0.0 0.48;} - rel2 { relative: 1.0 1.0; offset: 0 2; } + rel1 { relative: 0.0 0.5; } + rel2 { relative: 1.0 1.0; } } description { state: "imf_panel" 0.0; inherit: "show" 0.0; @@ -461,6 +461,7 @@ collections { scale: 1; description { state: "default" 0.0; align: 0.0 0.0; + fixed: 0 1; rel1 { relative: 0.0 1.0; to: "elm.image.panel"; } rel2 { relative: 1.0 1.0;} } @@ -554,6 +555,10 @@ collections { target: "bg"; target: "elm.image.panel"; target: "elm.swallow.content"; + after: "show,picker,done"; + } + program { name: "show,picker,done"; + action: SIGNAL_EMIT "show,picker,done" ""; } program { name: "show,picker_delay"; signal: "show,picker_delay,signal"; diff --git a/tizen_src/ewk/efl_integration/resource/controlTV.edc b/tizen_src/ewk/efl_integration/resource/controlTV.edc new file mode 100644 index 0000000..0ff54ea --- /dev/null +++ b/tizen_src/ewk/efl_integration/resource/controlTV.edc @@ -0,0 +1,1833 @@ +#define COLORSELECTOR_BG_WIDTH_INC 300 +#define COLORSELECTOR_POPUP_TOP_PADDING_HEIGHT_INC 26 +#define COLORSELECTOR_POPUP_HEIGHT_INC 194 +#define COLORSELECTOR_POPUP_SEPARATOR_INC 1 +#define COLORSELECTOR_POPUP_COLORSELECTOR_HEIGHT_INC 148 + +#define FIXED_SIZE(_WIDTH, _HEIGHT) \ + min: _WIDTH _HEIGHT; max: _WIDTH _HEIGHT; fixed: 1 1; + +#define BASIC_CURVE 0.3 0.0 0.0 1.0 +#define BLACK_COLOR 0 0 0 +#define DO_NOT_SCROLL_IF_SPACE_IS_MORE_THAN_THIS_VALUE 1 +#define FOCUS_HIGHLIGHT_BORDER 5 5 5 5; +#define LIST_FONT_SIZE 38 +#define SPEED 30 +#define STATE_STRING_LEN 10 +#define WHITE_COLOR 255 255 255 +#define ZERO_VER 0.0 + +#define OPACITY_100 255 +#define OPACITY_97 248 +#define OPACITY_90 230 +#define OPACITY_70 179 +#define OPACITY_50 128 +#define OPACITY_40 102 +#define OPACITY_30 77 +#define OPACITY_20 51 +#define OPACITY_18 46 +#define OPACITY_15 39 +#define OPACITY_13 34 +#define OPACITY_10 26 +#define OPACITY_9 23 +#define OPACITY_7 18 +#define OPACITY_5 13 +#define OPACITY_0 0 + +#define TEXT_NORMAL_FONT "SamsungOneUI_300" +#define TEXT_FOCUSED_MAIN_FONT "SamsungOneUI_600" +#define TEXT_SELECTED_FONT "SamsungOneUI_300" +#define TEXT_SELECTED_FOCUSED_FONT "SamsungOneUI_600" +#define TEXT_DIMMED_FONT "SamsungOneUI_300" + +#define RESOLUTION_W 1920 +#define RESOLUTION_H 1080 + +#define SCROLL_PAD_WIDTH (0.052084*RESOLUTION_W) +#define LT_PADDING (0.018225*RESOLUTION_W) +#define LT_PADDING_2 (0.020833*RESOLUTION_W) +#define RT_PADDING (0.018225*RESOLUTION_W) +#define RT_PADDING_2 (0.010416*RESOLUTION_W) +#define MD_PADDING (0.026042*RESOLUTION_W) + + +#define GENLIST_ITEM_HT (0.074075*RESOLUTION_H) +#define GENLIST_TEXT_HT (0.055556*RESOLUTION_H) +#define ICON_WD (0.019792*RESOLUTION_W) +#define ICON_HT (0.035186*RESOLUTION_H) + +color_classes { + color_class { name: "TEXT_NORMAL_MAIN_B"; + color: 0 0 0 OPACITY_100; + color2: 0 0 0 OPACITY_40; + } + color_class { name: "TEXT_FOCUSED_MAIN_B"; + color: WHITE_COLOR OPACITY_100; + color2: WHITE_COLOR OPACITY_40; + } + color_class { name: "TEXT_SELECTED_B"; + color: 62 174 254 OPACITY_100; + color2: 62 174 254 OPACITY_40; + } + color_class { name: "TEXT_SELECTED_FOCUSED_B"; + color: 62 174 254 OPACITY_100; + color2: 62 174 254 OPACITY_40; + } + color_class { name: "TEXT_DIMMED_B"; + color: WHITE_COLOR OPACITY_20; + color2: WHITE_COLOR OPACITY_9; + } + color_class { name: "FOCUS_LAYER_COLOR_B"; + color: 255 255 255 OPACITY_10; + } + color_class { name: "LIST_NORMAL_B"; + color: 37 37 37 OPACITY_0; + } + color_class { name: "LIST_DIMMED_B"; + color: 21 21 21 OPACITY_0; + } + color_class { name: "WHITE_OPACITY_0"; + color: WHITE_COLOR OPACITY_0; + } + color_class { name: "WHITE_OPACITY_100"; + color: WHITE_COLOR OPACITY_100; + } +} +collections { + + +group { name: "elm/scroll/base/styleA"; + alias: "elm/scroller/base/styleA"; + alias: "elm/list/base/styleA"; + alias: "elm/genlist/base/styleA"; + alias: "elm/scroll/base/arrow"; + alias: "elm/list/base/arrow"; + alias: "elm/genlist/base/arrow"; + + images.image: "obe_list_scroll_up.png" COMP; + images.image: "obe_list_scroll_up_f.png" COMP; + images.image: "obe_list_scroll_down.png" COMP; + images.image: "obe_list_scroll_down_f.png" COMP; + + data.item: "focus_highlight" "on"; + + parts { + + part { name: "sb_vbar_show"; type: RECT; + scale: 1; + description { state: "default" 0.0; + } + description { state: "hidden" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + + part { name: "sb_vbar"; type: RECT; + scale: 1; + description { state: "default" 0.0; + fixed: 1 0; + min: (0.007813*RESOLUTION_W) (0.00185*RESOLUTION_H); + align: 0.0 0.0; + rel1.to_x: "arrow_right"; + rel2.relative: 1.0 0.0; + rel2.to_y: "sb_hbar"; + visible: 0; + } + } + + part { name: "sb_vbar_base"; type: RECT; + scale: 1; + clip_to: "sb_vbar"; + description { state: "default" 0.0; + visible: 0; + rel1.relative: 0.0 1.0; + rel1.to: "sb_vbar_a1"; + rel2.relative: 1.0 0.0; + rel2.to: "sb_vbar_a2"; + } + } + + part { name: "elm.dragable.vbar"; type: RECT; + clip_to: "sb_vbar"; + scale: 1; + dragable.x: 0 0 0; + dragable.y: 1 1 0; + dragable.confine: "sb_vbar_base"; + description { state: "default" 0.0; + fixed: 1 1; + min: (0.007813*RESOLUTION_W) (0.00185*RESOLUTION_H); + rel1.relative: 0.5 0.5; + rel1.to: "sb_vbar_base"; + rel2.relative: 0.5 0.5; + rel2.to: "sb_vbar_base"; + visible: 0; + color:255 0 0 128; + } + } + + part { name: "sb_vbar_a1"; type: RECT; + scale: 1; + clip_to: "sb_vbar"; + description { state: "default" 0.0; + fixed: 1 1; + min: (0.007813*RESOLUTION_W) (0.013889*RESOLUTION_H); + align: 0.5 0.0; + aspect: 1.0 1.0; aspect_preference: HORIZONTAL; + visible: 0; + rel1.to: "sb_vbar"; + rel2.to: "sb_vbar"; + rel2.relative: 1.0 0.0; + color:0 255 255 128; + } + } + + part { name: "sb_vbar_a2"; type: RECT; + scale: 1; + clip_to: "sb_vbar"; + description { state: "default" 0.0; + fixed: 1 1; + min: (0.007813*RESOLUTION_W) (0.013889*RESOLUTION_H); + align: 0.5 1.0; + aspect: 1.0 1.0; aspect_preference: HORIZONTAL; + visible: 0; + rel1.to: "sb_vbar"; + rel1.relative: 0.0 1.0; + rel2.to: "sb_vbar"; + color:0 255 255 128; + } + } + + part { name: "sb_hbar_show"; type: RECT; + scale: 1; + description { state: "default" 0.0; + } + description { state: "hidden" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + + part { name: "sb_hbar"; type: RECT; mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + fixed: 0 1; + min: 1 0; + align: 0.0 1.0; + rel1.to_y: "arrow_down"; + rel2.relative: 0.0 1.0; + rel2.to_x: "arrow_right"; + rel2.to_y: "arrow_down"; + rel2.relative: 0.0 0.0; + visible: 0; + } + description { state: "hidden" 0.0; + inherit: "default" 0.0; + min: 0 0; + max: 999 0; + } + } + + part { name: "clipper"; type: RECT; + description { state: "default" 0.0; + rel1.to: "elm.swallow.background"; + rel2.to: "elm.swallow.background"; + color:255 255 255 255; + visible:1; + } + } + + part { name: "elm.swallow.background"; type: SWALLOW; + scale: 1; + clip_to: "clipper"; + description { state: "default" 0.0; + rel1.to: "arrow_up.background"; + rel1.relative: 0.0 1.0; + rel2.relative: 1.0 0.0; + rel2.to: "arrow_down.background"; + } + } + + part { name: "elm.swallow.content"; type: SWALLOW; + clip_to: "clipper"; + scale: 1; + description { state: "default" 0.0; + rel1.to:"elm.swallow.background"; + rel2.to:"elm.swallow.background"; + } + } + + part { name: "elm.swallow.overlay"; type: SWALLOW; + clip_to: "clipper"; + description { state: "default" 0.0; + rel1.to: "elm.swallow.content"; + rel2.to: "elm.swallow.content"; + } + } + + part { name: "runner_vbar"; type: RECT; mouse_events: 0; + scale: 1; + clip_to: "sb_vbar_show"; + description { state: "default" 0.0; + rel1.to: "sb_vbar_base"; + rel2.to: "sb_vbar_base"; + min: (0.001563*RESOLUTION_W) (0.0037*RESOLUTION_H); + max: (0.001563*RESOLUTION_W) -1; + visible: 1; + color:255 255 255 128; + } + } + + part { name: "runner_vbar_clip"; type: RECT; + scale: 1; + clip_to: "sb_vbar_show"; + description { state: "default" 0.0; + min: 1 1; + max: 1 999; + rel1.to: "runner_vbar"; + rel2.to: "runner_vbar"; + visible: 0; + color:0 255 255 128; + } + } + + part { name: "elm.padding.arrow_up_spacer"; type: SPACER; + scale: 1; + description { state: "default" 0.0; + min: 0 0; + max: -1 0; + fixed: 0 1; + align: 0.5 0.0; + } + } + part { name: "elm.padding.arrow_left_spacer"; type: SPACER; + scale: 1; + description { state: "default" 0.0; + min: 0 0; + max: 0 -1; + fixed: 1 0; + rel1.to_y: "arrow_up"; + rel1.relative: 0.0 1.0; + rel2.to_y: "arrow_down"; + rel2.relative: 0.0 0.0; + align: 0.0 0.5; + } + } + part { name: "elm.padding.arrow_right_spacer"; type: SPACER; + scale: 1; + description { state: "default" 0.0; + min: 0 0; + max: 0 -1; + fixed: 0 1; + rel1.to_y: "elm.padding.arrow_left_spacer"; + rel2.to_y: "elm.padding.arrow_left_spacer"; + align: 1.0 0.5; + } + } + + part { name: "arrow_right"; type: RECT; + clip_to: "sb_hbar_show"; + scale: 1; + description { state: "default" 0.0; + rel1.to: "elm.padding.arrow_right_spacer"; + rel2.to: "elm.padding.arrow_right_spacer"; + rel2.relative: 0.0 1.0; + align: 1.0 0.5; + } + } + + part { name: "arrow_up.background"; type: RECT; + clip_to: "sb_vbar_show"; + scale: 1; + description { state: "default" 0.0; + rel1.to: "elm.padding.arrow_up_spacer"; + rel1.relative: 0.0 1.0; + rel2.to: "sb_vbar_show"; + align: 0.5 0.0; + FIXED_SIZE((0.38021*RESOLUTION_W), (0.05 *RESOLUTION_H)) + visible:0; + } + } + + part { name: "arrow_up"; type: IMAGE; + clip_to: "sb_vbar_show"; + scale: 1; + description { state: "default" 0.0; + rel1.to:"arrow_up.background"; + rel2.to:"arrow_up.background"; + image.normal: "obe_list_scroll_up.png"; + color:255 255 255 127; + } + description { state: "over" 0.0; + inherit: "default" 0.0; + image.normal: "obe_list_scroll_up_f.png"; + color:255 255 255 255; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + image.normal: "obe_list_scroll_up.png"; + color:255 255 255 76; + } + description { state: "invisible" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + + + part { name: "elm.padding.arrow_down_spacer"; type: SPACER; + scale: 1; + description { state: "default" 0.0; + min: 0 0; + max: -1 0; + fixed: 0 1; + align: 0.5 1.0; + } + } + + + part { name: "arrow_down.background"; type: RECT; + clip_to: "sb_vbar_show"; + scale: 1; + description { state: "default" 0.0; + rel1.to: "elm.padding.arrow_down_spacer"; + rel2.to: "elm.padding.arrow_down_spacer"; + rel2.relative: 1.0 0.0; + align: 0.5 1.0; + visible:0; + FIXED_SIZE((0.38021*RESOLUTION_W), (0.05 *RESOLUTION_H)) + } + } + + part {name: "arrow_down"; type: IMAGE; + clip_to: "sb_vbar_show"; + scale: 1; + description { state: "default" 0.0; + rel1.to: "arrow_down.background"; + rel2.to: "arrow_down.background"; + image.normal: "obe_list_scroll_down.png"; + color:255 255 255 127; + } + description { state: "over" 0.0; + inherit: "default" 0.0; + image.normal: "obe_list_scroll_down_f.png"; + color:255 255 255 255; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + image.normal: "obe_list_scroll_down.png"; + color:255 255 255 76; + } + description { state: "invisible" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + + part {name: "runner_glow_vbar"; type: RECT; mouse_events: 0; + scale: 1; + clip_to: "runner_vbar_clip"; + description { state: "default" 0.0; + rel1.to_x: "runner_vbar_clip"; + rel1.to_y: "base_vbar"; + rel2.to_x: "runner_vbar_clip"; + rel2.to_y: "base_vbar"; + visible: 0; + } + } + + part {name: "base_vbar"; type: RECT; mouse_events: 0; + scale: 1; + clip_to: "sb_vbar_show"; + description { state: "default" 0.0; + rel1.to: "elm.dragable.vbar"; + rel2.to: "elm.dragable.vbar"; + fixed: 1 1; + visible: 0; + } + } + + part {name: "bevel_vbar"; type: RECT; mouse_events: 0; + scale: 1; + clip_to: "sb_vbar_show"; + description { state: "default" 0.0; + min: (0.0026*RESOLUTION_W) (0.0046296*RESOLUTION_H); + visible: 0; + } + } + } + + programs { + program { + signal: "load"; source: ""; + action: STATE_SET "hidden" 0.0; + target: "sb_vbar"; + target: "sb_vbar_show"; + } + + program { + signal: "elm,action,show,vbar"; source: "elm"; + action: STATE_SET "default" 0.0; + target: "sb_vbar"; + target: "sb_vbar_show"; + } + + program { + signal: "elm,action,hide,vbar"; source: "elm"; + action: STATE_SET "hidden" 0.0; + target: "sb_vbar"; + target: "sb_vbar_show"; + } + + program { + signal: "mouse,down,1*"; source: "arrow_up"; + action: STATE_SET "clicked" 0.0; + target: "sb_vbar_a1"; + target: "arrow_up"; + after: "up_fade"; + after: "mouse_click_up_arrow"; + } + + program { name: "up_fade"; + source: ""; + action: STATE_SET "default" 0.0; + target: "sb_vbar_a1"; + transition: LINEAR 1; + target: "arrow_up"; + } + + program { + signal: "mouse,down,1*"; source: "arrow_up"; + action: DRAG_VAL_STEP 0.0 -1.0; + target: "elm.dragable.vbar"; + } + + program { + signal: "mouse,up,1"; source: "arrow_up"; + action: STATE_SET "default" 0.0; + target: "sb_vbar_a1"; + target: "arrow_up"; + after: "sound_on_select"; + } + + program { name: "sound_on_select"; + action: RUN_PLUGIN "select"; + } + + program { + signal: "mouse,down,1*"; source: "arrow_down"; + action: STATE_SET "clicked" 0.0; + target: "sb_vbar_a2"; + target: "arrow_down"; + after: "down_fade"; + after: "mouse_click_down_arrow"; + } + + program { name: "down_fade"; + source: ""; + action: STATE_SET "default" 0.0; + target: "sb_vbar_a2"; + transition: LINEAR 1; + target: "arrow_down"; + } + + program { + signal: "mouse,down,1*"; source: "arrow_down"; + action: DRAG_VAL_STEP 0.0 1.0; + target: "elm.dragable.vbar"; + } + + program { + signal: "mouse,up,1"; source: "arrow_down"; + action: STATE_SET "default" 0.0; + target: "sb_vbar_a2"; + target: "arrow_down"; + after: "sound_on_select"; + } + + program { + signal: "mouse,down,1*"; source: "sb_vbar_p1"; + action: DRAG_VAL_PAGE 0.0 -1.0; + target: "elm.dragable.vbar"; + } + + program { + signal: "mouse,down,1*"; source: "sb_vbar_p2"; + action: DRAG_VAL_PAGE 0.0 1.0; + target: "elm.dragable.vbar"; + } + program { name: "sound_on_focus"; + action: RUN_PLUGIN "focus"; + } + program { + signal: "elm,scroll,arrow_up,hide"; source: "elm"; + action: STATE_SET "invisible" 0.0; + target: "arrow_up"; + } + // == use this signal "elm,scroll,arrow_up,show" if you need to show the up_ARROW + program { + signal: "elm,scroll,arrow_up,show"; source: "elm"; + action: STATE_SET "default" 0.0; + target: "arrow_up"; + } + // == use this signal "elm,scroll,arrow_down,hide" if you need to hide the down_ARROW + program { + signal: "elm,scroll,arrow_down,hide"; source: "elm"; + action: STATE_SET "invisible" 0.0; + target: "arrow_down"; + } + // == use this signal "elm,scroll,arrow_down,show" if you need to show the down_ARROW + program { + signal: "elm,scroll,arrow_down,show"; source: "elm"; + action: STATE_SET "default" 0.0;; + target: "arrow_down"; + } + + program { + signal: "elm,action,looping,left"; source: "elm"; + action: STATE_SET "effect_right" 0.0; + transition: LINEAR 0.3; + target: "elm.swallow.content"; + after: "looping,left,done"; + } + + program { name: "looping,left,done"; + action: SIGNAL_EMIT "elm,looping,left,done" "elm"; + } + + program { + signal: "elm,action,looping,left,end"; source: "elm"; + action: STATE_SET "default" 0.0; + transition: LINEAR 0.3; + target: "elm.swallow.content"; + after: "looping,left,end"; + } + + program { name: "looping,left,end"; + action: SIGNAL_EMIT "elm,looping,left,end" "elm"; + } + + program { + signal: "elm,action,looping,right"; source: "elm"; + action: STATE_SET "effect_left" 0.0; + transition: LINEAR 0.3; + target: "elm.swallow.content"; + after: "looping,right,done"; + } + + program { name: "looping,right,done"; + action: SIGNAL_EMIT "elm,looping,right,done" "elm"; + } + + program { + signal: "elm,action,looping,right,end"; source: "elm"; + action: STATE_SET "default" 0.0; + transition: LINEAR 0.3; + target: "elm.swallow.content"; + after: "looping,right,end"; + } + + program { name: "looping,right,end"; + action: SIGNAL_EMIT "elm,looping,right,end" "elm"; + } + + program { + signal: "elm,action,looping,up"; source: "elm"; + action: STATE_SET "effect_down" 0.0; + transition: LINEAR 0.2; + target: "elm.swallow.content"; + after: "looping,up,next"; + } + + program { name: "looping,up,next"; + action: STATE_SET "effect_up" 0.0; + target: "elm.swallow.content"; + after: "looping,up,done"; + } + + program { name: "looping,up,done"; + action: SIGNAL_EMIT "elm,looping,up,done" "elm"; + } + + program { + signal: "elm,action,looping,up,end"; source: "elm"; + action: STATE_SET "default" 0.0; + transition: LINEAR 0.2; + target: "elm.swallow.content"; + after: "looping,up,end"; + } + + program { name: "looping,up,end"; + action: SIGNAL_EMIT "elm,looping,up,end" "elm"; + } + + program { + signal: "elm,action,looping,down"; source: "elm"; + action: STATE_SET "effect_up" 0.0; + transition: LINEAR 0.2; + target: "elm.swallow.content"; + after: "looping,down,next"; + } + + program { name: "looping,down,next"; + action: STATE_SET "effect_down" 0.0; + target: "elm.swallow.content"; + after: "looping,down,done"; + } + + program { name: "looping,down,done"; + action: SIGNAL_EMIT "elm,looping,down,done" "elm"; + } + + program { + signal: "elm,action,looping,down,end"; source: "elm"; + action: STATE_SET "default" 0.0; + transition: LINEAR 0.2; + target: "elm.swallow.content"; + after: "looping,down,end"; + } + + program { name: "looping,down,end"; + action: SIGNAL_EMIT "elm,looping,down,end" "elm"; + } + program { name: "mouse_click_down_arrow"; + action: SIGNAL_EMIT "mouse,click,down,arrow" ""; + } + + program { name: "mouse_click_up_arrow"; + action: SIGNAL_EMIT "mouse,click,up,arrow" ""; + } + + program { name: "up_over_show"; + signal: "mouse,in"; source: arrow_up; + action: STATE_SET "over" 0.0; + target: arrow_up; + after: "sound_on_focus"; + after:"mouse_in_up"; + } + program { name: "down_over_show"; + signal: "mouse,in"; source: arrow_down; + action: STATE_SET "over" 0.0; + target: arrow_down; + after: "sound_on_focus"; + after:"mouse_in_down"; + } + + program { name: "up_over_hide"; + signal: "mouse,out"; source: arrow_up; + action: STATE_SET "default" 0.0; + target: arrow_up; + after:"mouse_out_up"; + } + + program { name: "down_over_hide"; + signal: "mouse,out"; source: arrow_down; + action: STATE_SET "default" 0.0; + target: arrow_down; + after:"mouse_out_down"; + } + + program { name: "mouse_in_down"; + action: SIGNAL_EMIT "mouse,in,down,arrow" ""; + } + + program { name: "mouse_out_down"; + action: SIGNAL_EMIT "mouse,out,down,arrow" ""; + } + program { name: "mouse_in_up"; + action: SIGNAL_EMIT "mouse,in,up,arrow" ""; + } + + program { name: "mouse_out_up"; + action: SIGNAL_EMIT "mouse,out,up,arrow" ""; + } + } +} + + group { name: "elm/genlist/item/APP_STYLE/default"; + images { + image: "highlight_stroke.png" COMP; + } + data.item: "texts" "elm.text"; + script { + public isSelected = 0; + public isDimmed = 0; + public isFocused = 0; + public curVer; + + public g_duration = 0, g_stopslide = 1, g_timer_id, g_anim_id, g_is_rtl; + + public slide_to_end_anim(val, Float:pos) { + new stopflag; + new id; + stopflag = get_int(g_stopslide); + if (stopflag == 1) return; + + new Float:vl = get_float(curVer); + + if(get_int(isSelected)) { + set_tween_state(PART:"elm.text", pos, "selected_slide_begin", vl, "selected_slide_end", vl); + set_state(PART:"elm.text.loopback", "selected_focused", vl); + } else { + set_tween_state(PART:"elm.text", pos, "slide_begin", vl, "slide_end", vl); + set_state(PART:"elm.text.loopback", "focused", vl); + } + + if (pos >= 1.0) { + id = timer(0.0, "slide_to_begin", 1); + } + set_int(g_timer_id, id); + } + + public slide_to_end() { + new stopflag; + new id; + new Float:duration; + stopflag = get_int(g_stopslide); + if (stopflag == 1) + return; + + duration = get_float(g_duration); + id = anim(duration, "slide_to_end_anim", 1); + set_int(g_anim_id, id); + } + + public slide_to_begin() { + new stopflag; + new id; + stopflag = get_int(g_stopslide); + if (stopflag == 1) + return; + + new Float:vl = get_float(curVer); + + if(get_int(isSelected)) { + set_state(PART:"elm.text", "selected_slide_begin", vl); + } else { + set_state(PART:"elm.text", "slide_begin", vl); + } + id = timer(0.0, "slide_to_end", 1); + set_int(g_timer_id, id); + } + + public start_slide() { + new id; + set_int(g_stopslide, 1); + id = get_int(g_anim_id); + cancel_anim(id); + id = get_int(g_timer_id); + cancel_timer(id); + + new x, y, w, h; + set_int(g_stopslide, 0); + SetDuration(); + get_geometry(PART:"space_at_right", x, y, w, h) + if(w > (DO_NOT_SCROLL_IF_SPACE_IS_MORE_THAN_THIS_VALUE)) + return; + + new Float:vl = get_float(curVer); + + if(get_int(isSelected)) { + if( get_int( g_is_rtl ) == 1 ) { + set_state(PART:"elm.text", "selected_slide_end", vl); + } else { + set_state(PART:"elm.text", "selected_slide_begin", vl); + } + set_state(PART:"elm.text.loopback", "selected_focused", vl); + } else { + if( get_int( g_is_rtl ) == 1 ) { + set_state(PART:"elm.text", "slide_end", vl); + } else { + set_state(PART:"elm.text", "slide_begin", vl); + } + set_state(PART:"elm.text.loopback", "focused", vl); + } + + slide_to_end(); + } + + public stop_slide() { + new id; + set_int(g_stopslide, 1); + id = get_int(g_anim_id); + cancel_anim(id); + id = get_int(g_timer_id); + cancel_timer(id); + } + + public SetDuration() { + new x, y, w, h; + get_geometry(PART:"text.size.estimate", x, y, w, h); + new Float:t = w / SPEED; + set_float(g_duration, t); + } + + } + + parts { + + part { name: "base"; type: RECT; + scale: 1; + repeat_events: 1; + ignore_flags: ON_HOLD; + description { state: "default" 0.0; + min: 0 GENLIST_ITEM_HT; + color_class: "LIST_NORMAL_B"; + } + description { state: "focused" 0.0; + inherit: "default" 0.0; + } + description { state: "selected" 0.0; + inherit: "default" 0.0; + } + description { state: "dimmed" 0.0; + inherit: "default" 0.0; + color_class: "LIST_DIMMED_B"; + } + } + + part { name: "focus_layer"; type: RECT; + scale: 1; + description { state: "default" 0.0; + rel1.to: "base"; + rel2.to: "base"; + color_class : "WHITE_OPACITY_0"; + } + description { state: "focused" 0.0; + inherit: "default" 0.0; + color_class : "FOCUS_LAYER_COLOR_B"; + } + description { state: "selected" 0.0; + inherit: "default" 0.0; + } + description { state: "dimmed" 0.0; + inherit: "default" 0.0; + } + } + + part { name: "clip_rect"; type: RECT; + scale: 1; + description { state: "default" 0.0; + fixed: 1 1; + min: 1 GENLIST_TEXT_HT; + max: -1 GENLIST_TEXT_HT; + align: 0.0 0.5; + rel1.to: "pad.text_left"; + rel1.relative: 1.0 0.0; + rel2.to: "pad.text_right"; + rel2.relative: 0.0 1.0; + } + } + + part { name: "pad.text_left"; type: SPACER; mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + fixed: 1 1; + align: 0.0 0.0; + min: (0.020833*RESOLUTION_W) GENLIST_ITEM_HT; + max: (0.020833*RESOLUTION_W) GENLIST_ITEM_HT; + } + } + + part { name: "pad.text_right"; type: SPACER; mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + fixed: 1 1; + align: 1.0 0.0; + min: (0.020833*RESOLUTION_W) GENLIST_ITEM_HT; + max: (0.020833*RESOLUTION_W) GENLIST_ITEM_HT; + } + } + + part { name: "elm.text"; type: TEXT; mouse_events: 0; + ignore_flags: ON_HOLD; + scale: 1; + clip_to: "clip_rect"; + effect: OUTLINE; + description { state: "default" 0.0; + min: 1 GENLIST_TEXT_HT; + max: -1 GENLIST_TEXT_HT; + align: 0.0 0.5; + rel1.to: "pad.text_left"; + rel1.relative: 1.0 0.0; + rel2.to: "pad.text_right"; + rel2.relative: 0.0 1.0; + color_class: "TEXT_NORMAL_MAIN_B"; + text { + font: TEXT_NORMAL_FONT; + size: LIST_FONT_SIZE; + align: 0.5 0.5; + min: 0 1; + } + } + description { state: "default.rtl" 0.0; + inherit: "default" 0.0; + text.ellipsis: 1; + } + description { state: "focused" 0.0; + inherit: "default" 0.0; + color_class: "TEXT_FOCUSED_MAIN_B"; + text.font: TEXT_FOCUSED_MAIN_FONT; + } + description { state: "focused.rtl" 0.0; + inherit: "focused" 0.0; + text.ellipsis: 1; + } + description { state: "selected" 0.0; + inherit: "default" 0.0; + color_class: "TEXT_SELECTED_B"; + text.font: TEXT_SELECTED_FONT; + } + description { state: "selected.rtl" 0.0; + inherit: "selected" 0.0; + text.ellipsis: 1; + } + description { state: "selected_focused" 0.0; + inherit: "default" 0.0; + color_class: "TEXT_SELECTED_FOCUSED_B"; + text.font: TEXT_SELECTED_FOCUSED_FONT; + } + description { state: "selected_focused.rtl" 0.0; + inherit: "selected_focused" 0.0; + text.ellipsis: 1; + } + description { state: "dimmed" 0.0; + inherit: "default" 0.0; + color_class: "TEXT_DIMMED_B"; + text.font: TEXT_DIMMED_FONT; + } + description { state: "dimmed.rtl" 0.0; + inherit: "dimmed" 0.0; + text.ellipsis: 1; + } + description { state: "slide_begin" 0.0; + inherit: "focused" 0.0; + rel1.to_x: "elm.pad0.50px"; + rel1.to_y: "base"; + rel1.relative: 1.0 0.0; + rel2.to_y: "base"; + rel2.relative: 0.0 1.0; + align: 0.0 0.5; + text.align: 0.0 0.5; + text.min: 1 1; + text.ellipsis: -1; + text.text_class: "sublist_text_icon_foc_b"; + } + description { state: "selected_slide_begin" 0.0; + inherit: "selected_focused" 0.0; + rel1.to_x: "elm.pad0.50px"; + rel1.to_y: "base"; + rel1.relative: 1.0 0.0; + rel2.to_y: "base"; + rel2.relative: 0.0 1.0; + align: 0.0 0.5; + text.min: 1 1; + text.ellipsis: -1; + text.text_class: "sublist_text_icon_sel_foc_b"; + } + description { state: "slide_end" 0.0; + inherit: "slide_begin" 0.0; + rel2.to_x: "elm.pad0.50px"; + rel2.to_y: "base"; + rel2.relative: 0.0 1.0; + rel2.to_y: "base"; + rel2.relative: 0.0 1.0; + align: 1.0 0.5; + text.text_class: "sublist_text_icon_foc_b"; + } + description { state: "selected_slide_end" 0.0; + inherit: "selected_slide_begin" 0.0; + rel2.to_x: "elm.pad0.50px"; + rel2.to_y: "base"; + rel2.relative: 0.0 1.0; + rel2.to_y: "base"; + rel2.relative: 0.0 1.0; + align: 1.0 0.5; + text.text_class: "sublist_text_icon_sel_foc_b"; + } + } + + part { name: "focus_image_clipper"; type: RECT; + scale: 1; + description { state: "default" 0.0; + fixed: 0 1; + rel1.to: "base"; + rel2.to: "base"; + color_class : "WHITE_OPACITY_0"; + } + description { state: "focused" 0.0; + inherit: "default" 0.0; + color_class : "WHITE_OPACITY_100"; + } + } + + part { name: "bg"; type: IMAGE; + scale: 1; + clip_to: "focus_image_clipper"; + description { state: "default" 0.0; + rel1.to: "base"; + rel2.to: "base"; + image { + normal: "highlight_stroke.png"; + border: FOCUS_HIGHLIGHT_BORDER; + border_scale: 1; + middle: 0; + } + } + } + + part { name: "elm.pad0.50px"; type: SPACER; mouse_events: 0; repeat_events: 1; + scale: 1; + description { state: "default" 0.0; + fixed: 1 1; + min: SCROLL_PAD_WIDTH GENLIST_ITEM_HT; + max: SCROLL_PAD_WIDTH GENLIST_ITEM_HT; + rel1.to: "pad.text_left"; + rel1.relative: 1.0 0.0; + rel2.to: "pad.text_left"; + rel2.relative: 1.0 1.0; + align: 1.0 0.5; + } + } + + part { name: "elm.pad1.50px"; type: SPACER; mouse_events: 0; repeat_events: 1; + scale: 1; + description { state: "default" 0.0; + fixed: 1 1; + min: SCROLL_PAD_WIDTH GENLIST_ITEM_HT; + max: SCROLL_PAD_WIDTH GENLIST_ITEM_HT; + rel1.to_x: "elm.text"; + rel1.to_y: "base"; + rel1.relative: 1.0 0.0; + rel2.to_y: "base"; + rel2.relative: 0.0 1.0; + align: 0.0 0.5; + } + } + + part { name: "elm.text.loopback"; type: TEXT; mouse_events: 0; + scale: 1; + clip_to: "clip_rect"; + ignore_flags: ON_HOLD; + effect: OUTLINE; + description { state: "default" 0.0; + fixed: 1 1; + align: 0.0 0.5; + rel1.to_x: "elm.pad1.50px"; + rel1.to_y: "base"; + rel1.relative: 1.0 0.0; + rel2.to_x: "elm.pad1.50px"; + rel2.to_y: "base"; + rel2.relative: 1.0 1.0; + visible: 0; + color_class: "TEXT_FOCUSED_MAIN_B"; + text { + text_source: "elm.text"; + source: "elm.text"; + min: 1 1; + font: TEXT_FOCUSED_MAIN_FONT; + size: LIST_FONT_SIZE; + align: -1 0.5; + ellipsis: -1; + } + } + description { state: "focused" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "selected_focused" 0.0; + inherit: "default" 0.0; + visible: 1; + color_class: "TEXT_SELECTED_FOCUSED_B"; + text.font: TEXT_SELECTED_FOCUSED_FONT; + } + } + + part { name: "text.size.estimate"; type: TEXT; mouse_events: 0; + scale: 1; + clip_to: "clip_rect"; + description { state: "default" 0.0; + fixed: 1 1; + rel1.to: "pad.text_left"; + rel1.relative: 1.0 0.0; + align: 0.0 0.0; + visible: 0; + text { + text_source: "elm.text"; + source: "elm.text"; + min: 1 1; + align: 0.0 0.5; + font: TEXT_FOCUSED_MAIN_FONT; + size : LIST_FONT_SIZE; + ellipsis: -1; + } + color_class : "TEXT_FOCUSED_MAIN_B"; + } + } + + part { name: "space_at_right"; type: SPACER; mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + fixed: 1 1; + rel1.to_x: "text.size.estimate"; + rel1.to_y: "base"; + rel1.relative: 1.0 0.0; + rel2.to: "pad.text_right"; + rel2.relative: 0.0 1.0; + align: 0.0 0.0; + } + } + } + + programs { + + program { name: "init"; + signal: "load"; + script { + set_int(isSelected, 0); + set_int(isDimmed, 0); + set_int(isFocused, 0); + set_float(curVer, 0); + } + after: "set_states"; + } + + program { name: "anim_focus"; + action: STATE_SET "focused" 0.0; + target: "focus_layer"; + target: "focus_image_clipper"; + transition: CUBIC_BEZIER 0.334 BASIC_CURVE; + } + + program { name: "anim_unfocus"; + action: STATE_SET "default" 0.0; + target: "focus_layer"; + target: "focus_image_clipper"; + transition: CUBIC_BEZIER 0.334 BASIC_CURVE; + } + + program { name: "set_states"; + script { + new Float:vl = get_float(curVer); + if(get_int(isFocused) == 1) { + set_state(PART:"base", "focused", vl); + run_program(PROGRAM:"anim_focus"); + } else if(get_int(isDimmed) == 1) { + set_state(PART:"base", "dimmed", vl); + run_program(PROGRAM:"anim_unfocus"); + } else if(get_int(isSelected) == 1) { + set_state(PART:"base", "selected", vl); + run_program(PROGRAM:"anim_unfocus"); + } else { + set_state(PART:"base", "default", vl); + run_program(PROGRAM:"anim_unfocus"); + } + + if(get_int(isDimmed) == 1) + { + set_state(PART:"elm.text.loopback", "default", vl); + + if(get_int(g_is_rtl) == 1) + set_state(PART:"elm.text", "dimmed.rtl", vl); + else + set_state(PART:"elm.text", "dimmed", vl); + } + else if( (get_int(isSelected) == 1) && (get_int(isFocused) == 1) ) + { + set_state(PART:"elm.text.loopback", "selected_focused", vl); + + if(get_int(g_is_rtl) == 1) + set_state(PART:"elm.text", "selected_focused.rtl", vl); + else + set_state(PART:"elm.text", "selected_focused", vl); + + } + else if(get_int(isFocused) == 1) + { + set_state(PART:"elm.text.loopback", "focused", vl); + + if(get_int(g_is_rtl) == 1) + set_state(PART:"elm.text", "focused.rtl", vl); + else + set_state(PART:"elm.text", "focused", vl); + } + else if(get_int(isSelected) == 1) + { + set_state(PART:"elm.text.loopback", "default", vl); + + if(get_int(g_is_rtl) == 1) + set_state(PART:"elm.text", "selected.rtl", vl); + else + set_state(PART:"elm.text", "selected", vl); + } + else + { + set_state(PART:"elm.text.loopback", "default", vl); + + if(get_int(g_is_rtl) == 1) + set_state(PART:"elm.text", "default.rtl", vl); + else + set_state(PART:"elm.text", "default", vl); + } + + } + } + + program { name: "to_rtl"; + signal: "edje,state,rtl"; source: "edje"; + script { + set_int( g_is_rtl , 1 ); + } + } + + program { name: "to_ltr"; + signal: "edje,state,ltr"; source: "edje"; + script { + set_int( g_is_rtl , 0 ); + } + } + + program { name: "start_slide_signal"; + signal: "text,slide,start"; source: ""; + in: 0.5 0.0; + script { + if(get_int(isFocused) == 1) { + start_slide(); + } + } + } + + program { name: "stop_slide_signal"; + signal: "text,slide,stop"; source: ""; + script { + stop_slide(); + } + } + + program { name: "default_common"; + signal: "elm,state,default"; source: "elm"; + script { + set_int(isFocused, 0); + } + after: "set_states"; + } + + program { name: "focus_common"; + signal: "elm,state,focused"; source: "elm"; + script { + set_int(isFocused, 1); + if(get_int(isDimmed) == 1) { + run_program(PROGRAM:"set_states"); + } else { + run_program(PROGRAM:"text_focus"); + } + } + } + + program { name: "sound_on_focus"; + signal: "elm,action,focused,sound"; source: "elm"; + action: RUN_PLUGIN "focus"; + } + + program { name: "sound_on_select"; + signal: "elm,action,selected,sound"; source: "elm"; + action: RUN_PLUGIN "select"; + } + + program { name: "sound_on_hold"; + signal: "elm,action,longpressed,sound"; source: "elm"; + action: RUN_PLUGIN "hold"; + } + + program { name: "unfocus_common"; + signal: "elm,state,unfocused"; source: "elm"; + script { + set_int(isFocused, 0); + if(get_int(isDimmed) == 1) { + run_program(PROGRAM:"set_states"); + } else { + run_program(PROGRAM:"stop_slide"); + } + } + } + + program { name: "selected_common"; + signal: "elm,state,selected"; source: "elm"; + script { + if(get_int(isDimmed) == 0) { + set_int(isSelected, 1); + } + } + after: "set_states"; + } + + program { name: "unselected_common"; + signal: "elm,state,unselected"; source: "elm"; + script { + set_int(isSelected, 0); + } + after: "set_states"; + } + + program { name: "text_focus"; + after: "start_slide"; + } + + program { name: "start_slide"; + script { + run_program(PROGRAM:"set_states"); + emit("text,slide,start", ""); + } + } + + program { name: "stop_slide"; + script { + emit("text,slide,stop", ""); + } + after: "set_states"; + } + + program { name: "enable"; + signal: "elm,state,enabled"; source: "elm"; + script { + set_int(isDimmed, 0); + } + after: "set_states"; + } + + program { name: "disable"; + signal: "elm,state,disabled"; source: "elm"; + script { + set_int(isDimmed, 1); + } + after: "set_states"; + } + + program { name: "undimmed"; + signal: "elm,state,undimmed"; source: "elm"; + script { + set_int(isDimmed, 0); + } + after: "set_states"; + } + + program { name: "dimmed"; + signal: "elm,state,dimmed"; source: "elm"; + script { + set_int(isDimmed, 1); + } + after: "set_states"; + } + } + } + group { name: "elm/picker"; + images { + image: "I01_picker_panel_bg.png" COMP; + image: "I01_picker_btn_02_normal.png" COMP; + image: "I01_picker_btn_02_press.png" COMP; + image: "I01_picker_btn_normal.png" COMP; + image: "I01_picker_arrow_left.png" COMP; + image: "I01_picker_arrow_right.png" COMP; + } + parts { + part { name: "bg"; + type: SWALLOW; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + rel1 { relative: 0.0 1.0; } + rel2 { relative: 1.0 1.0; } + } + description { state: "show" 0.0; + inherit: "default" 0.0; + rel1 { relative: 0.0 0.0;} + rel2 { relative: 1.0 1.0; offset: 0 2; } + } + description { state: "imf_panel" 0.0; + inherit: "show" 0.0; + visible: 0; + } + } + part { name: "elm.image.panel"; + type: IMAGE; + mouse_events: 1; + scale: 1; + description { state: "default" 0.0; + min: 0 43; + fixed: 0 1; + align: 0.0 0.0; + rel1 { relative: 0.0 0.0; to: "bg"; } + rel2 { relative: 1.0 0.0; to: "bg"; } + image.normal: "I01_picker_panel_bg.png"; + } + description { state: "show" 0.0; + inherit: "default" 0.0; + } + description { state: "imf_panel" 0.0; + inherit: "default" 0.0; + align: 0.0 1.0; + rel1 { relative: 0.0 1.0; to: "bg"; offset: 0 2; } + rel2 { relative: 1.0 1.0; to: "bg"; offset: 0 2; } + } + } + part { name: "padding.prev_bg.left"; + type: RECT; + mouse_events: 1; + scale: 1; + description { state: "default" 0.0; + visible: 0; + min: 10 0; + fixed: 1 0; + align: 0.0 0.0; + rel1 { relative: 0.0 0.0; to: "elm.image.panel"; } + rel2 { relative: 0.0 1.0; to: "elm.image.panel"; } + } + } + part { name: "elm.image.prev_bg"; + type: IMAGE; + mouse_events: 1; + scale: 1; + description { state: "default" 0.0; + visible: 0; + min: 36 32; + max: 36 32; + fixed: 1 1; + align: 0.0 0.5; + rel1 { relative: 1.0 0.0; to_x: "padding.prev_bg.left"; to_y: "elm.image.panel"; } + rel2 { relative: 1.0 1.0; to_x: "padding.prev_bg.left"; to_y: "elm.image.panel"; } + image.normal: "I01_picker_btn_02_normal.png"; + image.border: 5 5 5 5; + } + description { state: "press" 0.0; + inherit: "default" 0.0; + visible: 1; + image.normal: "I01_picker_btn_02_press.png"; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "disable" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 150; + } + } + part { name: "elm.image.prev_arrow"; + type: IMAGE; + mouse_events: 1; + repeat_events: 1; + scale: 1; + description { state: "default" 0.0; + visible: 0; + min: 16 16; + max: 16 16; + fixed: 1 1; + align: 0.5 0.5; + rel1 { relative: 0.0 0.0; to: "elm.image.prev_bg"; } + rel2 { relative: 1.0 1.0; to: "elm.image.prev_bg"; } + image.normal: "I01_picker_arrow_left.png"; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "disable" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 150; + } + } + part { name: "padding.prev_bg.right"; + type: RECT; + mouse_events: 1; + scale: 1; + description { state: "default" 0.0; + visible: 0; + min: 16 0; + fixed: 1 0; + align: 0.0 0.0; + rel1 { relative: 1.0 0.0; to: "elm.image.prev_bg"; } + rel2 { relative: 1.0 1.0; to: "elm.image.prev_bg"; } + } + } + part { name: "elm.image.next_bg"; + type: IMAGE; + mouse_events: 1; + scale: 1; + description { state: "default" 0.0; + visible: 0; + min: 36 32; + max: 36 32; + fixed: 1 1; + align: 0.0 0.5; + rel1 { relative: 1.0 0.0; to_x: "padding.prev_bg.right"; to_y: "elm.image.panel"; } + rel2 { relative: 1.0 1.0; to_x: "padding.prev_bg.right"; to_y: "elm.image.panel"; } + image.normal: "I01_picker_btn_02_normal.png"; + image.border: 5 5 5 5; + } + description { state: "press" 0.0; + inherit: "default" 0.0; + visible: 1; + image.normal: "I01_picker_btn_02_press.png"; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "disable" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 150; + } + } + part { name: "elm.image.next_arrow"; + type: IMAGE; + mouse_events: 1; + repeat_events: 1; + scale: 1; + description { state: "default" 0.0; + visible: 0; + min: 16 16; + max: 16 16; + fixed: 1 1; + align: 0.5 0.5; + rel1 { relative: 0.0 0.0; to: "elm.image.next_bg"; } + rel2 { relative: 1.0 1.0; to: "elm.image.next_bg"; } + image.normal: "I01_picker_arrow_right.png"; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "disable" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 150; + } + } + part { name: "padding.done_bg.right"; + type: RECT; + mouse_events: 1; + scale: 1; + description { state: "default" 0.0; + visible: 0; + min: 10 0; + fixed: 1 0; + align: 1.0 0.0; + rel1 { relative: 1.0 0.0; to: "elm.image.panel"; } + rel2 { relative: 1.0 1.0; to: "elm.image.panel"; } + } + } + part { name: "elm.image.done_bg"; + type: IMAGE; + mouse_events: 1; + scale: 1; + description { state: "default" 0.0; + min: 66 32; + max: 66 32; + fixed: 1 1; + align: 1.0 0.5; + rel1 { relative: 0.0 0.0; to_x: "padding.done_bg.right"; to_y: "elm.image.panel"; } + rel2 { relative: 0.0 1.0; to_x: "padding.done_bg.right"; to_y: "elm.image.panel"; } + image.normal: "I01_picker_btn_02_normal.png"; + image.border: 5 5 5 5; + } + description { state: "press" 0.0; + inherit: "default" 0.0; + image.normal: "I01_picker_btn_02_press.png"; + } + } + part { name: "elm.text.done"; + type: TEXT; + repeat_events: 1; + scale: 1; + description { state: "default" 0.0; + visible: 1; + fixed: 1 1; + rel1.to: "elm.image.done_bg"; + rel2.to: "elm.image.done_bg"; + color: 255 255 255 255; + text { + font: "Tizen:style=Medium"; + size: 16; + min: 1 1; + align: 0.5 0.5; + ellipsis: -1; + } + } + } + part { name: "elm.swallow.content"; + type: SWALLOW; + mouse_events: 1; + scale: 1; + description { state: "default" 0.0; + align: 0.0 0.0; + fixed: 0 1; + rel1 { relative: 0.0 1.0; to: "elm.image.panel"; } + rel2 { relative: 1.0 1.0;} + } + description { state: "show" 0.0; + inherit: "default" 0.0; + } + description { state: "imf_panel" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + } + + programs { + program { + name: "prev_button_press"; + signal: "mouse,down,1"; + source: "elm.image.prev_bg"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.image.prev_bg", st, 30, vl); + if (!strcmp(st, "visible")) + set_state(PART:"elm.image.prev_bg", "press", 0.0); + } + } + program { + name: "prev_button_release"; + signal: "mouse,up,1"; + source: "elm.image.prev_bg"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.image.prev_bg", st, 30, vl); + if (!strcmp(st, "press")) + set_state(PART:"elm.image.prev_bg", "visible", 0.0); + } + } + program { + name: "next_button_press"; + signal: "mouse,down,1"; + source: "elm.image.next_bg"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.image.next_bg", st, 30, vl); + if (!strcmp(st, "visible")) + set_state(PART:"elm.image.next_bg", "press", 0.0); + } + } + program { + name: "next_button_release"; + signal: "mouse,up,1"; + source: "elm.image.next_bg"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.image.next_bg", st, 30, vl); + if (!strcmp(st, "press")) + set_state(PART:"elm.image.next_bg", "visible", 0.0); + } + } + program { + name: "done_button_press"; + signal: "mouse,down,1"; + source: "elm.image.done_bg"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.image.done_bg", st, 30, vl); + if (!strcmp(st, "default")) + set_state(PART:"elm.image.done_bg", "press", 0.0); + } + } + program { + name: "done_button_release"; + signal: "mouse,up,1"; + source: "elm.image.done_bg"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.image.done_bg", st, 30, vl); + if (!strcmp(st, "press")) + set_state(PART:"elm.image.done_bg", "default", 0.0); + } + } + program { name: "show,picker"; + signal: "show,picker,signal"; + transition: LINEAR 0.4; + action: STATE_SET "show" 0.0; + target: "bg"; + target: "elm.image.panel"; + target: "elm.swallow.content"; + } + program { name: "show,picker_delay"; + signal: "show,picker_delay,signal"; + action: STATE_SET "show" 0.0; + in: 0.5 0.0; + target: "bg"; + target: "elm.image.panel"; + target: "elm.swallow.content"; + } + program { name: "hide,picker"; + signal: "hide,picker,signal"; + action: STATE_SET "default" 0.0; + target: "bg"; + target: "elm.image.panel"; + target: "elm.swallow.content"; + } + program { name: "show,prev_button"; + signal: "show,prev_button,signal"; + action: STATE_SET "visible" 0.0; + target: "elm.image.prev_bg"; + target: "elm.image.prev_arrow"; + } + program { name: "hide,prev_button"; + signal: "hide,prev_button,signal"; + action: STATE_SET "default" 0.0; + target: "elm.image.prev_bg"; + target: "elm.image.prev_arrow"; + } + program { name: "enable,prev_button"; + signal: "enable,prev_button,signal"; + action: STATE_SET "visible" 0.0; + target: "elm.image.prev_bg"; + target: "elm.image.prev_arrow"; + } + program { name: "disable,prev_button"; + signal: "disable,prev_button,signal"; + action: STATE_SET "disable" 0.0; + target: "elm.image.prev_bg"; + target: "elm.image.prev_arrow"; + } + program { name: "show,next_button"; + signal: "show,next_button,signal"; + action: STATE_SET "visible" 0.0; + target: "elm.image.next_bg"; + target: "elm.image.next_arrow"; + } + program { name: "hide,next_button"; + signal: "hide,next_button,signal"; + action: STATE_SET "default" 0.0; + target: "elm.image.next_bg"; + target: "elm.image.next_arrow"; + } + program { name: "enable,next_button"; + signal: "enable,next_button,signal"; + action: STATE_SET "visible" 0.0; + target: "elm.image.next_bg"; + target: "elm.image.next_arrow"; + } + program { name: "disable,next_button"; + signal: "disable,next_button,signal"; + action: STATE_SET "disable" 0.0; + target: "elm.image.next_bg"; + target: "elm.image.next_arrow"; + } + program { name: "show,imf_panel"; + signal: "show,imf_panel,signal"; + action: STATE_SET "imf_panel" 0.0; + target: "bg"; + target: "elm.image.panel"; + target: "elm.swallow.content"; + } + } + } +} diff --git a/tizen_src/ewk/efl_integration/resource/images/highlight_stroke.png b/tizen_src/ewk/efl_integration/resource/images/highlight_stroke.png new file mode 100644 index 0000000000000000000000000000000000000000..aeed88a3ed247d4c88c999e728c9f8b1d622d58a GIT binary patch literal 1134 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%xak-5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|8l;|;8yV;tSX!AHTNxNBK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xG?WUP)qwZeFo6%mkOz;^d;tf|AVqJOz-6iAnjT zCALaHmqNUdTj1*pH#n~t8c@I>)2~P@&^OdG(9g{U`3tPNxFjeQ;S8**i$f|4QuTvU zi}Op1l7aD&rVP^z3_JW5ffNE=W95>cT$-DjSK{ens{|C$OUX>JGBI~^b~Uwdu{1F> zF*F3SoDG~D-OQYgj9e_uESz0ndOh=sOA_;vQ(<~D5qh2R>a}t%N=+=uFAB-e&w<5W zKt_H^esM;Afr7I$IJOit!ZY(y^2>`gLBR`kZE8_wS!#+~QGTuhIDD)!vADt2$kfcz z!ps!t24j%>9i1#poQw?2P0dUl9gU35m7sc4u=pLS*9@m#eV}9XL6M6T*)Sns3IZ|V zNf*e0C;rqtV2UpSChhB~FD?MH#XV0K$B>F!Z>DeLI;McVLW5Qb+&|sM?S622wU;bPPU#!g2CrjiZs{EhZ8_0fTydU J%Q~loCIBZ;fo%W) literal 0 HcmV?d00001 diff --git a/tizen_src/ewk/efl_integration/resource/images/obe_list_scroll_down.png b/tizen_src/ewk/efl_integration/resource/images/obe_list_scroll_down.png new file mode 100644 index 0000000000000000000000000000000000000000..23cc8ee38e6bb807988c12b2c49f1da64d500007 GIT binary patch literal 3183 zcmV-#43P7QP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3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~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z00050Nkl@lK$rmlVFmzU1_0);Y6Q>@ z-EMcD-8)IG z;tawJEIG=9U!p9|Ak09GQQl5+_)C<($GM;6M4UmGfyG$+7Ul5_`(CEJ=Pb@3%)o-8 zJWR5a^78fgAIG?`at2`r+7acS;@nGeZ@eJPKr>OEj`Q@ZRN@T64E!<5g9S%<;=J05 zGYB&fQxt_M063;@Cm00=Vx k2r~dsgAV`z0RR6305U~Pt6CIZ>Hq)$07*qoM6N<$f+XtYbN~PV literal 0 HcmV?d00001 diff --git a/tizen_src/ewk/efl_integration/resource/images/obe_list_scroll_up_f.png b/tizen_src/ewk/efl_integration/resource/images/obe_list_scroll_up_f.png new file mode 100644 index 0000000000000000000000000000000000000000..252633752a7ac81f5f5520454b61a242da07ef9b GIT binary patch literal 3200 zcmV-`41e>9P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC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<^AScV*+6Ynu+qzWy%M^uB#QaID;?)4MlnA zqS}fx2s1F}DEEJfvN(e<12sl@J;~lLQ67(TH_4GWgD?ZLu{0Ltw+Z&WNO{j$oI#j@ z8AbUq$wtb{*Khwg#<`U<2s6-*DE}1a!z6dc3&IRE6Xnr3kG@JJ&LGUdAEVr#ag>M7 zs;xMKFar}rc{7tg=q1h|%)lI@JecEejmG&P$-VJ|FazK9YKrn`oI6QwQvPM+gHr&) z4176B@={Zjhfb4xBzZP|XopTw6s73;@Cm00=Vx2r~d6 m%m5(F06+~s0RRC1{{sNlMNF$G1SE?90000HandlePopupMenu(std::move(items), selected_item, - allow_multiple_selection); + allow_multiple_selection, bounds); } void WebContentsEflDelegateEwk::HidePopupMenu() { diff --git a/tizen_src/ewk/efl_integration/web_contents_observer_efl.cc b/tizen_src/ewk/efl_integration/web_contents_observer_efl.cc index c48e996..8917a69 100644 --- a/tizen_src/ewk/efl_integration/web_contents_observer_efl.cc +++ b/tizen_src/ewk/efl_integration/web_contents_observer_efl.cc @@ -335,8 +335,11 @@ void WebContentsObserverEfl::OnRequestSelectCollectionInformationUpdateACK( int current_node_index, bool prev_state, bool next_state) { - web_view_->UpdateFormNavigation(form_element_count, current_node_index, - prev_state, next_state); + if (!web_view_->GetSelectPicker()) + return; + + web_view_->GetSelectPicker()->UpdateFormNavigation(form_element_count, + current_node_index); } void WebContentsObserverEfl::OnDidChangeMaxScrollOffset(int max_scroll_x, -- 2.7.4