#include "wrt/src/browser/tv/video_splash_screen.h"
#include "wrt/src/browser/tv/widget_state.h"
#include "wrt/src/browser/wrt_browser_context.h"
+#include "wrt/src/browser/wrt_web_contents.h"
#include "wrt/src/common/tv/application_data_tv.h"
#include "wrt/src/service/wrt_service.h"
if (!is_main_native_window_)
return;
+ auto* wrt_web_contents = WRTWebContents::FromNativeWindow(this);
+ if (wrt_web_contents)
+ wrt_web_contents->HidePopupMenuImpl();
+
if (auto* rwhv = GetRenderWidgetHostView())
rwhv->ClearAllTilesResources();
return;
int window_width, window_height;
- elm_win_screen_size_get(top_window_, nullptr, nullptr,
- &window_width,
+ elm_win_screen_size_get(top_window_, nullptr, nullptr, &window_width,
&window_height);
resizable_rect_ = evas_object_rectangle_add(top_window_);
evas_object_size_hint_min_set(resizable_rect_, window_width, window_height);
Eina_Rectangle WRTSelectPickerTv::GetLastUsedViewPortArea() {
Eina_Rectangle result = {-1, -1, -1, -1};
- Evas_Object* evas = efl::WindowFactory::GetHostWindow(web_contents_);
+ Evas_Object* view = static_cast<Evas_Object*>(web_contents_->GetNativeView());
Evas_Coord x, y, width, height;
- evas_object_geometry_get(evas, &x, &y, &width, &height);
+ evas_object_geometry_get(view, &x, &y, &width, &height);
result.x = x;
result.y = y;
result.w = width;
int selected_index,
std::vector<blink::mojom::MenuItemPtr> items,
bool is_multiple_selection,
- const gfx::Rect& bounds) {
+ const gfx::Rect& bounds,
+ double item_font_size) {
SelectPickerBase* picker;
Evas_Object* view_evas =
WRTNativeWindow::FromWebContents(web_contents)->view_evas();
if (IsTvProfile()) {
picker = new WRTSelectPickerTv(
web_contents, selected_index, is_multiple_selection, view_evas);
+ picker->SetFontSizeAsItem(item_font_size);
} else if (IsWearableProfile()) {
picker = new WRTSelectPickerWearable(
web_contents, selected_index, is_multiple_selection, view_evas);
std::vector<blink::mojom::MenuItemPtr> items,
int selectedIndex,
bool multiple,
- const gfx::Rect& bounds) {
+ const gfx::Rect& bounds,
+ double item_font_size) {
if (!select_picker_) {
select_picker_.reset(CreateSelectPicker(web_contents(), selectedIndex,
- std::move(items), multiple, bounds));
+ std::move(items), multiple, bounds,
+ item_font_size));
// Picker has been shown on top of webview and the page content gets
// partially overlapped. Decrease viewport while showing picker.
AdjustViewPortHeightToPopupMenu(true /* is_popup_menu_visible */);
void ShowPopupMenuImpl(std::vector<blink::mojom::MenuItemPtr> items,
int selectedIndex,
bool multiple,
- const gfx::Rect& bounds);
+ const gfx::Rect& bounds,
+ double item_font_size);
void HidePopupMenuImpl();
void AdjustViewPortHeightToPopupMenu(bool is_popup_menu_visible);
void ScrollFocusedNodeIntoView();
bool right_aligned,
bool allow_multiple_selection) {
wrt_web_contents_->ShowPopupMenuImpl(std::move(items), selected_item,
- allow_multiple_selection, bounds);
+ allow_multiple_selection, bounds,
+ item_font_size);
}
void WRTWebContentsViewEflDelegate::HidePopupMenu() {