From 816cd14bfcbff087daa598b0d41a2d30f47a6388 Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Thu, 4 Jan 2024 17:42:22 +0900 Subject: [PATCH] [webview_flutter_tizen] Change ecore_evas engine for web engine and remove some chromium arguments temporary. --- packages/webview_flutter/CHANGELOG.md | 5 +++++ packages/webview_flutter/tizen/src/webview.cc | 19 ++++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/packages/webview_flutter/CHANGELOG.md b/packages/webview_flutter/CHANGELOG.md index 929fad45a..461d08959 100644 --- a/packages/webview_flutter/CHANGELOG.md +++ b/packages/webview_flutter/CHANGELOG.md @@ -1,3 +1,8 @@ +## NEXT + +* Change ecore_evas engine for web engine. +* Remove some chromium arguments temporary. + ## 0.9.0 * Update webivew_flutter to 4.4.2. diff --git a/packages/webview_flutter/tizen/src/webview.cc b/packages/webview_flutter/tizen/src/webview.cc index 8fe79c97b..a68bc773c 100644 --- a/packages/webview_flutter/tizen/src/webview.cc +++ b/packages/webview_flutter/tizen/src/webview.cc @@ -289,17 +289,30 @@ void WebView::InitWebView() { char* chromium_argv[] = { const_cast("--disable-pinch"), const_cast("--js-flags=--expose-gc"), - const_cast("--single-process"), - const_cast("--no-zygote"), + const_cast("--disable-web-security"), + // NOTE(jsuya): These flags are not guaranteed to work in certain versions + // of Tizen(6.0). These can be checked later with tizen version + // information. + // const_cast("--single-process"), + // const_cast("--no-zygote"), }; int chromium_argc = sizeof(chromium_argv) / sizeof(chromium_argv[0]); EwkInternalApiBinding::GetInstance().main.SetArguments(chromium_argc, chromium_argv); ewk_init(); - Ecore_Evas* evas = ecore_evas_new("wayland_egl", 0, 0, 1, 1, 0); + Ecore_Evas* evas = ecore_evas_new(nullptr, 0, 0, 1, 1, 0); + if (!evas) { + LOG_ERROR("Failed to create ecore evas instance."); + return; + } webview_instance_ = ewk_view_add(ecore_evas_get(evas)); + if (!webview_instance_) { + LOG_ERROR("Failed to create ewk view instance."); + return; + } + ecore_evas_focus_set(evas, true); ewk_view_focus_set(webview_instance_, true); EwkInternalApiBinding::GetInstance().view.OffscreenRenderingEnabledSet(