From d6bb795a1286f8f915ab728513d2d7fe1dd9b393 Mon Sep 17 00:00:00 2001 From: Sun-woo Nam Date: Thu, 1 Feb 2024 21:12:01 -0800 Subject: [PATCH 01/16] [M120 Migration][MM] Pass |user_agent| instead of WebContents during MediaPlayer creation This is to avoid dependency on //content in //media/filters for resolving DA build errors for tizen 6.0. Reference: https://review.tizen.org/gerrit/#/c/295064/ Change-Id: I01d5d57075b734e15394624e6572ff11cbae1d04 Signed-off-by: Sun-woo Nam --- .../content/browser/media/tizen_renderer_impl.cc | 9 ++++++++- .../chromium_impl/media/filters/media_player_bridge_capi.cc | 2 +- .../chromium_impl/media/filters/media_player_bridge_capi.h | 2 +- .../media/filters/media_player_bridge_capi_factory.cc | 12 +----------- .../media/filters/media_player_bridge_capi_factory.h | 2 +- .../media/filters/media_player_bridge_capi_tv.cc | 2 +- .../media/filters/media_player_bridge_capi_tv.h | 2 +- .../media/filters/media_player_esplusplayer_factory.cc | 2 +- .../media/filters/media_player_esplusplayer_factory.h | 7 +++---- tizen_src/chromium_impl/media/filters/media_player_factory.h | 6 +----- .../chromium_impl/media/filters/media_player_registry.cc | 4 ++-- .../chromium_impl/media/filters/media_player_registry.h | 6 +----- tizen_src/chromium_impl/media/filters/media_player_tizen.h | 1 - .../chromium_impl/media/filters/media_player_tizen_client.h | 1 - 14 files changed, 22 insertions(+), 36 deletions(-) diff --git a/tizen_src/chromium_impl/content/browser/media/tizen_renderer_impl.cc b/tizen_src/chromium_impl/content/browser/media/tizen_renderer_impl.cc index 27f4932..c502b70 100644 --- a/tizen_src/chromium_impl/content/browser/media/tizen_renderer_impl.cc +++ b/tizen_src/chromium_impl/content/browser/media/tizen_renderer_impl.cc @@ -136,9 +136,16 @@ void TizenRendererImpl::Initialize(media::MediaResource* media_resource, init_cb_ = std::move(init_cb); media_resource_ = media_resource; + std::string user_agent; + if (web_contents_) { + user_agent = web_contents_->GetUserAgentOverride().ua_string_override; + if (user_agent.empty()) + user_agent = content::GetContentClientExport()->browser()->GetUserAgent(); + } + // Create a media player and get player id for the created media player. media_player_ = media::MediaPlayerRegistry::GetInstance()->CreateMediaPlayer( - media_resource_, web_contents_, volume_, player_id_); + media_resource_, user_agent, volume_, player_id_); if (!media_player_->CreatePlayer(player_id_)) { media::MediaPlayerRegistry::GetInstance()->UnregisterMediaPlayer( diff --git a/tizen_src/chromium_impl/media/filters/media_player_bridge_capi.cc b/tizen_src/chromium_impl/media/filters/media_player_bridge_capi.cc index fa585d8..837352d 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_bridge_capi.cc +++ b/tizen_src/chromium_impl/media/filters/media_player_bridge_capi.cc @@ -99,7 +99,7 @@ static void InterruptCb(player_interrupted_code_e code, void* data) { namespace media { MediaPlayerBridgeCapi::MediaPlayerBridgeCapi(const GURL& url, - std::string& user_agent, + const std::string& user_agent, double volume) : task_runner_(base::SingleThreadTaskRunner::GetCurrentDefault()), delayed_player_state_(PLAYER_STATE_DELAYED_NULL), diff --git a/tizen_src/chromium_impl/media/filters/media_player_bridge_capi.h b/tizen_src/chromium_impl/media/filters/media_player_bridge_capi.h index b7213ac..a3c7f27 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_bridge_capi.h +++ b/tizen_src/chromium_impl/media/filters/media_player_bridge_capi.h @@ -46,7 +46,7 @@ class MEDIA_EXPORT MediaPlayerBridgeCapi : public MediaPlayerTizen { typedef base::OnceCallback CompleteCB; MediaPlayerBridgeCapi(const GURL& url, - std::string& user_agent, + const std::string& user_agent, double volume); MediaPlayerBridgeCapi(const MediaPlayerBridgeCapi&) = delete; MediaPlayerBridgeCapi& operator=(const MediaPlayerBridgeCapi&) = delete; diff --git a/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_factory.cc b/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_factory.cc index 3cb4af7..45b3044 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_factory.cc +++ b/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_factory.cc @@ -4,9 +4,6 @@ #include "tizen_src/chromium_impl/media/filters/media_player_bridge_capi_factory.h" -#include "content/common/content_client_export.h" -#include "content/public/browser/content_browser_client.h" -#include "content/public/browser/web_contents.h" #include "media/base/media_resource.h" #include "third_party/blink/public/common/user_agent/user_agent_metadata.h" #if BUILDFLAG(IS_TIZEN_TV) @@ -19,15 +16,8 @@ namespace media { std::unique_ptr MediaPlayerBridgeCapiFactory::Create( MediaResource* media_resource, - content::WebContents* web_contents, + const std::string& user_agent, double volume) { - std::string user_agent; - if (web_contents) { - user_agent = web_contents->GetUserAgentOverride().ua_string_override; - if (user_agent.empty()) { - user_agent = content::GetContentClientExport()->browser()->GetUserAgent(); - } - } #if BUILDFLAG(IS_TIZEN_TV) return std::make_unique( media_resource->GetMediaUrlParams().media_url, user_agent, volume); diff --git a/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_factory.h b/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_factory.h index cdf9177..e9dbfac 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_factory.h +++ b/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_factory.h @@ -20,7 +20,7 @@ class MEDIA_EXPORT MediaPlayerBridgeCapiFactory : public MediaPlayerFactory { ~MediaPlayerBridgeCapiFactory() override = default; std::unique_ptr Create(MediaResource* media_resource, - content::WebContents* web_contents, + const std::string& user_agent, double volume) override; }; diff --git a/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_tv.cc b/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_tv.cc index 5b79cef..7cfb666 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_tv.cc +++ b/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_tv.cc @@ -13,7 +13,7 @@ const int kSeekableTimeUpdateInterval = 500; namespace media { MediaPlayerBridgeCapiTV::MediaPlayerBridgeCapiTV(const GURL& url, - std::string& user_agent, + const std::string& user_agent, double volume) : MediaPlayerBridgeCapi(url, user_agent, volume), weak_factory_(this) { LOG(INFO) << "(" << static_cast(this) << ") " << __func__; diff --git a/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_tv.h b/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_tv.h index c009231..b6c5a16 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_tv.h +++ b/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_tv.h @@ -15,7 +15,7 @@ namespace media { class MEDIA_EXPORT MediaPlayerBridgeCapiTV : public MediaPlayerBridgeCapi { public: MediaPlayerBridgeCapiTV(const GURL& url, - std::string& user_agent, + const std::string& user_agent, double volume); ~MediaPlayerBridgeCapiTV() override; diff --git a/tizen_src/chromium_impl/media/filters/media_player_esplusplayer_factory.cc b/tizen_src/chromium_impl/media/filters/media_player_esplusplayer_factory.cc index 42704dc..f3b2fc9 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_esplusplayer_factory.cc +++ b/tizen_src/chromium_impl/media/filters/media_player_esplusplayer_factory.cc @@ -15,7 +15,7 @@ namespace media { std::unique_ptr MediaPlayerESPlusPlayerFactory::Create( MediaResource* media_resource, - content::WebContents* web_contents, + const std::string& user_agent, double volume) { #if BUILDFLAG(IS_TIZEN_TV) return std::make_unique(); diff --git a/tizen_src/chromium_impl/media/filters/media_player_esplusplayer_factory.h b/tizen_src/chromium_impl/media/filters/media_player_esplusplayer_factory.h index f973199..44a3c1f 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_esplusplayer_factory.h +++ b/tizen_src/chromium_impl/media/filters/media_player_esplusplayer_factory.h @@ -19,10 +19,9 @@ class MEDIA_EXPORT MediaPlayerESPlusPlayerFactory : public MediaPlayerFactory { public: ~MediaPlayerESPlusPlayerFactory() override = default; - std::unique_ptr Create( - MediaResource* /*media_resource*/, - content::WebContents* /*web_contents*/, - double /*volume*/) override; + std::unique_ptr Create(MediaResource* /*media_resource*/, + const std::string& /*user_agent*/, + double /*volume*/) override; }; } // namespace media diff --git a/tizen_src/chromium_impl/media/filters/media_player_factory.h b/tizen_src/chromium_impl/media/filters/media_player_factory.h index efb2589..e5cc48d 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_factory.h +++ b/tizen_src/chromium_impl/media/filters/media_player_factory.h @@ -9,10 +9,6 @@ #include "media/base/media_export.h" -namespace content { -class WebContents; -} // namespace content - namespace media { class MediaPlayerTizen; @@ -24,7 +20,7 @@ class MEDIA_EXPORT MediaPlayerFactory { virtual std::unique_ptr Create( MediaResource* media_resource, - content::WebContents* web_contents, + const std::string& user_agent, double volume) = 0; }; diff --git a/tizen_src/chromium_impl/media/filters/media_player_registry.cc b/tizen_src/chromium_impl/media/filters/media_player_registry.cc index 4974992..e8f55b8 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_registry.cc +++ b/tizen_src/chromium_impl/media/filters/media_player_registry.cc @@ -24,7 +24,7 @@ MediaPlayerRegistry::~MediaPlayerRegistry() {} std::unique_ptr MediaPlayerRegistry::CreateMediaPlayer( MediaResource* media_resource, - content::WebContents* web_contents, + const std::string& user_agent, double volume, int& player_id) { LOG(INFO) << __func__; @@ -35,7 +35,7 @@ std::unique_ptr MediaPlayerRegistry::CreateMediaPlayer( // media_resource->GetType() == MediaResource::Type::KUrl factory = std::make_unique(); } - auto player = factory->Create(media_resource, web_contents, volume); + auto player = factory->Create(media_resource, user_agent, volume); player_id = RegisterMediaPlayer(player.get()); return player; } diff --git a/tizen_src/chromium_impl/media/filters/media_player_registry.h b/tizen_src/chromium_impl/media/filters/media_player_registry.h index ff0b908..29a051f 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_registry.h +++ b/tizen_src/chromium_impl/media/filters/media_player_registry.h @@ -12,10 +12,6 @@ #include "media/filters/longest_conflict_strategy.h" #include "media/filters/media_capability_manager.h" -namespace content { -class WebContents; -} - namespace media { class MediaPlayerTizen; @@ -30,7 +26,7 @@ class MEDIA_EXPORT MediaPlayerRegistry { std::unique_ptr CreateMediaPlayer( MediaResource* media_resource, - content::WebContents* web_contents, + const std::string& user_agent, double volume, int& player_id); int RegisterMediaPlayer(MediaPlayerTizen* player); diff --git a/tizen_src/chromium_impl/media/filters/media_player_tizen.h b/tizen_src/chromium_impl/media/filters/media_player_tizen.h index a9a3396..defac69 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_tizen.h +++ b/tizen_src/chromium_impl/media/filters/media_player_tizen.h @@ -51,7 +51,6 @@ class MEDIA_EXPORT MediaPlayerTizen { virtual void Initialize(VideoRendererSink* sink) = 0; virtual bool IsInitialized() = 0; virtual void Prepare() = 0; - virtual void PlayerPrepared() {} virtual bool IsPrepared() = 0; virtual bool CanPrepare() = 0; virtual void Release() = 0; diff --git a/tizen_src/chromium_impl/media/filters/media_player_tizen_client.h b/tizen_src/chromium_impl/media/filters/media_player_tizen_client.h index 1e0c1c8..d98b4d9 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_tizen_client.h +++ b/tizen_src/chromium_impl/media/filters/media_player_tizen_client.h @@ -5,7 +5,6 @@ #ifndef MEDIA_FILTERS_MEDIA_PLAYER_TIZEN_CLIENT_H_ #define MEDIA_FILTERS_MEDIA_PLAYER_TIZEN_CLIENT_H_ -#include "content/public/browser/web_contents.h" #include "media/base/audio_decoder_config.h" #include "media/base/pipeline_status.h" #include "media/base/video_decoder_config.h" -- 2.7.4 From 00c5cf1ce7bc4285ab1638ef91db5eac769c67e2 Mon Sep 17 00:00:00 2001 From: "venu.musham" Date: Fri, 16 Feb 2024 16:34:40 +0530 Subject: [PATCH 02/16] [v8] Enable v8 optimization. V8 lite mode was enabled during upversion to resolve build issues during bringup. lite mode disables v8 optimizations, hence canvas performance was low. Enable V8 optimizations. Change-Id: I705d25fd91d7b3c6bc11006ac92a1dca1799fbdc Signed-off-by: venu.musham --- v8/gni/v8.gni | 3 +-- v8/src/wasm/std-object-sizes.h | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/v8/gni/v8.gni b/v8/gni/v8.gni index 8607310..1168953 100644 --- a/v8/gni/v8.gni +++ b/v8/gni/v8.gni @@ -63,8 +63,7 @@ declare_args() { # Lite mode disables a number of performance optimizations to reduce memory # at the cost of performance. # Sets -DV8_LITE_MODE. - # FIXME(bringup m114): need to disable for tizen after resolving linker error - v8_enable_lite_mode = true + v8_enable_lite_mode = false # Enable the Turbofan compiler. # Sets -dV8_ENABLE_TURBOFAN. diff --git a/v8/src/wasm/std-object-sizes.h b/v8/src/wasm/std-object-sizes.h index 6b16ef2..776b917 100644 --- a/v8/src/wasm/std-object-sizes.h +++ b/v8/src/wasm/std-object-sizes.h @@ -62,9 +62,9 @@ inline size_t ContentSize(std::unordered_set set) { // When one of these checks fails, that probably means you've added fields to // a class guarded by it. Update the respective EstimateCurrentMemoryConsumption // function accordingly, and then update the check's expected size. -#if V8_TARGET_ARCH_X64 && defined(__clang__) && V8_TARGET_OS_LINUX && \ - !V8_USE_ADDRESS_SANITIZER && !V8_USE_MEMORY_SANITIZER && defined(DEBUG) && \ - V8_COMPRESS_POINTERS && !defined(V8_GC_MOLE) && defined(_LIBCPP_VERSION) +#if defined(V8_TARGET_ARCH_X64) && defined(__clang__) && defined(V8_TARGET_OS_LINUX) && \ + !defined(V8_USE_ADDRESS_SANITIZER) && !defined(V8_USE_MEMORY_SANITIZER) && defined(DEBUG) && \ + defined(V8_COMPRESS_POINTERS) && !defined(V8_GC_MOLE) && defined(_LIBCPP_VERSION) #define UPDATE_WHEN_CLASS_CHANGES(classname, size) \ static_assert(sizeof(classname) == size, \ "Update {EstimateCurrentMemoryConsumption} when adding " \ -- 2.7.4 From d54ede646e914693981600534dae21a9640f055f Mon Sep 17 00:00:00 2001 From: Sun-woo Nam Date: Thu, 1 Feb 2024 21:21:52 -0800 Subject: [PATCH 03/16] [M120 Migration][MM] Get WebContents in Realtime. 1.web_contents_ varaible is passed by TizenRendererImpl constructor It may be destroyed and don't notify TizenRendererImpl which makes dangling pointer access So get webcontents by render_process_id and routing_id in realtime References: https://review.tizen.org/gerrit/#/c/295250/ https://review.tizen.org/gerrit/#/c/297630/ - fixup! Solve GetViewportRect crash There is also a web_contents_ that is not modified. https://review.tizen.org/gerrit/#/c/295250/ Change-Id: I2d26e63417d9b383dd8a516d6b7b1cb7d1393259 Signed-off-by: Sun-woo Nam --- .../content/browser/media/tizen_renderer_impl.cc | 29 ++++++++++++++-------- .../content/browser/media/tizen_renderer_impl.h | 1 + 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/tizen_src/chromium_impl/content/browser/media/tizen_renderer_impl.cc b/tizen_src/chromium_impl/content/browser/media/tizen_renderer_impl.cc index c502b70..d0c9c2c 100644 --- a/tizen_src/chromium_impl/content/browser/media/tizen_renderer_impl.cc +++ b/tizen_src/chromium_impl/content/browser/media/tizen_renderer_impl.cc @@ -137,8 +137,9 @@ void TizenRendererImpl::Initialize(media::MediaResource* media_resource, media_resource_ = media_resource; std::string user_agent; - if (web_contents_) { - user_agent = web_contents_->GetUserAgentOverride().ua_string_override; + content::WebContents* web_contents = GetWebContents(); + if (web_contents) { + user_agent = web_contents->GetUserAgentOverride().ua_string_override; if (user_agent.empty()) user_agent = content::GetContentClientExport()->browser()->GetUserAgent(); } @@ -162,12 +163,14 @@ void TizenRendererImpl::Initialize(media::MediaResource* media_resource, media_player_->SetMediaType(media::DemuxerStream::VIDEO); #if defined(TIZEN_VIDEO_HOLE) - if (RenderWidgetHostViewAura* view_aura = - static_cast( - web_contents_->GetRenderWidgetHostView())) { - view_aura->SetWebViewMovedCallback(base::BindRepeating( - &TizenRendererImpl::OnWebViewMoved, base::Unretained(this))); - LOG(INFO) << "SetPositionMovedCallbacks called!"; + if (web_contents) { + if (RenderWidgetHostViewAura* view_aura = + static_cast( + web_contents->GetRenderWidgetHostView())) { + view_aura->SetWebViewMovedCallback(base::BindRepeating( + &TizenRendererImpl::OnWebViewMoved, base::Unretained(this))); + LOG(INFO) << "SetPositionMovedCallbacks called!"; + } } #endif @@ -306,11 +309,12 @@ void TizenRendererImpl::SetPlayerMediaGeometry() { } gfx::Rect TizenRendererImpl::GetViewportRect() const { - if (!web_contents_) + content::WebContents* web_contents = GetWebContents(); + if (!web_contents) return gfx::Rect(); if (RenderWidgetHostViewAura* rwhv = static_cast( - web_contents_->GetRenderWidgetHostView())) { + web_contents->GetRenderWidgetHostView())) { if (rwhv->offscreen_helper()) { // offscreen rendering mode return rwhv->offscreen_helper()->GetViewBoundsInPix(); @@ -330,6 +334,11 @@ void TizenRendererImpl::OnWebViewMoved() { } #endif +content::WebContents* TizenRendererImpl::GetWebContents() const { + return WebContents::FromRenderFrameHost( + RenderFrameHost::FromID(render_process_id_, routing_id_)); +} + void TizenRendererImpl::Suspend() { LOG(INFO) << "(" << static_cast(this) << ") " << __func__; if (is_suspended_) diff --git a/tizen_src/chromium_impl/content/browser/media/tizen_renderer_impl.h b/tizen_src/chromium_impl/content/browser/media/tizen_renderer_impl.h index d28e8d0..13af303 100644 --- a/tizen_src/chromium_impl/content/browser/media/tizen_renderer_impl.h +++ b/tizen_src/chromium_impl/content/browser/media/tizen_renderer_impl.h @@ -156,6 +156,7 @@ class CONTENT_EXPORT TizenRendererImpl void SetPlayerMediaGeometry(); void OnWebViewMoved(); #endif + content::WebContents* GetWebContents() const; media::RendererClient* client_ = nullptr; -- 2.7.4 From a56241367d404629ffdf0e174d0899202b1b2ecc Mon Sep 17 00:00:00 2001 From: YongGeol Jung Date: Mon, 19 Feb 2024 20:22:12 -0800 Subject: [PATCH 04/16] Fix buildbreak that occurs when boost lib dependency is removed from wgt module Due to modification of wgt-manifest-handlers module, the header file related to |usleep| was removed. Modified to directly include the relevant header file. ../wrt/src/common/app_db.cc -o obj/wrt/wrt_lib/app_db.o [ 3577s] ../wrt/src/common/app_db.cc:91:28: error: use of undeclared identifier 'usleep' [ 3577s] usleep(100000 * (count + 1)); [ 3577s] ^ [ 3577s] 1 error generated. Change-Id: I0ce50874548dbb5c467366f5614761b101212b2d Signed-off-by: YongGeol Jung --- wrt/src/common/app_db.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/wrt/src/common/app_db.cc b/wrt/src/common/app_db.cc index aad96e1..ff4db31 100755 --- a/wrt/src/common/app_db.cc +++ b/wrt/src/common/app_db.cc @@ -20,6 +20,7 @@ #include #include #include +#include #include "base/logging.h" #include "wrt/src/base/file_utils.h" -- 2.7.4 From 4cc1e080084a91613cbdf108a16a88b7f4cc9772 Mon Sep 17 00:00:00 2001 From: Manjeet Date: Wed, 7 Feb 2024 14:40:19 +0530 Subject: [PATCH 05/16] [M120 Migration] Fix SVACE major issues. Reference: https://review.tizen.org/gerrit/#/c/290723/ Change-Id: Ic39fb19057f0dd8d44bfcd104991e9b59b3aa1c4 Signed-off-by: Manjeet --- tizen_src/ewk/efl_integration/eweb_context.cc | 3 ++- tizen_src/ewk/efl_integration/public/ewk_view.cc | 15 +++++++++++++++ .../renderer/plugins/plugin_placeholder_hole.cc | 20 +++++++++++--------- .../ewk/efl_integration/web_contents_delegate_efl.cc | 10 +++++----- 4 files changed, 33 insertions(+), 15 deletions(-) diff --git a/tizen_src/ewk/efl_integration/eweb_context.cc b/tizen_src/ewk/efl_integration/eweb_context.cc index 5cbfee1..9da8a8c 100644 --- a/tizen_src/ewk/efl_integration/eweb_context.cc +++ b/tizen_src/ewk/efl_integration/eweb_context.cc @@ -416,7 +416,8 @@ EWebContext::~EWebContext() { auto cbce = static_cast(cbc); cbce->SetBrowserContext(browser_context_.release()); #endif - cookieManager()->EWebContextShutDown(); + if (cookieManager()) + cookieManager()->EWebContextShutDown(); } void EWebContext::ClearNetworkCache() { diff --git a/tizen_src/ewk/efl_integration/public/ewk_view.cc b/tizen_src/ewk/efl_integration/public/ewk_view.cc index e8e9f23..5b1d807 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_view.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_view.cc @@ -600,21 +600,36 @@ Eina_Bool ewk_view_web_application_capable_get(Evas_Object* ewkView, Ewk_Web_App { EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE); +#if !defined(EWK_BRINGUP) // FIXME::M94 Bringup IPC to MOJO conversion in + // WebAppCapableGet return impl->WebAppCapableGet(callback, userData) ? EINA_TRUE : EINA_FALSE; +#else + return EINA_FALSE; +#endif } Eina_Bool ewk_view_web_application_icon_url_get(Evas_Object* ewkView, Ewk_Web_App_Icon_URL_Get_Callback callback, void* userData) { EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE); +#if !defined(EWK_BRINGUP) // FIXME::M94 Bringup IPC to MOJO conversion in + // WebAppIconUrlGet return impl->WebAppIconUrlGet(callback, userData) ? EINA_TRUE : EINA_FALSE; +#else + return EINA_FALSE; +#endif } Eina_Bool ewk_view_web_application_icon_urls_get(Evas_Object* ewkView, Ewk_Web_App_Icon_URLs_Get_Callback callback, void* userData) { EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE); +#if !defined(EWK_BRINGUP) // FIXME::M94 Bringup IPC to MOJO conversion in + // WebAppIconUrlsGet return impl->WebAppIconUrlsGet(callback, userData) ? EINA_TRUE : EINA_FALSE; +#else + return EINA_FALSE; +#endif } Eina_Bool ewk_view_command_execute(Evas_Object* view, const char* command, const char* value) diff --git a/tizen_src/ewk/efl_integration/renderer/plugins/plugin_placeholder_hole.cc b/tizen_src/ewk/efl_integration/renderer/plugins/plugin_placeholder_hole.cc index 2dfc07e..a13d00e 100644 --- a/tizen_src/ewk/efl_integration/renderer/plugins/plugin_placeholder_hole.cc +++ b/tizen_src/ewk/efl_integration/renderer/plugins/plugin_placeholder_hole.cc @@ -322,15 +322,17 @@ void PluginPlaceholderHole::OnUnobscuredRectUpdate( should_notify = true; } - gfx::Point position_in_root_frame = - plugin()->Container()->LocalToRootFramePoint(unobscured_rect.origin()); - - if (local_position_in_root_frame_ != position_in_root_frame) { - LOG(INFO) << "PluginPlaceholderHole: position changed!!! before:" - << local_position_in_root_frame_.ToString() - << " after:" << position_in_root_frame.ToString(); - local_position_in_root_frame_ = position_in_root_frame; - should_notify = true; + if (plugin() && plugin()->Container()) { + gfx::Point position_in_root_frame = + plugin()->Container()->LocalToRootFramePoint(unobscured_rect.origin()); + + if (local_position_in_root_frame_ != position_in_root_frame) { + LOG(INFO) << "PluginPlaceholderHole: position changed!!! before:" + << local_position_in_root_frame_.ToString() + << " after:" << position_in_root_frame.ToString(); + local_position_in_root_frame_ = position_in_root_frame; + should_notify = true; + } } if (!should_notify) diff --git a/tizen_src/ewk/efl_integration/web_contents_delegate_efl.cc b/tizen_src/ewk/efl_integration/web_contents_delegate_efl.cc index 7dc345e..24af37f 100644 --- a/tizen_src/ewk/efl_integration/web_contents_delegate_efl.cc +++ b/tizen_src/ewk/efl_integration/web_contents_delegate_efl.cc @@ -230,11 +230,11 @@ void WebContentsDelegateEfl::NavigationStateChanged( web_view_->ResetContextMenuController(); auto rwhva = static_cast( web_contents_.GetRenderWidgetHostView()); - if (rwhva && rwhva->offscreen_helper() && - rwhva->offscreen_helper()->GetSelectionController()) { - auto selection_controller = - rwhva->offscreen_helper()->GetSelectionController(); - selection_controller->ClearSelection(); + if (rwhva && rwhva->offscreen_helper()) { + if (auto selection_controller = + rwhva->offscreen_helper()->GetSelectionController()) { + selection_controller->ClearSelection(); + } } } } -- 2.7.4 From e3c5166be169d2eb043521c34894583333f2a005 Mon Sep 17 00:00:00 2001 From: Gajendra N Date: Tue, 20 Feb 2024 10:38:44 +0530 Subject: [PATCH 06/16] Cleanup web_view_evas_handler and related code This part of the code is no longer used since post aura, hence removing. Change-Id: I857d5f588d0452dac3008c5bf0e1c2459fff7386 Signed-off-by: Gajendra N --- .../browser/renderer_host/evas_event_handler.h | 32 ------ tizen_src/ewk/efl_integration/BUILD.gn | 2 - .../browser/web_view_evas_handler.cc | 110 --------------------- .../browser/web_view_evas_handler.h | 32 ------ tizen_src/ewk/efl_integration/eweb_view.cc | 3 - tizen_src/ewk/efl_integration/eweb_view.h | 2 - .../private/webview_delegate_ewk.cc | 94 ------------------ .../efl_integration/private/webview_delegate_ewk.h | 9 -- 8 files changed, 284 deletions(-) delete mode 100644 tizen_src/chromium_impl/content/browser/renderer_host/evas_event_handler.h delete mode 100644 tizen_src/ewk/efl_integration/browser/web_view_evas_handler.cc delete mode 100644 tizen_src/ewk/efl_integration/browser/web_view_evas_handler.h diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/evas_event_handler.h b/tizen_src/chromium_impl/content/browser/renderer_host/evas_event_handler.h deleted file mode 100644 index 8acf5eb..0000000 --- a/tizen_src/chromium_impl/content/browser/renderer_host/evas_event_handler.h +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2015 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 EVAS_EVENT_HANDLER_H -#define EVAS_EVENT_HANDLER_H - -#include "base/memory/ref_counted.h" - -#include - -namespace content { - -class EvasEventHandler: public base::RefCountedThreadSafe { - public: - virtual ~EvasEventHandler() {} - - virtual bool HandleEvent_FocusIn() { return false; } - virtual bool HandleEvent_FocusOut() { return false; } - virtual bool HandleEvent_KeyUp (const Evas_Event_Key_Up*) { return false; } - virtual bool HandleEvent_KeyDown (const Evas_Event_Key_Down*) { return false; } - virtual bool HandleEvent_MouseDown (const Evas_Event_Mouse_Down*) { return false; } - virtual bool HandleEvent_MouseUp (const Evas_Event_Mouse_Up*) { return false; } - virtual bool HandleEvent_MouseMove (const Evas_Event_Mouse_Move*) { return false; } - virtual bool HandleEvent_MouseWheel (const Evas_Event_Mouse_Wheel*) { return false; } - virtual bool HandleEvent_HWBack() { return false; } - -}; - -} // namespace content - -#endif // EVAS_EVENT_HANDLER_H diff --git a/tizen_src/ewk/efl_integration/BUILD.gn b/tizen_src/ewk/efl_integration/BUILD.gn index 5ff84f0..f374a0d 100644 --- a/tizen_src/ewk/efl_integration/BUILD.gn +++ b/tizen_src/ewk/efl_integration/BUILD.gn @@ -362,8 +362,6 @@ shared_library("chromium-ewk") { "browser/vibration/vibration_provider_client.h", "browser/web_cache_efl/web_cache_manager_efl.cc", "browser/web_cache_efl/web_cache_manager_efl.h", - "browser/web_view_evas_handler.cc", - "browser/web_view_evas_handler.h", "browser/webdata/web_data_service.cc", "browser/webdata/web_data_service.h", "browser/webdata/web_data_service_factory.cc", diff --git a/tizen_src/ewk/efl_integration/browser/web_view_evas_handler.cc b/tizen_src/ewk/efl_integration/browser/web_view_evas_handler.cc deleted file mode 100644 index 3312ec2..0000000 --- a/tizen_src/ewk/efl_integration/browser/web_view_evas_handler.cc +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) 2014 The Chromium Authors. All rights reserved. -// Copyright 2014 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 "browser/web_view_evas_handler.h" - -#include "private/webview_delegate_ewk.h" - -#include "eweb_view.h" -#include "tizen/system_info.h" - -using content::SelectionControllerEfl; - -namespace { - -inline bool IsHardwareBackKey(const Evas_Event_Key_Up* event) { -#if BUILDFLAG(IS_TIZEN) - return (strcmp(event->key, "XF86Back") == 0 || - strcmp(event->key, "XF86Stop") == 0); -#else - return (strcmp(event->key, "Escape") == 0); -#endif -} - -} - -WebViewEvasEventHandler::WebViewEvasEventHandler(EWebView* wv) - : webview_ (wv) { -} - -bool WebViewEvasEventHandler::HandleEvent_FocusIn() { - return WebViewDelegateEwk::GetInstance(). - RequestHandleEvent_FocusIn(webview_); -} - -bool WebViewEvasEventHandler::HandleEvent_FocusOut() { - return WebViewDelegateEwk::GetInstance(). - RequestHandleEvent_FocusOut(webview_); -} - -bool WebViewEvasEventHandler::HandleEvent_KeyDown( - const Evas_Event_Key_Down* event_info) { - return WebViewDelegateEwk::GetInstance(). - RequestHandleEvent_KeyDown(webview_, event_info); -} - -bool WebViewEvasEventHandler::HandleEvent_KeyUp( - const Evas_Event_Key_Up* event_info) { - bool handled = WebViewDelegateEwk::GetInstance(). - RequestHandleEvent_KeyUp(webview_, event_info); - -#if BUILDFLAG(IS_TIZEN) - return handled; -#endif - - if (handled) - return true; - - if (IsHardwareBackKey(event_info)) - return HandleEvent_HWBack(); - - return false; -} - -bool WebViewEvasEventHandler::HandleEvent_MouseDown( - const Evas_Event_Mouse_Down* event_info) { - return WebViewDelegateEwk::GetInstance(). - RequestHandleEvent_MouseDown(webview_, event_info); -} - -bool WebViewEvasEventHandler::HandleEvent_MouseUp( - const Evas_Event_Mouse_Up* event_info) { - return WebViewDelegateEwk::GetInstance(). - RequestHandleEvent_MouseUp(webview_, event_info); -} - -bool WebViewEvasEventHandler::HandleEvent_MouseMove( - const Evas_Event_Mouse_Move* event_info) { - return WebViewDelegateEwk::GetInstance(). - RequestHandleEvent_MouseMove(webview_, event_info); -} - -bool WebViewEvasEventHandler::HandleEvent_MouseWheel( - const Evas_Event_Mouse_Wheel* event_info) { - return WebViewDelegateEwk::GetInstance(). - RequestHandleEvent_MouseWheel(webview_, event_info); -} - -bool WebViewEvasEventHandler::HandleEvent_HWBack() { - if (webview_->GetContextMenuController()) { - webview_->ResetContextMenuController(); - if (webview_->GetSelectionController()->IsAnyHandleVisible()) - webview_->GetSelectionController()->ClearSelectionViaEWebView(); - return true; - } - - if (webview_->IsFullscreen()) { - webview_->ExitFullscreen(); - return true; - } - - if (IsMobileProfile() || IsWearableProfile()) { - // Tell the embedding APP to handle BACK HW. - webview_->SmartCallback().call(); - return true; - } - - return false; -} diff --git a/tizen_src/ewk/efl_integration/browser/web_view_evas_handler.h b/tizen_src/ewk/efl_integration/browser/web_view_evas_handler.h deleted file mode 100644 index a08b220..0000000 --- a/tizen_src/ewk/efl_integration/browser/web_view_evas_handler.h +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2014 The Chromium Authors. All rights reserved. -// Copyright 2014 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 TIZEN_WEBVIEW_EVENT_TW_WEBVIEW_EVAS_EVENT_HANDLER_H_ -#define TIZEN_WEBVIEW_EVENT_TW_WEBVIEW_EVAS_EVENT_HANDLER_H_ - -#include "content/browser/renderer_host/evas_event_handler.h" - -class EWebView; - -class WebViewEvasEventHandler: public content::EvasEventHandler { - public: - explicit WebViewEvasEventHandler(EWebView*); - - // ---- event handlers - bool HandleEvent_FocusIn() override; - bool HandleEvent_FocusOut() override; - bool HandleEvent_KeyDown (const Evas_Event_Key_Down*) override; - bool HandleEvent_KeyUp (const Evas_Event_Key_Up*) override; - bool HandleEvent_MouseDown (const Evas_Event_Mouse_Down*) override; - bool HandleEvent_MouseUp (const Evas_Event_Mouse_Up*) override; - bool HandleEvent_MouseMove (const Evas_Event_Mouse_Move*) override; - bool HandleEvent_MouseWheel(const Evas_Event_Mouse_Wheel*) override; - bool HandleEvent_HWBack() override; - - private: - EWebView* webview_; -}; - -#endif // TIZEN_WEBVIEW_PUBLIC_TW_WEBVIEW_EVAS_EVENT_HANDLER_H_ diff --git a/tizen_src/ewk/efl_integration/eweb_view.cc b/tizen_src/ewk/efl_integration/eweb_view.cc index ef449a7..2124d99 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.cc +++ b/tizen_src/ewk/efl_integration/eweb_view.cc @@ -25,7 +25,6 @@ #include "browser/select_picker/select_picker_mobile.h" #include "browser/select_picker/select_picker_tv.h" #include "browser/web_view_browser_message_filter.h" -#include "browser/web_view_evas_handler.h" #include "browser_context_efl.h" #include "common/content_client_efl.h" #include "common/render_messages_ewk.h" @@ -388,8 +387,6 @@ void EWebView::Initialize() { InitializeContent(); - evas_event_handler_ = new WebViewEvasEventHandler(this); - scroll_detector_.reset(new ScrollDetector(this)); #if defined(TIZEN_PEPPER_EXTENSIONS) diff --git a/tizen_src/ewk/efl_integration/eweb_view.h b/tizen_src/ewk/efl_integration/eweb_view.h index f71549e..7d9f4f8 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.h +++ b/tizen_src/ewk/efl_integration/eweb_view.h @@ -84,7 +84,6 @@ class _Ewk_App_Control; class _Ewk_Policy_Decision; class _Ewk_Hit_Test; class Ewk_Context; -class WebViewEvasEventHandler; class _Ewk_Quota_Permission_Request; #if defined(TIZEN_ATK_SUPPORT) @@ -819,7 +818,6 @@ class EWebView { static Eina_Bool DelayedPopulateAndShowContextMenu(void* data); - scoped_refptr evas_event_handler_; scoped_refptr context_; std::unique_ptr web_contents_; std::unique_ptr web_contents_delegate_; diff --git a/tizen_src/ewk/efl_integration/private/webview_delegate_ewk.cc b/tizen_src/ewk/efl_integration/private/webview_delegate_ewk.cc index 0ced3c7..9aa120e 100644 --- a/tizen_src/ewk/efl_integration/private/webview_delegate_ewk.cc +++ b/tizen_src/ewk/efl_integration/private/webview_delegate_ewk.cc @@ -46,100 +46,6 @@ Eina_Rectangle WebViewDelegateEwk::GetLastUsedViewPortArea( return result; } -bool WebViewDelegateEwk::RequestHandleEvent_FocusIn(EWebView* wv) const { - Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromEvasObject(wv->ewk_view()); - if (sd && sd->api && sd->api->focus_in) { - // XXX: is it what we want, or do we want to return false if api->focus_in - // returns false? - sd->api->focus_in(sd); - return true; - } - return false; -} - -bool WebViewDelegateEwk::RequestHandleEvent_FocusOut(EWebView* wv) const { - Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromEvasObject(wv->ewk_view()); - if (sd && sd->api && sd->api->focus_out) { - // XXX: is it what we want, or do we want to return false if api->focus_out - // returns false? - sd->api->focus_out(sd); - return true; - } - return false; -} - -bool WebViewDelegateEwk::RequestHandleEvent_MouseUp(EWebView* wv, - const Evas_Event_Mouse_Up* event_info) const { - Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromEvasObject(wv->ewk_view()); - if (sd && sd->api && sd->api->mouse_up) { - // XXX: is it what we want, or do we want to return false if api->mouse_up - // returns false? - sd->api->mouse_up(sd, event_info); - return true; - } - return false; -} - -bool WebViewDelegateEwk::RequestHandleEvent_MouseDown(EWebView* wv, - const Evas_Event_Mouse_Down* event_info) const { - Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromEvasObject(wv->ewk_view()); - if (sd && sd->api && sd->api->mouse_down) { - // XXX: is it what we want, or do we want to return false if api->mouse_down - // returns false? - sd->api->mouse_down(sd, event_info); - return true; - } - return false; -} - -bool WebViewDelegateEwk::RequestHandleEvent_MouseMove(EWebView* wv, - const Evas_Event_Mouse_Move* event_info) const { - Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromEvasObject(wv->ewk_view()); - if (sd && sd->api && sd->api->mouse_move) { - // XXX: is it what we want, or do we want to return false if api->mouse_move - // returns false? - sd->api->mouse_move(sd, event_info); - return true; - } - return false; -} - -bool WebViewDelegateEwk::RequestHandleEvent_MouseWheel(EWebView* wv, - const Evas_Event_Mouse_Wheel* event_info) const { - Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromEvasObject(wv->ewk_view()); - if (sd && sd->api && sd->api->mouse_wheel) { - // XXX: is it what we want, or do we want to return false if api->mouse_wheel - // returns false? - sd->api->mouse_wheel(sd, event_info); - return true; - } - return false; -} - -bool WebViewDelegateEwk::RequestHandleEvent_KeyUp(EWebView* wv, - const Evas_Event_Key_Up* event_info) const { - Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromEvasObject(wv->ewk_view()); - if (sd && sd->api && sd->api->key_up) { - // XXX: is it what we want, or do we want to return false if api->key_up - // returns false? - sd->api->key_up(sd, event_info); - return true; - } - return false; -} - -bool WebViewDelegateEwk::RequestHandleEvent_KeyDown(EWebView* wv, - const Evas_Event_Key_Down* event_info) const { - Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromEvasObject(wv->ewk_view()); - if (sd && sd->api && sd->api->key_down) { - // XXX: is it what we want, or do we want to return false if api->key_down - // returns false? - sd->api->key_down(sd, event_info); - return true; - } - return false; -} - void WebViewDelegateEwk::RequestHandleOrientationLock(EWebView* wv, int orientation) const { Ewk_View_Smart_Data* sd = GetEwkViewSmartDataFromEvasObject(wv->ewk_view()); diff --git a/tizen_src/ewk/efl_integration/private/webview_delegate_ewk.h b/tizen_src/ewk/efl_integration/private/webview_delegate_ewk.h index 0f4de1c..f9b622f 100644 --- a/tizen_src/ewk/efl_integration/private/webview_delegate_ewk.h +++ b/tizen_src/ewk/efl_integration/private/webview_delegate_ewk.h @@ -17,15 +17,6 @@ struct WebViewDelegateEwk { Evas_Object_Smart_Clipped_Data* GetSmartClippedData(Evas_Object* evas_object); Eina_Rectangle GetLastUsedViewPortArea(Evas_Object* evas_object) const; - // Event handlers - bool RequestHandleEvent_FocusIn(EWebView* wv) const; - bool RequestHandleEvent_FocusOut(EWebView* wv) const; - bool RequestHandleEvent_MouseUp(EWebView* wv, const Evas_Event_Mouse_Up* event_info) const; - bool RequestHandleEvent_MouseDown(EWebView* wv, const Evas_Event_Mouse_Down* event_info) const; - bool RequestHandleEvent_MouseMove(EWebView* wv, const Evas_Event_Mouse_Move* event_info) const; - bool RequestHandleEvent_MouseWheel(EWebView* wv, const Evas_Event_Mouse_Wheel* event_info) const; - bool RequestHandleEvent_KeyUp(EWebView* wv, const Evas_Event_Key_Up* event_info) const; - bool RequestHandleEvent_KeyDown(EWebView* wv, const Evas_Event_Key_Down* event_info) const; void RequestHandleOrientationLock(EWebView* wv, int orientation) const; void RequestHandleOrientationUnlock(EWebView* wv) const; private: -- 2.7.4 From f3a7b046812bcab93b723e3ee5530bc144aa2273 Mon Sep 17 00:00:00 2001 From: Manjeet Date: Tue, 6 Feb 2024 11:40:48 +0530 Subject: [PATCH 07/16] Cleanup dead code which is no longer needed or used. Reference: https://review.tizen.org/gerrit/#/c/290702 Change-Id: I033b9f6179f866d4ea07e9270fcd12c3de3ef411 Signed-off-by: Manjeet --- chrome/test/chromedriver/BUILD.gn | 8 - content/shell/BUILD.gn | 23 +- .../chromium_impl/chrome/chrome_tests_efl.gni | 12 - tizen_src/chromium_impl/content/content_efl.gni | 15 -- .../content/shell/browser/shell_efl.cc | 233 ------------------ .../content/shell/browser/shell_main_efl.cc | 22 -- .../shell/browser/shell_platform_delegate_efl.cc | 58 ----- .../shell_web_contents_view_delegate_efl.cc | 165 ------------- .../chromium_impl/content/shell/shell_efl.gni | 41 ---- .../device/battery/battery_status_manager_tizen.cc | 267 --------------------- .../device/battery/battery_status_manager_tizen.h | 42 ---- tizen_src/chromium_impl/device/battery_tizen.gni | 15 -- tizen_src/ewk/efl_integration/eweb_view.cc | 18 -- tizen_src/ewk/efl_integration/eweb_view.h | 2 - 14 files changed, 1 insertion(+), 920 deletions(-) delete mode 100644 tizen_src/chromium_impl/chrome/chrome_tests_efl.gni delete mode 100644 tizen_src/chromium_impl/content/shell/browser/shell_efl.cc delete mode 100644 tizen_src/chromium_impl/content/shell/browser/shell_main_efl.cc delete mode 100644 tizen_src/chromium_impl/content/shell/browser/shell_platform_delegate_efl.cc delete mode 100644 tizen_src/chromium_impl/content/shell/browser/shell_web_contents_view_delegate_efl.cc delete mode 100644 tizen_src/chromium_impl/content/shell/shell_efl.gni delete mode 100644 tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.cc delete mode 100644 tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.h delete mode 100644 tizen_src/chromium_impl/device/battery_tizen.gni diff --git a/chrome/test/chromedriver/BUILD.gn b/chrome/test/chromedriver/BUILD.gn index ab21244d..0874c54 100644 --- a/chrome/test/chromedriver/BUILD.gn +++ b/chrome/test/chromedriver/BUILD.gn @@ -12,10 +12,6 @@ import("//build/util/lastchange.gni") import("//testing/test.gni") import("//third_party/ffmpeg/ffmpeg_options.gni") -if (use_efl) { - import("//tizen_src/chromium_impl/chrome/chrome_tests_efl.gni") -} - declare_args() { # Make macOS request permissions for the chrome binary instead of its parent # process (usually the Terminmal.app). @@ -401,10 +397,6 @@ source_set("lib") { deps += [ ":buildflags" ] frameworks = [ "Carbon.framework" ] } - - if (use_efl) { - sources -= external_exclude_chrome_test_driver_sources - } } if (is_linux) { diff --git a/content/shell/BUILD.gn b/content/shell/BUILD.gn index bb0d245..84c03ae 100644 --- a/content/shell/BUILD.gn +++ b/content/shell/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright 2014 The Chromium Authors +# Copyright 2014 The Chromium Author # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -34,9 +34,6 @@ if (is_android) { } else if (is_ios) { import("//build/config/ios/config.gni") } -if (use_efl && !use_aura) { - import("//tizen_src/chromium_impl/content/shell/shell_efl.gni") -} # TODO(crbug.com/1336055, spang): Investigate using shell_views with cast builds as # true. @@ -250,9 +247,6 @@ static_library("content_shell_lib") { ":content_shell_lib_warnings", "//build/config:precompiled_headers", ] - if (use_efl && !use_aura) { - configs += external_content_shell_efl_configs - } defines = [ "CONTENT_SHELL_VERSION=\"$content_shell_version\"", @@ -351,9 +345,6 @@ static_library("content_shell_lib") { "//components/crash/core/app", ] } - if (use_efl && !use_aura) { - deps += external_content_shell_efl_deps - } if (enable_plugins) { sources += [ @@ -462,10 +453,6 @@ static_library("content_shell_lib") { if (use_ozone) { deps += [ "//ui/ozone" ] } - - if (use_efl && !use_aura) { - sources += external_content_shell_lib_efl_sources - } } grit("content_shell_resources_grit") { @@ -708,14 +695,6 @@ if (is_android) { # Set rpath to find our own libfreetype even in a non-component build. configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] } - - if (use_efl && !use_aura) { - deps += external_content_shell_efl_deps - configs += external_content_shell_efl_configs - - sources += external_content_shell_efl_sources - sources -= external_exclude_content_shell_efl_sources - } } if (is_fuchsia) { diff --git a/tizen_src/chromium_impl/chrome/chrome_tests_efl.gni b/tizen_src/chromium_impl/chrome/chrome_tests_efl.gni deleted file mode 100644 index c21cc29..0000000 --- a/tizen_src/chromium_impl/chrome/chrome_tests_efl.gni +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) 2015 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. - -import("//tizen_src/build/config/tizen_features.gni") - -# For //chrome/test/chromedriver:lib target -# It seems that keycode_text_conversion_win.cc is not used in gn files so no need to exclude it. -external_exclude_chrome_test_driver_sources = [] #[ "test/chromedriver/keycode_text_conversion_win.cc" ] -if (use_wayland) { - #external_exclude_chrome_test_driver_sources += [ "test/chromedriver/keycode_text_conversion_x.cc" ] -} diff --git a/tizen_src/chromium_impl/content/content_efl.gni b/tizen_src/chromium_impl/content/content_efl.gni index 6294320..718dc7c 100644 --- a/tizen_src/chromium_impl/content/content_efl.gni +++ b/tizen_src/chromium_impl/content/content_efl.gni @@ -60,17 +60,6 @@ external_content_gpu_configs = [ "//tizen_src/build:libevas", ] -external_content_shell_configs = [ - "//tizen_src/build:evas", - "//tizen_src/build:libevas", - "//tizen_src/build:ecore-evas", - "//tizen_src/build:libecore-evas", - "//tizen_src/build:elementary", - "//tizen_src/build:libelementary", -] - -external_content_shell_deps = [ "//tizen_src/chromium_impl/efl:efl-init" ] - if (is_tizen) { external_content_browser_configs += [ "//tizen_src/build:vconf", @@ -85,11 +74,7 @@ if (!use_wayland) { external_content_browser_configs += [ "//tizen_src/build:libx11" ] external_content_browser_extra_configs += [ "//tizen_src/build:ecore-x" ] external_content_browser_extra_configs += [ "//tizen_src/build:libecore-x" ] - external_content_shell_configs += [ "//tizen_src/build:ecore-x" ] - external_content_shell_configs += [ "//tizen_src/build:libecore-x" ] } else { external_content_common_configs += [ "//tizen_src/build:ecore-wayland" ] external_content_common_configs += [ "//tizen_src/build:libecore-wayland" ] - external_content_shell_configs += [ "//tizen_src/build:ecore-wayland" ] - external_content_shell_configs += [ "//tizen_src/build:libecore-wayland" ] } diff --git a/tizen_src/chromium_impl/content/shell/browser/shell_efl.cc b/tizen_src/chromium_impl/content/shell/browser/shell_efl.cc deleted file mode 100644 index b3cf1f7..0000000 --- a/tizen_src/chromium_impl/content/shell/browser/shell_efl.cc +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright 2014 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/shell/browser/shell.h" - -#include -#include -#include - -#include "base/command_line.h" -#include "base/strings/utf_string_conversions.h" -#include "cc/base/switches.h" -#include "components/js_dialogs_efl/javascript_dialog_manager_efl.h" -#include "content/public/browser/render_view_host.h" -#include "content/public/browser/web_contents.h" -#include "content/public/common/content_switches.h" -#include "content/shell/common/shell_switches.h" -#include "content/web_test/browser/web_test_javascript_dialog_manager.h" -#include "efl/window_factory.h" -#include "ui/gl/gl_switches.h" - -namespace content { - -class Shell::Impl { - public: - Impl(Shell* shell, Evas_Object* window) - : url_bar_(NULL), - refresh_btn_(NULL), - stop_btn_(NULL), - back_btn_(NULL), - forward_btn_(NULL), - shell_(shell) { - Evas_Object* box = elm_box_add(window); - evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_win_resize_object_add(window, box); - evas_object_show(box); - - if (!switches::IsRunWebTestsSwitchPresent()) - CreateURLBar(box); - -#if !defined(USE_AURA) - Evas_Object* view = - static_cast(shell->web_contents()->GetNativeView()); - evas_object_size_hint_align_set(view, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_size_hint_weight_set(view, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_box_pack_end(box, view); -#endif - } - - void CreateURLBar(Evas_Object* box) { - Evas_Object* wrapper = elm_box_add(box); - elm_box_horizontal_set(wrapper, EINA_TRUE); - evas_object_size_hint_align_set(wrapper, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_size_hint_weight_set(wrapper, EVAS_HINT_EXPAND, 0.0f); - evas_object_show(wrapper); - - Evas_Object* button_box = elm_box_add(wrapper); - elm_box_horizontal_set(button_box, EINA_TRUE); - - Evas_Object* new_window_button = AddButton(button_box, "file", OnNewWindow); - back_btn_ = AddButton(button_box, "arrow_left", OnBack); - forward_btn_ = AddButton(button_box, "arrow_right", OnForward); - refresh_btn_ = AddButton(button_box, "refresh", OnRefresh); - stop_btn_ = AddButton(button_box, "close", OnStop); - -#if !BUILDFLAG(IS_TIZEN) - elm_object_text_set(new_window_button, "New Window"); - elm_object_text_set(back_btn_, "Back"); - elm_object_text_set(forward_btn_, "Forward"); - elm_object_text_set(refresh_btn_, "Refresh"); - elm_object_text_set(stop_btn_, "Stop"); -#else - (void)new_window_button; -#endif - - evas_object_show(button_box); - elm_box_pack_start(wrapper, button_box); - - url_bar_ = elm_entry_add(wrapper); - elm_entry_single_line_set(url_bar_, EINA_TRUE); - elm_entry_scrollable_set(url_bar_, EINA_TRUE); - evas_object_size_hint_align_set(url_bar_, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_size_hint_weight_set(url_bar_, EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - elm_entry_input_panel_layout_set(url_bar_, ELM_INPUT_PANEL_LAYOUT_URL); - evas_object_size_hint_weight_set(url_bar_, EVAS_HINT_EXPAND, 0.0f); - evas_object_size_hint_align_set(url_bar_, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_smart_callback_add(url_bar_, "activated", OnURLEntered, this); - elm_box_pack_end(wrapper, url_bar_); - evas_object_show(url_bar_); - - elm_box_pack_end(box, wrapper); - } - - Evas_Object* AddButton(Evas_Object* parent_box, - const char* icon_name, - Evas_Smart_Cb cb) { - Evas_Object* btn = elm_button_add(parent_box); - Evas_Object* icon = elm_icon_add(parent_box); - elm_icon_standard_set(icon, icon_name); - elm_object_part_content_set(btn, "icon", icon); - evas_object_smart_callback_add(btn, "clicked", cb, this); - elm_box_pack_end(parent_box, btn); - evas_object_show(btn); - return btn; - } - - void SetAddressBarURL(const char* url) { - if (url_bar_) - elm_object_text_set(url_bar_, url); - } - - void ToggleControl(ShellPlatformDelegate::UIControl control, - bool is_enabled) { - if (control == ShellPlatformDelegate::BACK_BUTTON && back_btn_) { - elm_object_disabled_set(back_btn_, !is_enabled); - } else if (control == ShellPlatformDelegate::FORWARD_BUTTON && - forward_btn_) { - elm_object_disabled_set(forward_btn_, !is_enabled); - } else if (control == ShellPlatformDelegate::STOP_BUTTON && stop_btn_) { - elm_object_disabled_set(stop_btn_, !is_enabled); - } - } - - private: - static void OnBack(void* data, Evas_Object*, void*) { - static_cast(data)->shell_->GoBackOrForward(-1); - } - - static void OnNewWindow(void* data, Evas_Object*, void*) { - Shell* shell = static_cast(data)->shell_; - gfx::Size initial_size = Shell::GetShellDefaultSize(); - Shell::CreateNewWindow(shell->web_contents()->GetBrowserContext(), - GURL("https://www.google.com"), nullptr, - initial_size); - } - - static void OnForward(void* data, Evas_Object*, void*) { - static_cast(data)->shell_->GoBackOrForward(1); - } - - static void OnRefresh(void* data, Evas_Object*, void*) { - static_cast(data)->shell_->Reload(); - } - - static void OnStop(void* data, Evas_Object*, void*) { - static_cast(data)->shell_->Stop(); - } - - static void OnURLEntered(void* data, Evas_Object* obj, void*) { - GURL url(elm_object_text_get(obj)); - if (!url.has_scheme()) { - url = GURL(std::string("http://") + elm_object_text_get(obj)); - elm_object_text_set(obj, url.spec().c_str()); - } - static_cast(data)->shell_->LoadURL(url); - } - - Evas_Object* url_bar_; - Evas_Object* refresh_btn_; - Evas_Object* stop_btn_; - Evas_Object* back_btn_; - Evas_Object* forward_btn_; - - Shell* shell_; -}; - -namespace { -void OnShellWindowDelRequest(void* data, Evas_Object*, void*) { - Shell* shell = static_cast(data); - shell->Close(); -} -} - -#if !defined(EWK_BRINGUP) // FIXME: m85 bringup -// static -void Shell::PlatformInitialize(const gfx::Size& default_window_size) { - elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); - LOG(INFO) << "EFL Shell platform initialized"; -} - -void Shell::PlatformExit() { - LOG(INFO) << "EFL Shell platform exit"; -} - -void Shell::PlatformCleanUp() {} - -void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) { - impl_->ToggleControl(control, is_enabled); -} - -void Shell::PlatformSetAddressBarURL(const GURL& url) { - impl_->SetAddressBarURL(url.spec().c_str()); -} - -void Shell::PlatformSetIsLoading(bool loading) {} - -void Shell::PlatformCreateWindow(int width, int height) {} - -void Shell::PlatformSetContents() { - Evas_Object* win = efl::WindowFactory::GetHostWindow(web_contents_.get()); - evas_object_smart_callback_add(win, "delete,request", OnShellWindowDelRequest, - this); - gfx::Size initial_size = Shell::GetShellDefaultSize(); - evas_object_resize(win, initial_size.width(), initial_size.height()); - evas_object_show(win); - window_ = win; - impl_ = new Impl(this, static_cast(window_)); -} - -void Shell::PlatformResizeSubViews() {} - -void Shell::PlatformSetTitle(const std::u16string& title) { - elm_win_title_set(static_cast(window_), - base::UTF16ToUTF8(title).c_str()); -} -#endif - -JavaScriptDialogManager* Shell::GetJavaScriptDialogManager( - WebContents* source) { - if (!dialog_manager_) { - if (switches::IsRunWebTestsSwitchPresent()) { - dialog_manager_.reset(new WebTestJavaScriptDialogManager); - } else { - dialog_manager_.reset(new JavaScriptDialogManagerEfl); - } - } - return dialog_manager_.get(); -} - -} // namespace content diff --git a/tizen_src/chromium_impl/content/shell/browser/shell_main_efl.cc b/tizen_src/chromium_impl/content/shell/browser/shell_main_efl.cc deleted file mode 100644 index bd3355c..0000000 --- a/tizen_src/chromium_impl/content/shell/browser/shell_main_efl.cc +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. 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/public/app/content_main.h" - -#include "base/at_exit.h" -#include "content/shell/app/shell_main_delegate.h" -#include "efl/init.h" - -int main(int argc, const char* argv[]) { - base::AtExitManager at_exit; - if (efl::Initialize(argc, argv)) - return 1; - - content::ShellMainDelegate delegate; - - content::ContentMainParams prams(&delegate); - prams.argc = argc; - prams.argv = argv; - return content::ContentMain(prams); -} diff --git a/tizen_src/chromium_impl/content/shell/browser/shell_platform_delegate_efl.cc b/tizen_src/chromium_impl/content/shell/browser/shell_platform_delegate_efl.cc deleted file mode 100644 index d5a5edc..0000000 --- a/tizen_src/chromium_impl/content/shell/browser/shell_platform_delegate_efl.cc +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2020 Samsung Electronics Inc. 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/shell/browser/shell_platform_delegate.h" - -#include "content/public/browser/render_widget_host_view.h" -#include "content/public/browser/web_contents.h" -#include "content/shell/browser/shell.h" - -namespace content { - -struct ShellPlatformDelegate::ShellData { - gfx::NativeWindow window; -}; - -struct ShellPlatformDelegate::PlatformData {}; - -ShellPlatformDelegate::ShellPlatformDelegate() = default; -ShellPlatformDelegate::~ShellPlatformDelegate() = default; - -void ShellPlatformDelegate::Initialize(const gfx::Size& default_window_size) { - platform_ = std::make_unique(); -} - -void ShellPlatformDelegate::CreatePlatformWindow( - Shell* shell, - const gfx::Size& initial_size) {} - -gfx::NativeWindow ShellPlatformDelegate::GetNativeWindow(Shell* shell) { - return gfx::NativeWindow(); -} - -void ShellPlatformDelegate::CleanUp(Shell* shell) {} - -void ShellPlatformDelegate::SetContents(Shell* shell) {} - -void ShellPlatformDelegate::ResizeWebContent(Shell* shell, - const gfx::Size& content_size) {} - -void ShellPlatformDelegate::EnableUIControl(Shell* shell, - UIControl control, - bool is_enabled) {} - -void ShellPlatformDelegate::SetAddressBarURL(Shell* shell, const GURL& url) {} - -void ShellPlatformDelegate::SetIsLoading(Shell* shell, bool loading) {} - -void ShellPlatformDelegate::SetTitle(Shell* shell, - const std::u16string& title) {} - -void ShellPlatformDelegate::MainFrameCreated(Shell* shell) {} - -bool ShellPlatformDelegate::DestroyShell(Shell* shell) { - return false; -} - -} // namespace content diff --git a/tizen_src/chromium_impl/content/shell/browser/shell_web_contents_view_delegate_efl.cc b/tizen_src/chromium_impl/content/shell/browser/shell_web_contents_view_delegate_efl.cc deleted file mode 100644 index 1489c8d..0000000 --- a/tizen_src/chromium_impl/content/shell/browser/shell_web_contents_view_delegate_efl.cc +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Copyright 2014 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/shell/browser/shell_web_contents_view_delegate.h" - -#include -#include - -#include "base/command_line.h" -#include "content/public/browser/render_view_host.h" -#include "content/shell/browser/shell.h" -#include "content/shell/browser/shell_browser_context.h" -#include "content/shell/browser/shell_content_browser_client.h" -#include "content/shell/browser/shell_devtools_frontend.h" -#include "content/shell/common/shell_switches.h" -#include "third_party/blink/public/common/context_menu_data/context_menu_data.h" -#include "third_party/blink/public/common/context_menu_data/edit_flags.h" - -using blink::ContextMenuDataEditFlags; - -namespace content { - -namespace { - -static Evas_Object* g_context_menu = NULL; - -void OpenInNewWindow(void* data, Evas_Object*, void*) { - const ContextMenuParams* params = static_cast(data); - ShellBrowserContext* browser_context = - ShellContentBrowserClient::Get()->browser_context(); - Shell::CreateNewWindow(browser_context, params->link_url, nullptr, - gfx::Size()); -} - -void StartDragging(void* data, Evas_Object*, void*) { - WebContents* wc = static_cast(data); - RenderViewHost* rvh = wc->GetRenderViewHost(); -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup - rvh->StartDragging(); -#endif -} - -void Cut(void* data, Evas_Object*, void*) { - WebContents* wc = static_cast(data); - wc->Cut(); -} - -void Copy(void* data, Evas_Object*, void*) { - WebContents* wc = static_cast(data); - wc->Copy(); -} - -void Paste(void* data, Evas_Object*, void*) { - WebContents* wc = static_cast(data); - wc->Paste(); -} - -void Delete(void* data, Evas_Object*, void*) { - WebContents* wc = static_cast(data); - wc->Delete(); -} - -void Forward(void* data, Evas_Object*, void*) { - WebContents* wc = static_cast(data); - wc->GetController().GoToOffset(1); - wc->Focus(); -} - -void Back(void* data, Evas_Object*, void*) { - WebContents* wc = static_cast(data); - wc->GetController().GoToOffset(-1); - wc->Focus(); -} - -void Reload(void* data, Evas_Object*, void*) { - WebContents* wc = static_cast(data); - wc->GetController().Reload(content::ReloadType::NORMAL, false); - wc->Focus(); -} -} - -WebContentsViewDelegate* CreateShellWebContentsViewDelegate( - WebContents* web_contents) { - return new ShellWebContentsViewDelegate(web_contents); -} - -ShellWebContentsViewDelegate::ShellWebContentsViewDelegate( - WebContents* web_contents) - : web_contents_(web_contents) {} - -ShellWebContentsViewDelegate::~ShellWebContentsViewDelegate() {} - -void ShellWebContentsViewDelegate::ShowContextMenu( - RenderFrameHost* render_frame_host, - const ContextMenuParams& params) { -#if !defined(USE_AURA) - if (switches::IsRunWebTestsSwitchPresent()) - return; - - if (g_context_menu) { - elm_menu_close(g_context_menu); - evas_object_del(g_context_menu); - } - - params_ = params; - - bool has_link = !params.unfiltered_link_url.is_empty(); - Evas_Object* parent = - static_cast(web_contents_->GetContentNativeView()); - - Evas_Object* menu = elm_menu_add(parent); - Elm_Object_Item* menu_it = NULL; - - if (has_link) { - elm_menu_item_add(menu, NULL, NULL, "Open in new window", OpenInNewWindow, - ¶ms_); - elm_menu_item_separator_add(menu, NULL); - } - -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup - if (params.is_draggable) { - elm_menu_item_add(menu, NULL, NULL, "Start dragging", StartDragging, - web_contents_); - } -#endif - - if (params_.is_editable) { - menu_it = elm_menu_item_add(menu, NULL, NULL, "Cut", Cut, web_contents_); - elm_object_item_disabled_set( - menu_it, (params_.edit_flags & ContextMenuDataEditFlags::kCanCut) == 0); - menu_it = elm_menu_item_add(menu, NULL, NULL, "Copy", Copy, web_contents_); - elm_object_item_disabled_set( - menu_it, - (params_.edit_flags & ContextMenuDataEditFlags::kCanCopy) == 0); - menu_it = - elm_menu_item_add(menu, NULL, NULL, "Paste", Paste, web_contents_); - elm_object_item_disabled_set( - menu_it, - (params_.edit_flags & ContextMenuDataEditFlags::kCanPaste) == 0); - menu_it = elm_menu_item_add(menu, NULL, "delete", "Delete", Delete, - web_contents_); - elm_object_item_disabled_set( - menu_it, - (params_.edit_flags & ContextMenuDataEditFlags::kCanDelete) == 0); - elm_menu_item_separator_add(menu, NULL); - } - - menu_it = elm_menu_item_add(menu, NULL, "back", "Back", Back, web_contents_); - elm_object_item_disabled_set(menu_it, - !web_contents_->GetController().CanGoBack()); - menu_it = elm_menu_item_add(menu, NULL, "forward", "Forward", Forward, - web_contents_); - elm_object_item_disabled_set(menu_it, - !web_contents_->GetController().CanGoForward()); - elm_menu_item_add(menu, NULL, "reload", "Reload", Reload, web_contents_); - - g_context_menu = menu; - elm_menu_move(menu, params.x, params.y); - evas_object_show(menu); -#endif -} - -} // namespace content diff --git a/tizen_src/chromium_impl/content/shell/shell_efl.gni b/tizen_src/chromium_impl/content/shell/shell_efl.gni deleted file mode 100644 index 69a38fb..0000000 --- a/tizen_src/chromium_impl/content/shell/shell_efl.gni +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) 2015 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. - -import("//tizen_src/build/config/tizen_features.gni") -import("//tizen_src/chromium_impl/components/components.gni") - -external_content_shell_efl_configs = [ - "//tizen_src/build:evas", - "//tizen_src/build:libevas", - "//tizen_src/build:ecore-evas", - "//tizen_src/build:libecore-evas", - "//tizen_src/build:elementary", - "//tizen_src/build:libelementary", -] - -if (use_wayland) { - external_content_shell_efl_configs += [ - "//tizen_src/build:ecore-wayland", - "//tizen_src/build:libecore-wayland", - ] -} else { - external_content_shell_efl_configs += [ - "//tizen_src/build:ecore-x", - "//tizen_src/build:libecore-x", - ] -} - -external_content_shell_efl_deps = [ "//tizen_src/chromium_impl/efl:efl-init" ] -external_content_shell_efl_deps += js_dialog_efl_deps - -external_content_shell_lib_efl_sources = [ - "//tizen_src/chromium_impl/content/shell/browser/shell_efl.cc", - "//tizen_src/chromium_impl/content/shell/browser/shell_platform_delegate_efl.cc", - "//tizen_src/chromium_impl/content/shell/browser/shell_web_contents_view_delegate_efl.cc", -] - -external_content_shell_efl_sources = - [ "//tizen_src/chromium_impl/content/shell/browser/shell_main_efl.cc" ] - -external_exclude_content_shell_efl_sources = [ "app/shell_main.cc" ] diff --git a/tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.cc b/tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.cc deleted file mode 100644 index 7be6088..0000000 --- a/tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.cc +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright 2014 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 "device/battery/battery_status_manager_tizen.h" - -#include -#include -#include - -namespace device { - -namespace { - -typedef void (*battery_remaining_time_changed_cb)(int time, void* data); - -battery_remaining_time_changed_cb timetofull_changed_cb = NULL; -battery_remaining_time_changed_cb timetoempty_changed_cb = NULL; -void* timetofull_cb_user_data = NULL; -void* timetoempty_cb_user_data = NULL; - -void timetofull_vconf_cb(keynode_t* key, void* data) { - BatteryStatusManagerTizen* bsm = - static_cast(data); - if (!bsm || !timetofull_changed_cb) - return; - - const char* keyname = vconf_keynode_get_name(key); - if (keyname == NULL) - return; - - int time = 0; - if (strcmp(keyname, VCONFKEY_PM_BATTERY_TIMETOFULL) == 0 && - bsm->GetRemainingTimeUntilFullyCharged(&time) == DEVICE_ERROR_NONE && - time > 0) { - timetofull_changed_cb(time, timetofull_cb_user_data); - } -} - -void timetoempty_vconf_cb(keynode_t* key, void* data) { - BatteryStatusManagerTizen* bsm = - static_cast(data); - - if (!bsm || !timetoempty_changed_cb) - return; - - const char* keyname = vconf_keynode_get_name(key); - if (keyname == NULL) - return; - - int time = 0; - if (strcmp(keyname, VCONFKEY_PM_BATTERY_TIMETOEMPTY) == 0 && - bsm->GetRemainingTimeUntilDischarged(&time) == DEVICE_ERROR_NONE && - time > 0) { - timetoempty_changed_cb(time, timetoempty_cb_user_data); - } -} - -void OnChargingStatusChanged(keynode_t* key, void* data) { - BatteryStatusManagerTizen* bsm = - static_cast(data); - if (!bsm) - return; - - int charging = 0; - if (vconf_get_int(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, &charging) < 0) - return; - - BatteryStatus current_status = bsm->GetCurrentStatus(); - current_status.charging = charging > 0; - current_status.charging_time = std::numeric_limits::infinity(); - current_status.discharging_time = std::numeric_limits::infinity(); - - int left_time = 0; - if (current_status.charging) { - bsm->GetRemainingTimeUntilFullyCharged(&left_time); - if (left_time > 0) - current_status.charging_time = left_time; - } else { - bsm->GetRemainingTimeUntilDischarged(&left_time); - if (left_time > 0) - current_status.discharging_time = left_time; - } - - bsm->SetCurrentStatus(current_status); - bsm->GetBatteryUpdateCallback().Run(current_status); -} - -void OnLevelChanged(int percent, void* data) { - BatteryStatusManagerTizen* bsm = - static_cast(data); - if (!bsm) - return; - - BatteryStatus current_status = bsm->GetCurrentStatus(); - current_status.level = percent / 100.0; - bsm->SetCurrentStatus(current_status); - bsm->GetBatteryUpdateCallback().Run(current_status); -} - -void OnChargingTimeChanged(int time, void* data) { - BatteryStatusManagerTizen* bsm = - static_cast(data); - if (!bsm) - return; - - BatteryStatus current_status = bsm->GetCurrentStatus(); - current_status.charging_time = time; - bsm->SetCurrentStatus(current_status); - bsm->GetBatteryUpdateCallback().Run(current_status); -} - -void OnDischargingTimeChanged(int time, void* data) { - BatteryStatusManagerTizen* bsm = - static_cast(data); - if (!bsm) - return; - - BatteryStatus current_status = bsm->GetCurrentStatus(); - current_status.discharging_time = time; - bsm->SetCurrentStatus(current_status); - bsm->GetBatteryUpdateCallback().Run(current_status); -} - -int SetRemainingTimeUntilFullyChargedCb( - battery_remaining_time_changed_cb callback, void* data) { - if (callback == NULL) - return DEVICE_ERROR_INVALID_PARAMETER; - - if (vconf_notify_key_changed(VCONFKEY_PM_BATTERY_TIMETOFULL, - timetofull_vconf_cb, NULL) < 0) - return DEVICE_ERROR_OPERATION_FAILED; - - timetofull_changed_cb = callback; - timetofull_cb_user_data = data; - return DEVICE_ERROR_NONE; -} - -int SetRemainingTimeUntilDischargedCb( - battery_remaining_time_changed_cb callback, void* data) { - if (callback == NULL) - return DEVICE_ERROR_INVALID_PARAMETER; - - if (vconf_notify_key_changed(VCONFKEY_PM_BATTERY_TIMETOEMPTY, - timetoempty_vconf_cb, NULL) < 0) - return DEVICE_ERROR_OPERATION_FAILED; - - timetoempty_changed_cb = callback; - timetoempty_cb_user_data = data; - return DEVICE_ERROR_NONE; -} - -int UnsetRemainingTimeUntilFullyChargedCb() { - if (vconf_ignore_key_changed(VCONFKEY_PM_BATTERY_TIMETOFULL, - timetofull_vconf_cb) < 0) - return DEVICE_ERROR_OPERATION_FAILED; - - timetofull_changed_cb = NULL; - timetofull_cb_user_data = NULL; - return DEVICE_ERROR_NONE; -} - -int UnsetRemainingTimeUntilDischargedCb() { - if (vconf_ignore_key_changed(VCONFKEY_PM_BATTERY_TIMETOEMPTY, - timetoempty_vconf_cb) < 0) - return DEVICE_ERROR_OPERATION_FAILED; - - timetoempty_changed_cb = NULL; - timetoempty_cb_user_data = NULL; - return DEVICE_ERROR_NONE; -} - -} // namespace - -std::unique_ptr BatteryStatusManager::Create( - const BatteryStatusService::BatteryUpdateCallback& callback) { - return std::unique_ptr( - new BatteryStatusManagerTizen(callback)); -} - -BatteryStatusManagerTizen::BatteryStatusManagerTizen( - const BatteryStatusService::BatteryUpdateCallback& callback) - : callback_(callback) { -} - -BatteryStatusManagerTizen::~BatteryStatusManagerTizen() { -} - -int BatteryStatusManagerTizen::GetRemainingTimeUntilFullyCharged( - int* time) const { - DCHECK(time != NULL); - bool charging = false; - if (device_battery_is_charging(&charging) != DEVICE_ERROR_NONE || - charging == false) - return DEVICE_ERROR_OPERATION_FAILED; - - int temp_time = 0; - if (vconf_get_int(VCONFKEY_PM_BATTERY_TIMETOFULL, &temp_time) < 0 || - temp_time < 0) - return DEVICE_ERROR_OPERATION_FAILED; - - *time = temp_time; - return DEVICE_ERROR_NONE; -} - -int BatteryStatusManagerTizen::GetRemainingTimeUntilDischarged( - int* time) const { - DCHECK(time != NULL); - bool charging = false; - if (device_battery_is_charging(&charging) != DEVICE_ERROR_NONE || - charging == true) - return DEVICE_ERROR_OPERATION_FAILED; - - int temp_time = 0; - if (vconf_get_int(VCONFKEY_PM_BATTERY_TIMETOEMPTY, time) < 0 || - time < 0) - return DEVICE_ERROR_OPERATION_FAILED; - - *time = temp_time; - return DEVICE_ERROR_NONE; -} - -bool BatteryStatusManagerTizen::StartListeningBatteryChange() { -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup - if (vconf_notify_key_changed( - VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, OnChargingStatusChanged, this) || - device_battery_set_cb(OnLevelChanged, this) != DEVICE_ERROR_NONE || - SetRemainingTimeUntilFullyChargedCb(OnChargingTimeChanged, this) - != DEVICE_ERROR_NONE || - SetRemainingTimeUntilDischargedCb(OnDischargingTimeChanged, this) - != DEVICE_ERROR_NONE) { - StopListeningBatteryChange(); - return false; - } -#endif - - int charging = 0; - if (vconf_get_int(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, &charging) < 0) - return false; - - int level = 0, charging_time = 0, discharging_time = 0; - device_battery_get_percent(&level); - GetRemainingTimeUntilFullyCharged(&charging_time); - GetRemainingTimeUntilDischarged(&discharging_time); - - current_status_.charging = charging > 0; - current_status_.level = level / 100.0; - current_status_.charging_time = charging_time > 0 ? charging_time : - std::numeric_limits::infinity(); - current_status_.discharging_time = discharging_time > 0 ? discharging_time : - std::numeric_limits::infinity(); - - callback_.Run(current_status_); - return true; -} - -void BatteryStatusManagerTizen::StopListeningBatteryChange() { - UnsetRemainingTimeUntilFullyChargedCb(); - UnsetRemainingTimeUntilDischargedCb(); - vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, - OnChargingStatusChanged); -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup - device_battery_unset_cb(); -#endif -} - -} // namespace device diff --git a/tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.h b/tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.h deleted file mode 100644 index 63be660..0000000 --- a/tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2014 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 DEVICE_BATTERY_BATTERY_STATUS_MANAGER_TIZEN_H_ -#define DEVICE_BATTERY_BATTERY_STATUS_MANAGER_TIZEN_H_ - -#include "device/battery/battery_status_manager.h" - -namespace device { - -class BatteryStatusManagerTizen : public BatteryStatusManager { - public: - explicit BatteryStatusManagerTizen( - const BatteryStatusService::BatteryUpdateCallback& callback); - ~BatteryStatusManagerTizen() override; - - BatteryStatusManagerTizen(const BatteryStatusManagerTizen&) = delete; - BatteryStatusManagerTizen& operator=(const BatteryStatusManagerTizen&) = - delete; - - BatteryStatus GetCurrentStatus() const { return current_status_; } - void SetCurrentStatus(BatteryStatus status) { current_status_ = status; } - - BatteryStatusService::BatteryUpdateCallback GetBatteryUpdateCallback() const { - return callback_; - } - - int GetRemainingTimeUntilFullyCharged(int* time) const; - int GetRemainingTimeUntilDischarged(int* time) const; - - private: - bool StartListeningBatteryChange() override; - void StopListeningBatteryChange() override; - - BatteryStatus current_status_; - BatteryStatusService::BatteryUpdateCallback callback_; -}; - -} // namespace content - -#endif // DEVICE_BATTERY_BATTERY_STATUS_MANAGER_TIZEN_H_ diff --git a/tizen_src/chromium_impl/device/battery_tizen.gni b/tizen_src/chromium_impl/device/battery_tizen.gni deleted file mode 100644 index 0e5ee98..0000000 --- a/tizen_src/chromium_impl/device/battery_tizen.gni +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2015 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. - -external_device_battery_configs = [ - "//tizen_src/build:capi-system-device", - "//tizen_src/build:libcapi-system-device", - "//tizen_src/build:vconf", - "//tizen_src/build:libvconf", -] - -external_device_battery_sources = [ - "//tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.cc", - "//tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.h", -] diff --git a/tizen_src/ewk/efl_integration/eweb_view.cc b/tizen_src/ewk/efl_integration/eweb_view.cc index 2124d99..3dbb9fe5 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.cc +++ b/tizen_src/ewk/efl_integration/eweb_view.cc @@ -303,16 +303,6 @@ EWebView* EWebView::FromEvasObject(Evas_Object* eo) { return WebViewDelegateEwk::GetInstance().GetWebViewFromEvasObject(eo); } -void EWebView::OnViewFocusIn(void* data, Evas*, Evas_Object*, void*) { - auto view = static_cast(data); - view->SetFocus(EINA_TRUE); -} - -void EWebView::OnViewFocusOut(void* data, Evas*, Evas_Object*, void*) { - auto view = static_cast(data); - view->SetFocus(EINA_FALSE); -} - void EWebView::VisibleContentChangedCallback(void* user_data, Evas_Object* /*object*/, void* event_info) { @@ -369,10 +359,6 @@ EWebView::EWebView(Ewk_Context* context, Evas_Object* ewk_view) OnCustomScrollBeginCallback, this); evas_object_smart_callback_add(ewk_view_, kCustomScrollEndSignalName, OnCustomScrollEndCallback, this); - evas_object_event_callback_add(ewk_view_, EVAS_CALLBACK_FOCUS_IN, - OnViewFocusIn, this); - evas_object_event_callback_add(ewk_view_, EVAS_CALLBACK_FOCUS_OUT, - OnViewFocusOut, this); #if BUILDFLAG(IS_TIZEN) window_rotate_handler_ = ecore_event_handler_add( ECORE_WL2_EVENT_WINDOW_ROTATE, RotateWindowCb, this); @@ -508,10 +494,6 @@ EWebView::~EWebView() { gin_native_bridge_dispatcher_host_.reset(); if (ewk_view_) { - evas_object_event_callback_del(ewk_view_, EVAS_CALLBACK_FOCUS_IN, - OnViewFocusIn); - evas_object_event_callback_del(ewk_view_, EVAS_CALLBACK_FOCUS_OUT, - OnViewFocusOut); evas_object_smart_callback_del(ewk_view_, kVisibleContentChangedSignalName, VisibleContentChangedCallback); evas_object_smart_callback_del(ewk_view_, kCustomScrollBeginSignalName, diff --git a/tizen_src/ewk/efl_integration/eweb_view.h b/tizen_src/ewk/efl_integration/eweb_view.h index 7d9f4f8..ccccd8f 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.h +++ b/tizen_src/ewk/efl_integration/eweb_view.h @@ -801,8 +801,6 @@ class EWebView { const base::FilePath& file_path, int64_t file_size); - static void OnViewFocusIn(void* data, Evas*, Evas_Object*, void*); - static void OnViewFocusOut(void* data, Evas*, Evas_Object*, void*); static void VisibleContentChangedCallback(void* user_data, Evas_Object* object, void* event_info); -- 2.7.4 From 0c73d9bb1e76a41cccd2a6e99453be4d36d1aa9e Mon Sep 17 00:00:00 2001 From: jingjieli Date: Mon, 19 Feb 2024 17:28:28 +0800 Subject: [PATCH 08/16] [M120 Migration][VD] elapsed time for url request This adds end point logs for each url requests. Also enables HWC log for url request. Reference: https://review.tizen.org/gerrit/#/c/297942/ https://review.tizen.org/gerrit/#/c/301473/ Change-Id: I3f3812551ca190c7d5e6b3abb222e60a21d724a0 Signed-off-by: jingjieli --- net/url_request/url_request.cc | 41 ++++++++++++++++++++++++++ net/url_request/url_request.h | 9 ++++++ tizen_src/chromium_impl/base/logging_network.h | 15 ++++++++++ 3 files changed, 65 insertions(+) create mode 100644 tizen_src/chromium_impl/base/logging_network.h diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc index b5e18cf..0c81ca0 100644 --- a/net/url_request/url_request.cc +++ b/net/url_request/url_request.cc @@ -6,6 +6,10 @@ #include +#if defined(USE_TTRACE) +#include +#endif + #include "base/compiler_specific.h" #include "base/functional/bind.h" #include "base/functional/callback.h" @@ -48,6 +52,11 @@ #include "url/gurl.h" #include "url/origin.h" +#if BUILDFLAG(IS_TIZEN_TV) +#include "base/strings/string_util.h" +#include "tizen_src/chromium_impl/base/logging_network.h" +#endif + namespace net { namespace { @@ -471,6 +480,14 @@ void URLRequest::SetURLChain(const std::vector& url_chain) { url_chain.begin() + url_chain.size() - 1); } +std::string URLRequest::truncated_url() const { + std::string truncated; + const size_t limit = 200; + base::TruncateUTF8ToByteSize(url().possibly_invalid_spec(), limit, + &truncated); + return truncated; +} + void URLRequest::set_site_for_cookies(const SiteForCookies& site_for_cookies) { DCHECK(!is_pending_); site_for_cookies_ = site_for_cookies; @@ -639,6 +656,19 @@ void URLRequest::StartJob(std::unique_ptr job) { DCHECK(!allow_credentials_); } +#if BUILDFLAG(IS_TIZEN_TV) + auto request_url = truncated_url(); + request_delay_[request_url] = std::make_unique(); + LOG(INFO) << __FUNCTION__ << " truncated url: " << request_url; + NET_LOGD("url: %s", url().possibly_invalid_spec().c_str()); +#if defined(USE_TTRACE) + traceMark(TTRACE_TAG_WEB, "URLRequest::StartJob, url: %s", + url().possibly_invalid_spec().c_str()); +#endif +#else + LOG(INFO) << __FUNCTION__ << " url:" << url().possibly_invalid_spec(); +#endif + net_log_.BeginEvent(NetLogEventType::URL_REQUEST_START_JOB, [&] { return NetLogURLRequestStartParams( url(), method_, load_flags_, isolation_info_, site_for_cookies_, @@ -1142,6 +1172,17 @@ void URLRequest::NotifyRequestCompleted() { if (has_notified_completion_) return; +#if BUILDFLAG(IS_TIZEN_TV) + auto request_url = truncated_url(); + if (request_delay_[request_url]) { + base::TimeDelta elapsed_delta = request_delay_[request_url]->Elapsed(); + LOG(INFO) << __FUNCTION__ << " elapsed: " << elapsed_delta.InMilliseconds() + << "ms, content-length: " << received_response_content_length(); + request_delay_.erase(request_url); + } + LOG(INFO) << __FUNCTION__ << " truncated url: " << request_url; +#endif + is_pending_ = false; is_redirecting_ = false; has_notified_completion_ = true; diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h index acd9a59..80d74b9 100644 --- a/net/url_request/url_request.h +++ b/net/url_request/url_request.h @@ -58,6 +58,10 @@ #include "url/gurl.h" #include "url/origin.h" +#if BUILDFLAG(IS_TIZEN_TV) +#include "base/timer/elapsed_timer.h" +#endif + namespace net { class CookieOptions; @@ -243,6 +247,7 @@ class NET_EXPORT URLRequest : public base::SupportsUserData { // redirects, this vector will contain one element. const std::vector& url_chain() const { return url_chain_; } const GURL& url() const { return url_chain_.back(); } + std::string truncated_url() const; // Explicitly set the URL chain for this request. This can be used to // indicate a chain of redirects that happen at a layer above the network @@ -946,6 +951,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData { // cookie store, socket pool, etc.) raw_ptr context_; +#if BUILDFLAG(IS_TIZEN_TV) + std::map> request_delay_; +#endif + // Tracks the time spent in various load states throughout this request. NetLogWithSource net_log_; diff --git a/tizen_src/chromium_impl/base/logging_network.h b/tizen_src/chromium_impl/base/logging_network.h new file mode 100644 index 0000000..d33a4ef --- /dev/null +++ b/tizen_src/chromium_impl/base/logging_network.h @@ -0,0 +1,15 @@ +#ifndef TIZEN_SRC_EWK_EFL_INTEGRATION_BASE_LOGGING_NETWORK_H +#define TIZEN_SRC_EWK_EFL_INTEGRATION_BASE_LOGGING_NETWORK_H + +#ifndef LOG_TAG +#define LOG_TAG "CHROMIUM_NETWORK" +#endif +#include + +#define NET_LOGD(fmt, args...) LOGD(fmt, ##args) +#define NET_LOGI(fmt, args...) LOGI(fmt, ##args) +#define NET_LOGW(fmt, args...) LOGW(fmt, ##args) +#define NET_LOGE(fmt, args...) LOGE(fmt, ##args) +#define NET_LOGE_IF(cond, fmt, args...) LOGE_IF(cond, fmt, ##args) + +#endif // TIZEN_SRC_EWK_EFL_INTEGRATION_BASE_LOGGING_NETWORK_H -- 2.7.4 From 19733869d86c1b06ab26e4365529b3a9a6851a22 Mon Sep 17 00:00:00 2001 From: Sun-woo Nam Date: Thu, 1 Feb 2024 21:23:57 -0800 Subject: [PATCH 09/16] [M120 Migration][MM] Set mime type and fix the supported formats. - Set mime type for Tizen https://review.tizen.org/gerrit/#/c/293363/ - Support MPEG4 format on FFMpeg demuxer. https://review.tizen.org/gerrit/#/c/301843/ - Fix warnings in supported_types.cc https://review.tizen.org/gerrit/#/c/301927/ Change-Id: I85a28a3f77c6eb500ad24b1dd6de65eb10514dc8 Signed-off-by: Sun-woo Nam --- media/base/mime_util_internal.cc | 33 +++++++++++++++++++++++++++++---- media/base/supported_types.cc | 15 +++++++++++++-- media/base/video_codecs.cc | 4 ++-- media/base/video_codecs.h | 3 ++- media/formats/mp4/box_definitions.cc | 10 ++++++++++ media/formats/mp4/fourccs.h | 5 +++++ media/media_options.gni | 5 +++-- tizen_src/build/config/BUILD.gn | 5 ++++- 8 files changed, 68 insertions(+), 12 deletions(-) diff --git a/media/base/mime_util_internal.cc b/media/base/mime_util_internal.cc index 599299d..4113b12 100644 --- a/media/base/mime_util_internal.cc +++ b/media/base/mime_util_internal.cc @@ -76,6 +76,9 @@ const StringToCodecMap& GetStringToCodecMap() { {"mp4a.40.8", MimeUtil::MPEG4_AAC}, {"mp4v.20.8", MimeUtil::H264}, #endif +#if BUILDFLAG(IS_TIZEN_TV) && !BUILDFLAG(ENABLE_PLATFORM_DOLBY_VISION) + {"dvhe.dtr", MimeUtil::DOLBY_VISION}, +#endif // TODO(servolk): Strictly speaking only mp4a.A5 and mp4a.A6 // codec ids are valid according to RFC 6381 section 3.3, 3.4. // Lower-case oti (mp4a.a5 and mp4a.a6) should be rejected. But @@ -309,12 +312,16 @@ void MimeUtil::AddSupportedMediaFormats() { const CodecSet wav_codecs{PCM}; const CodecSet ogg_audio_codecs{FLAC, OPUS, VORBIS}; +#if defined(TIZEN_MULTIMEDIA) + CodecSet ogg_video_codecs; +#else CodecSet ogg_video_codecs{VP8}; #if BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS) if (base::FeatureList::IsEnabled(kTheoraVideoCodec)) { ogg_video_codecs.emplace(THEORA); } #endif // BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS) +#endif // defined(TIZEN_MULTIMEDIA) CodecSet ogg_codecs(ogg_audio_codecs); ogg_codecs.insert(ogg_video_codecs.begin(), ogg_video_codecs.end()); @@ -362,7 +369,7 @@ void MimeUtil::AddSupportedMediaFormats() { mp4_video_codecs.emplace(HEVC); #endif // BUILDFLAG(ENABLE_PLATFORM_HEVC) -#if BUILDFLAG(ENABLE_PLATFORM_DOLBY_VISION) +#if BUILDFLAG(ENABLE_PLATFORM_DOLBY_VISION) || BUILDFLAG(IS_TIZEN_TV) mp4_video_codecs.emplace(DOLBY_VISION); #endif // BUILDFLAG(ENABLE_PLATFORM_DOLBY_VISION) #endif // BUILDFLAG(USE_PROPRIETARY_CODECS) @@ -382,9 +389,11 @@ void MimeUtil::AddSupportedMediaFormats() { const CodecSet implicit_codec; AddContainerWithCodecs("audio/wav", wav_codecs); AddContainerWithCodecs("audio/x-wav", wav_codecs); +#if !defined(TIZEN_MULTIMEDIA) || defined(TIZEN_MULTIMEDIA_WEBM_SUPPORT) AddContainerWithCodecs("audio/webm", webm_audio_codecs); DCHECK(!webm_video_codecs.empty()); AddContainerWithCodecs("video/webm", webm_codecs); +#endif AddContainerWithCodecs("audio/ogg", ogg_audio_codecs); // video/ogg is only supported if an appropriate video codec is supported. // Note: This assumes such codecs cannot be later excluded. @@ -430,7 +439,6 @@ void MimeUtil::AddSupportedMediaFormats() { AddContainerWithCodecs("audio/x-mpegurl", hls_codecs); } #endif // BUILDFLAG(IS_ANDROID) -#endif // BUILDFLAG(USE_PROPRIETARY_CODECS) #if defined(TIZEN_MULTIMEDIA) // Tizen supports HLS & m3u8. AddContainerWithCodecs("video/3gpp", mp4_codecs); @@ -440,7 +448,18 @@ void MimeUtil::AddSupportedMediaFormats() { AddContainerWithCodecs("application/mpegurl", mp4_codecs); AddContainerWithCodecs("audio/mpegurl", mp4_audio_codecs); AddContainerWithCodecs("audio/x-mpegurl", mp4_audio_codecs); -#endif + +#if BUILDFLAG(IS_TIZEN_TV) + // Tizen supports DASH. + AddContainerWithCodecs("application/dash+xml", mp4_codecs); + + // support hbbtv CASD url + AddContainerWithCodecs("application/vnd.oipf.ContentAccessStreaming+xml", + mp4_codecs); + AddContainerWithCodecs("video/mpeg", mp4_codecs); +#endif // BUILDFLAG(IS_TIZEN_TV) +#endif // defined(TIZEN_MULTIMEDIA) +#endif // BUILDFLAG(USE_PROPRIETARY_CODECS) } void MimeUtil::AddContainerWithCodecs(std::string mime_type, CodecSet codecs) { @@ -766,7 +785,7 @@ bool MimeUtil::ParseCodecStrings( for (std::string codec_string : codecs) { ParsedCodecResult result; -#if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER) +#if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER) || BUILDFLAG(IS_TIZEN_TV) if (mime_type_lower_case == "video/mp2t") codec_string = TranslateLegacyAvc1CodecIds(codec_string); #endif @@ -927,6 +946,7 @@ SupportsType MimeUtil::IsCodecSupported(base::StringPiece mime_type_lower_case, DCHECK_GT(video_level, 0); } +#if !defined(TIZEN_MULTIMEDIA) // Check for cases of ambiguous platform support. // TODO(chcunningham): DELETE THIS. Platform should know its capabilities. // Answer should come from MediaClient. @@ -951,6 +971,7 @@ SupportsType MimeUtil::IsCodecSupported(base::StringPiece mime_type_lower_case, ambiguous_platform_support = true; } } +#endif AudioCodec audio_codec = MimeUtilToAudioCodec(codec); if (audio_codec != AudioCodec::kUnknown) { @@ -978,8 +999,12 @@ SupportsType MimeUtil::IsCodecSupported(base::StringPiece mime_type_lower_case, } #endif +#if defined(TIZEN_MULTIMEDIA) + return SupportsType::kSupported; +#else return ambiguous_platform_support ? SupportsType::kMaybeSupported : SupportsType::kSupported; +#endif } bool MimeUtil::GetDefaultCodec(base::StringPiece mime_type, diff --git a/media/base/supported_types.cc b/media/base/supported_types.cc index 57ffd80..4b18a88 100644 --- a/media/base/supported_types.cc +++ b/media/base/supported_types.cc @@ -218,7 +218,7 @@ bool IsAudioCodecProprietary(AudioCodec codec) { bool IsHevcProfileSupported(const VideoType& type) { #if defined(TIZEN_MULTIMEDIA) return BUILDFLAG(ENABLE_PLATFORM_HEVC); -#endif +#else if (!IsColorSpaceSupported(type.color_space)) return false; @@ -247,8 +247,10 @@ bool IsHevcProfileSupported(const VideoType& type) { #else return false; #endif // BUILDFLAG(ENABLE_PLATFORM_HEVC) +#endif // defined(TIZEN_MULTIMEDIA) } +#if !defined(TIZEN_MULTIMEDIA) bool IsVp9ProfileSupported(const VideoType& type) { #if BUILDFLAG(ENABLE_LIBVPX) // High bit depth capabilities may be toggled via LibVPX config flags. @@ -282,6 +284,7 @@ bool IsVp9ProfileSupported(const VideoType& type) { #endif // BUILDFLAG(ENABLE_LIBVPX) return false; } +#endif // !defined(TIZEN_MULTIMEDIA) bool IsAV1Supported(const VideoType& type) { // If the AV1 decoder is enabled, or if we're on Q or later, yes. @@ -297,7 +300,7 @@ bool IsAV1Supported(const VideoType& type) { } bool IsMPEG4Supported() { -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS_ASH) || defined(TIZEN_MULTIMEDIA) return true; #else return false; @@ -372,11 +375,19 @@ bool IsDefaultSupportedVideoType(const VideoType& type) { case VideoCodec::kMPEG4: return IsMPEG4Supported(); case VideoCodec::kDolbyVision: +#if defined(TIZEN_MULTIMEDIA) + return BUILDFLAG(ENABLE_PLATFORM_DOLBY_VISION); +#else return IsDolbyVisionProfileSupported(type); +#endif case VideoCodec::kUnknown: case VideoCodec::kVC1: case VideoCodec::kMPEG2: return false; +#if defined(TIZEN_MULTIMEDIA_MJPEG_SUPPORT) + case VideoCodec::kMJPEG: + return true; +#endif } } diff --git a/media/base/video_codecs.cc b/media/base/video_codecs.cc index c49af54..3bd01bf 100644 --- a/media/base/video_codecs.cc +++ b/media/base/video_codecs.cc @@ -679,7 +679,7 @@ bool ParseAVCCodecId(base::StringPiece codec_id, return true; } -#if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER) +#if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER) || BUILDFLAG(IS_TIZEN_TV) std::string TranslateLegacyAvc1CodecIds(base::StringPiece codec_id) { // Special handling for old, pre-RFC 6381 format avc1 strings, which are still // being used by some HLS apps to preserve backward compatibility with older @@ -1192,7 +1192,7 @@ void ParseCodec(base::StringPiece codec_id, codec = VideoCodec::kH264; return; } -#if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER) +#if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER) || BUILDFLAG(IS_TIZEN_TV) if (ParseAVCCodecId(TranslateLegacyAvc1CodecIds(codec_id), &profile, &level)) { codec = VideoCodec::kH264; diff --git a/media/base/video_codecs.h b/media/base/video_codecs.h index 2fb3ddb..cce87ba 100644 --- a/media/base/video_codecs.h +++ b/media/base/video_codecs.h @@ -8,6 +8,7 @@ #include #include +#include "build/build_config.h" #include "base/strings/string_piece_forward.h" #include "media/base/media_export.h" #include "media/media_buildflags.h" @@ -202,7 +203,7 @@ MEDIA_EXPORT VideoCodec StringToVideoCodec(base::StringPiece codec_id); MEDIA_EXPORT VideoCodec VideoCodecProfileToVideoCodec(VideoCodecProfile profile); -#if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER) +#if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER) || BUILDFLAG(IS_TIZEN_TV) // Translate legacy avc1 codec ids (like avc1.66.30 or avc1.77.31) into a new // style standard avc1 codec ids like avc1.4D002F. If the input codec is not // recognized as a legacy codec id, then returns the input string unchanged. diff --git a/media/formats/mp4/box_definitions.cc b/media/formats/mp4/box_definitions.cc index 99e8659..db315ac 100644 --- a/media/formats/mp4/box_definitions.cc +++ b/media/formats/mp4/box_definitions.cc @@ -1226,6 +1226,16 @@ bool VideoSampleEntry::Parse(BoxReader* reader) { break; } #if BUILDFLAG(ENABLE_PLATFORM_HEVC) +#if BUILDFLAG(IS_TIZEN_TV) && !BUILDFLAG(ENABLE_PLATFORM_DOLBY_VISION) + case FOURCC_DVHE: + // We are either inside a dvhe box, or dvhe-turned-encv box. + // Just try to get to the part of dvhe, which is HEVC (as in + // `class DolbyVisionHEVCSampleEntry() extends HEVCSampleEntry('dvhe')`) + // and carry on + DLOG(WARNING) << "Parsing \'dvhe\' as \'hev1\', skipping DolbyVision " + "specific configuration."; + // [[fallthrough]] +#endif // BUILDFLAG(IS_TIZEN_TV) && !BUILDFLAG(ENABLE_PLATFORM_DOLBY_VISION) case FOURCC_HEV1: case FOURCC_HVC1: { DVLOG(2) << __func__ << " parsing HEVCDecoderConfigurationRecord (hvcC)"; diff --git a/media/formats/mp4/fourccs.h b/media/formats/mp4/fourccs.h index 23c2d70..45ea7c5 100644 --- a/media/formats/mp4/fourccs.h +++ b/media/formats/mp4/fourccs.h @@ -7,6 +7,7 @@ #include +#include "build/build_config.h" #include "media/base/media_export.h" #include "media/media_buildflags.h" @@ -48,6 +49,10 @@ enum FourCC { FOURCC_DVH1 = 0x64766831, FOURCC_DVHE = 0x64766865, #endif +#else +#if BUILDFLAG(IS_TIZEN_TV) && BUILDFLAG(ENABLE_PLATFORM_HEVC) + FOURCC_DVHE = 0x64766865, +#endif #endif FOURCC_DREF = 0x64726566, FOURCC_EDTS = 0x65647473, diff --git a/media/media_options.gni b/media/media_options.gni index 61c1752..dbd5220 100644 --- a/media/media_options.gni +++ b/media/media_options.gni @@ -72,7 +72,8 @@ declare_args() { # Enables AC3/EAC3 audio handling in chromium. This includes demuxing, # on-device decoding and bitstream passthrough as supported by device. - enable_platform_ac3_eac3_audio = proprietary_codecs && is_cast_media_device + enable_platform_ac3_eac3_audio = + proprietary_codecs && (is_cast_media_device || tizen_product_tv) # Enables AC4 audio handling in chromium. This includes demuxing, # on-device decoding and bitstream passthrough as supported by device. @@ -103,7 +104,7 @@ declare_args() { # Enable logging override, e.g. enable DVLOGs through level 2 at build time. # On Cast devices, these are logged as INFO. # When enabled on Fuchsia, these are logged as VLOGs. - enable_logging_override = is_cast_media_device + enable_logging_override = is_cast_media_device || tizen_product_tv enable_dav1d_decoder = use_blink diff --git a/tizen_src/build/config/BUILD.gn b/tizen_src/build/config/BUILD.gn index aba4904..374d189 100644 --- a/tizen_src/build/config/BUILD.gn +++ b/tizen_src/build/config/BUILD.gn @@ -54,7 +54,10 @@ config("tizen_feature_flags") { } if (tizen_product_tv) { - defines += [ "OS_TIZEN_TV_PRODUCT" ] + defines += [ + "OS_TIZEN_TV_PRODUCT", + "TIZEN_MULTIMEDIA_WEBM_SUPPORT", + ] if (tizen_version >= 60) { defines += [ "TIZEN_MULTIMEDIA_MJPEG_SUPPORT" ] } -- 2.7.4 From dc2763eff0c1e1cc8f78c32bebbf2cbcb5ae0648 Mon Sep 17 00:00:00 2001 From: "venu.musham" Date: Thu, 18 Jan 2024 16:30:21 +0530 Subject: [PATCH 10/16] [M120 Migration] Error page isolation & navigation. Disable error page isolation for EFL port Use the current SiteInstance for error page navigation Reference: https://review.tizen.org/gerrit/292258 Change-Id: I5a4d59f096a8814bd35d4ef57b4244105c53b457 Signed-off-by: venu.musham --- content/browser/renderer_host/render_frame_host_manager.cc | 7 +++++++ tizen_src/ewk/efl_integration/content_browser_client_efl.h | 1 + 2 files changed, 8 insertions(+) diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc index 45ce7cf..056ef0a 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc @@ -2601,6 +2601,13 @@ RenderFrameHostManager::GetSiteInstanceForNavigation( SiteInstanceImpl* current_instance = render_frame_host_->GetSiteInstance(); +#if BUILDFLAG(IS_TIZEN) + // Using the current SiteInstance ensures that a speculative RenderFrameHost + // is not created during error page navigations. + if (current_instance->GetSiteURL() == GURL(kUnreachableWebDataURL)) + return current_instance; +#endif + // Determine if we need a new BrowsingInstance for this entry. If true, this // implies that it will get a new SiteInstance (and likely process), and that // other tabs in the current BrowsingInstance will be unable to script it. diff --git a/tizen_src/ewk/efl_integration/content_browser_client_efl.h b/tizen_src/ewk/efl_integration/content_browser_client_efl.h index 53d6635..cceb91c 100644 --- a/tizen_src/ewk/efl_integration/content_browser_client_efl.h +++ b/tizen_src/ewk/efl_integration/content_browser_client_efl.h @@ -66,6 +66,7 @@ class ContentBrowserClientEfl : public ContentBrowserClient { bool ShouldUseMobileFlingCurve() override { return IsMobileProfile(); } void AppendExtraCommandLineSwitches(base::CommandLine* command_line, int child_process_id) override; + bool ShouldIsolateErrorPage(bool in_main_frame) override { return false; } bool CanCreateWindow(RenderFrameHost* opener, const GURL& opener_url, const GURL& opener_top_level_frame_url, -- 2.7.4 From 5c52350c825471d233acca2e025a0b8be31e1828 Mon Sep 17 00:00:00 2001 From: chiragmaheshwari Date: Mon, 19 Feb 2024 12:55:15 +0530 Subject: [PATCH 11/16] [M120 Migration][PERF]Setting low-end device memory threshold as was in M94 Chromium checks whether current device is low-end device in `SysInfo::IsLowEndDevice`. Main test is based on how much RAM is installed on the device. Between M94 and M108 this threshold has been raised from 512MiB to 2GiB. As most of Tizen TV devices has less then 2GiB RAM available, this causes that these devices are considered low-end ones. This causes that `--optimize-for-size` flag is passed to V8 in `RenderProcessImpl` ctor. Although this indeed lowers memory pressure, it has also very negative performance implications. So to keep performance of M108 Chromium on Tizen TVs this patch changes threshold to one used for M94. Patch form: https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/292472/ Reference: https://review.tizen.org/gerrit/c/platform/framework/web/chromium-efl/+/293179 Change-Id: Ieb1cad80ff96deca6bb23cd9e262870964b3a1f5 Signed-off-by: chiragmaheshwari --- base/system/sys_info.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/base/system/sys_info.cc b/base/system/sys_info.cc index 82cebf2..6ab519f 100644 --- a/base/system/sys_info.cc +++ b/base/system/sys_info.cc @@ -24,6 +24,9 @@ namespace { #if BUILDFLAG(IS_IOS) // For M99, 45% of devices have 2GB of RAM, and 55% have more. constexpr uint64_t kLowMemoryDeviceThresholdMB = 1024; +#elif BUILDFLAG(IS_TIZEN_TV) +// Tizen TVs have very little RAM, so keep the same limit as for M94. +constexpr uint64_t kLowMemoryDeviceThresholdMB = 512; #else // Updated Desktop default threshold to match the Android 2021 definition. constexpr uint64_t kLowMemoryDeviceThresholdMB = 2048; -- 2.7.4 From 8679a98e4de920b6497b81675ae1604d1b568518 Mon Sep 17 00:00:00 2001 From: Gajendra N Date: Wed, 21 Feb 2024 09:45:05 +0530 Subject: [PATCH 12/16] Fix desktop build error on Ubuntu 22.04 Error: Package 'atspi-2' requires 'glib-2.0 >= 2.62.0' but version of glib-2.0 is 2.40.2 Could not run pkg-config. System's atspi-2 package version is newer on Ubuntu 22.04 which is not compatible with the older glib version listed in jhbuild. Since atk is not needed for desktop build, place the related pkg-configs under is_tizen guard. Change-Id: I77c8d686af36e6fcbf1e555d109b6a1473e1752d Signed-off-by: Gajendra N --- tizen_src/build/BUILD.gn | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/tizen_src/build/BUILD.gn b/tizen_src/build/BUILD.gn index b71fe1e..c57dcd9 100644 --- a/tizen_src/build/BUILD.gn +++ b/tizen_src/build/BUILD.gn @@ -95,20 +95,22 @@ tizen_pkg_config("libecore-evas") { config("ecore-evas-public") { } -config("atk") { - ldflags = [ "-latk-1.0" ] -} +if (is_tizen) { + config("atk") { + ldflags = [ "-latk-1.0" ] + } -tizen_pkg_config("libatk") { - packages = [ "atk" ] -} + tizen_pkg_config("libatk") { + packages = [ "atk" ] + } -config("atk-bridge") { - ldflags = [ "-latk-bridge-2.0" ] -} + config("atk-bridge") { + ldflags = [ "-latk-bridge-2.0" ] + } -tizen_pkg_config("libatk-bridge") { - packages = [ "atk-bridge-2.0" ] + tizen_pkg_config("libatk-bridge") { + packages = [ "atk-bridge-2.0" ] + } } config("eldbus") { -- 2.7.4 From 740009b3fdb3b42d78ab4e09bc6111b6cc3bb4e0 Mon Sep 17 00:00:00 2001 From: "yh106.jung" Date: Tue, 20 Feb 2024 15:46:48 -0800 Subject: [PATCH 13/16] Remove conditional statements for M/W profile Since 8.0, Tizen supports a single set native of APIs. So, this patch removes conditional statements for Mobile/Wearable profile from ewk headers. Change-Id: Id1e419e6fcf81cf0da5aa9c3d874f151b718d396 Signed-off-by: yh106.jung --- .../public/ewk_autofill_credit_card_internal.h | 16 ----- .../efl_integration/public/ewk_autofill_profile.h | 16 ----- .../efl_integration/public/ewk_back_forward_list.h | 16 ++--- .../public/ewk_back_forward_list_item.h | 12 ++-- tizen_src/ewk/efl_integration/public/ewk_context.h | 34 ++------- .../ewk/efl_integration/public/ewk_context_menu.h | 24 +++---- .../efl_integration/public/ewk_cookie_manager.h | 14 ++-- tizen_src/ewk/efl_integration/public/ewk_error.h | 12 ---- .../ewk/efl_integration/public/ewk_geolocation.h | 4 +- tizen_src/ewk/efl_integration/public/ewk_main.h | 4 +- .../efl_integration/public/ewk_policy_decision.h | 34 ++++----- .../efl_integration/public/ewk_security_origin.h | 6 +- .../ewk/efl_integration/public/ewk_settings.h | 32 +++------ .../efl_integration/public/ewk_settings_product.h | 8 +-- tizen_src/ewk/efl_integration/public/ewk_view.h | 80 ++++++++++------------ 15 files changed, 111 insertions(+), 201 deletions(-) diff --git a/tizen_src/ewk/efl_integration/public/ewk_autofill_credit_card_internal.h b/tizen_src/ewk/efl_integration/public/ewk_autofill_credit_card_internal.h index 9aa25bb..bffea7e 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_autofill_credit_card_internal.h +++ b/tizen_src/ewk/efl_integration/public/ewk_autofill_credit_card_internal.h @@ -37,12 +37,10 @@ extern "C" { */ /** - * @if MOBILE * \enum _Ewk_Autofill_Credit_Card_Data_Type * @brief Enumeration that provides an option to autofill credit_card data types. * * @since_tizen 4.0 - * @endif */ enum _Ewk_Autofill_Credit_Card_Data_Type { @@ -55,25 +53,20 @@ enum _Ewk_Autofill_Credit_Card_Data_Type { }; /** - * @if MOBILE * @brief Enumeration that creates a type name for the Ewk_Autofill_Credit_Card_Data_Type. * * @since_tizen 4.0 - * @endif */ typedef enum _Ewk_Autofill_Credit_Card_Data_Type Ewk_Autofill_Credit_Card_Data_Type; /** - * @if MOBILE * @brief The structure type that creates a type name for #Ewk_Autofill_CreditCard. * * @since_tizen 4.0 - * @endif */ typedef struct _Ewk_Autofill_CreditCard Ewk_Autofill_CreditCard; /** - * @if MOBILE * @brief Creates a new credit_card * * The created credit_card must be deleted by ewk_autofill_credit_card_delete @@ -85,12 +78,10 @@ typedef struct _Ewk_Autofill_CreditCard Ewk_Autofill_CreditCard; * * @see ewk_autofill_credit_card_data_set * @see ewk_autofill_credit_card_delete - * @endif */ EXPORT_API Ewk_Autofill_CreditCard* ewk_autofill_credit_card_new(void); /** - * @if MOBILE * @brief Deletes a given credit_card * * The API will delete the a particular credit_card only from the memory. @@ -104,12 +95,10 @@ EXPORT_API Ewk_Autofill_CreditCard* ewk_autofill_credit_card_new(void); * @see ewk_autofill_credit_card_new * @see ewk_context_form_autofill_credit_card_get * @see ewk_context_form_autofill_credit_card_remove - * @endif */ EXPORT_API void ewk_autofill_credit_card_delete(Ewk_Autofill_CreditCard* card); /** - * @if MOBILE * @brief Sets the data in the credit_card created by ewk_autofill_credit_card_new * * The data set by this function is set locally. To save it to database use @@ -124,12 +113,10 @@ EXPORT_API void ewk_autofill_credit_card_delete(Ewk_Autofill_CreditCard* card); * @see ewk_autofill_credit_card_data_get * @see Ewk_Autofill_Credit_Card_Data_Type * @see ewk_context_form_autofill_credit_card_add - * @endif */ EXPORT_API void ewk_autofill_credit_card_data_set(Ewk_Autofill_CreditCard* card, Ewk_Autofill_Credit_Card_Data_Type type, const char* value); /** - * @if MOBILE * @brief Gets the id attribute value from a given credit_card * * The credit_card obtained from ewk_context_form_autofill_credit_card_get will be used @@ -144,12 +131,10 @@ EXPORT_API void ewk_autofill_credit_card_data_set(Ewk_Autofill_CreditCard* card, * @see ewk_autofill_credit_card_new * @see ewk_context_form_autofill_credit_card_get * @see ewk_context_form_autofill_credit_card_get_all - * @endif */ EXPORT_API unsigned ewk_autofill_credit_card_id_get(Ewk_Autofill_CreditCard* card); /** - * @if MOBILE * @brief Gets the attribute value from a given credit_card * * The credit_card obtained from ewk_context_form_autofill_credit_card_get will be used @@ -166,7 +151,6 @@ EXPORT_API unsigned ewk_autofill_credit_card_id_get(Ewk_Autofill_CreditCard* car * @see ewk_autofill_credit_card_new * @see ewk_context_form_autofill_credit_card_get * @see ewk_context_form_autofill_credit_card_get_all - * @endif */ EXPORT_API Eina_Stringshare* ewk_autofill_credit_card_data_get(Ewk_Autofill_CreditCard* credit_card, Ewk_Autofill_Credit_Card_Data_Type type); diff --git a/tizen_src/ewk/efl_integration/public/ewk_autofill_profile.h b/tizen_src/ewk/efl_integration/public/ewk_autofill_profile.h index f043b47..035db09 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_autofill_profile.h +++ b/tizen_src/ewk/efl_integration/public/ewk_autofill_profile.h @@ -37,12 +37,10 @@ extern "C" { */ /** - * @if MOBILE * \enum _Ewk_Autofill_Profile_Data_Type * @brief Enumeration that provides an option to autofill profile data types. * * @since_tizen 2.4 - * @endif */ enum _Ewk_Autofill_Profile_Data_Type { EWK_PROFILE_ID = 0, /**< Id */ @@ -60,25 +58,20 @@ enum _Ewk_Autofill_Profile_Data_Type { }; /** - * @if MOBILE * @brief Enumeration that creates a type name for the Ewk_Autofill_Profile_Data_Type. * * @since_tizen 2.4 - * @endif */ typedef enum _Ewk_Autofill_Profile_Data_Type Ewk_Autofill_Profile_Data_Type; /** - * @if MOBILE * @brief The structure type that creates a type name for #Ewk_Autofill_Profile. * * @since_tizen 2.4 - * @endif */ typedef struct _Ewk_Autofill_Profile Ewk_Autofill_Profile; /** - * @if MOBILE * @brief Creates a new profile * * The created profile must be deleted by ewk_autofill_profile_delete @@ -90,12 +83,10 @@ typedef struct _Ewk_Autofill_Profile Ewk_Autofill_Profile; * * @see ewk_autofill_profile_data_set * @see ewk_autofill_profile_delete - * @endif */ EXPORT_API Ewk_Autofill_Profile* ewk_autofill_profile_new(void); /** - * @if MOBILE * @brief Deletes a given profile * * The API will delete the a particular profile only from the memory. @@ -109,12 +100,10 @@ EXPORT_API Ewk_Autofill_Profile* ewk_autofill_profile_new(void); * @see ewk_autofill_profile_new * @see ewk_context_form_autofill_profile_get * @see ewk_context_form_autofill_profile_remove - * @endif */ EXPORT_API void ewk_autofill_profile_delete(Ewk_Autofill_Profile* profile); /** - * @if MOBILE * @brief Sets the data in the profile created by ewk_autofill_profile_new * * The data set by this function is set locally. To save it to database use @@ -129,12 +118,10 @@ EXPORT_API void ewk_autofill_profile_delete(Ewk_Autofill_Profile* profile); * @see ewk_autofill_profile_data_get * @see Ewk_Autofill_Profile_Data_Type * @see ewk_context_form_autofill_profile_add - * @endif */ EXPORT_API void ewk_autofill_profile_data_set(Ewk_Autofill_Profile* profile, Ewk_Autofill_Profile_Data_Type name, const char* value); /** - * @if MOBILE * @brief Gets the id attribute value from a given profile * * The profile obtained from ewk_context_form_autofill_profile_get will be used @@ -149,12 +136,10 @@ EXPORT_API void ewk_autofill_profile_data_set(Ewk_Autofill_Profile* profile, Ewk * @see ewk_autofill_profile_new * @see ewk_context_form_autofill_profile_get * @see ewk_context_form_autofill_profile_get_all - * @endif */ EXPORT_API unsigned ewk_autofill_profile_id_get(Ewk_Autofill_Profile* profile); /** - * @if MOBILE * @brief Gets the attribute value from a given profile * * The profile obtained from ewk_context_form_autofill_profile_get will be used @@ -170,7 +155,6 @@ EXPORT_API unsigned ewk_autofill_profile_id_get(Ewk_Autofill_Profile* profile); * @see ewk_autofill_profile_new * @see ewk_context_form_autofill_profile_get * @see ewk_context_form_autofill_profile_get_all - * @endif */ EXPORT_API const char* ewk_autofill_profile_data_get(Ewk_Autofill_Profile* profile, Ewk_Autofill_Profile_Data_Type name); diff --git a/tizen_src/ewk/efl_integration/public/ewk_back_forward_list.h b/tizen_src/ewk/efl_integration/public/ewk_back_forward_list.h index fe48045..8fe30db 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_back_forward_list.h +++ b/tizen_src/ewk/efl_integration/public/ewk_back_forward_list.h @@ -42,14 +42,14 @@ extern "C" { /** * @brief The structure type that creates a type name for * Ewk_Back_Forward_List. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ typedef struct _Ewk_Back_Forward_List Ewk_Back_Forward_List; /** * @brief Returns the current item in the @a list. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] list The back-forward list instance * @@ -61,7 +61,7 @@ EXPORT_API Ewk_Back_Forward_List_Item* ewk_back_forward_list_current_item_get(co /** * @brief Returns the item that precedes the current item in the @a list. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] list The back-forward list instance * @@ -73,7 +73,7 @@ EXPORT_API Ewk_Back_Forward_List_Item* ewk_back_forward_list_previous_item_get(c /** * @brief Returns the item that follows the current item in the @a list. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] list The back-forward list instance * @@ -85,7 +85,7 @@ EXPORT_API Ewk_Back_Forward_List_Item* ewk_back_forward_list_next_item_get(const /** * @brief Returns the item at a given @a index relative to the current item. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] list The back-forward list instance * @param[in] index The index of the item @@ -99,7 +99,7 @@ EXPORT_API Ewk_Back_Forward_List_Item* ewk_back_forward_list_item_at_index_get(c * @brief Returns the length of the back-forward list including the current * item. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] list The back-forward list instance * @@ -117,7 +117,7 @@ EXPORT_API unsigned ewk_back_forward_list_count(Ewk_Back_Forward_List* list); * If @a limit is equal to @c -1 all the items preceding the current * item are returned. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] list The back-forward list instance * @param[in] limit The number of items to retrieve @@ -138,7 +138,7 @@ EXPORT_API Eina_List* ewk_back_forward_list_n_back_items_copy(const Ewk_Back_For * If @a limit is equal to @c -1 all the items preceding the current * item are returned. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] list The back-forward list instance * @param[in] limit The number of items to retrieve diff --git a/tizen_src/ewk/efl_integration/public/ewk_back_forward_list_item.h b/tizen_src/ewk/efl_integration/public/ewk_back_forward_list_item.h index 1cfdf08..dea0391 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_back_forward_list_item.h +++ b/tizen_src/ewk/efl_integration/public/ewk_back_forward_list_item.h @@ -40,14 +40,14 @@ extern "C" { /** * @brief The structure type that creates a type name for * Ewk_Back_Forward_List_Item. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ typedef struct _Ewk_Back_Forward_List_Item Ewk_Back_Forward_List_Item; /** * @brief Increases the reference count of the given object. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] item The back-forward list item instance to increase the reference * count @@ -63,7 +63,7 @@ EXPORT_API Ewk_Back_Forward_List_Item* ewk_back_forward_list_item_ref(Ewk_Back_F * * @details When the reference count reaches @c 0, the item is freed. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] item The back-forward list item instance to decrease the reference * count @@ -76,7 +76,7 @@ EXPORT_API void ewk_back_forward_list_item_unref(Ewk_Back_Forward_List_Item* ite * @details The returned URL may differ from the original URL (For example, * if the page is redirected). * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] item The back-forward list item instance * @@ -94,7 +94,7 @@ EXPORT_API const char* ewk_back_forward_list_item_url_get(const Ewk_Back_Forward /** * @brief Returns the title of the item. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] item The back-forward list item instance * @@ -110,7 +110,7 @@ EXPORT_API const char* ewk_back_forward_list_item_title_get(const Ewk_Back_Forwa /** * @brief Returns the original URL of the item. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] item The back-forward list item instance * diff --git a/tizen_src/ewk/efl_integration/public/ewk_context.h b/tizen_src/ewk/efl_integration/public/ewk_context.h index 4dc1810..463ea5e 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_context.h +++ b/tizen_src/ewk/efl_integration/public/ewk_context.h @@ -55,7 +55,7 @@ extern "C" { /** * @brief The structure type that creates a type name for #Ewk_Context. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ typedef struct Ewk_Context Ewk_Context; @@ -72,14 +72,14 @@ enum _Ewk_Cache_Model { /** * @brief The structure type that creates a type name for Ewk_Cache_Model. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif + * @since_tizen 2.3 */ typedef enum _Ewk_Cache_Model Ewk_Cache_Model; /** * @brief Gets the cookie manager instance for this @a context. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] context The context object to query * @@ -89,7 +89,6 @@ typedef enum _Ewk_Cache_Model Ewk_Cache_Model; EXPORT_API Ewk_Cookie_Manager* ewk_context_cookie_manager_get(const Ewk_Context* context); /** - * @if MOBILE * @brief Requests for deleting all web application caches. * * @since_tizen 2.4 @@ -97,7 +96,6 @@ EXPORT_API Ewk_Cookie_Manager* ewk_context_cookie_manager_get(const Ewk_Context* * @param[in] context Context object * * @return @c EINA_TRUE on success, otherwise @c EINA FALSE - * @endif */ EXPORT_API Eina_Bool ewk_context_application_cache_delete_all(Ewk_Context* context); @@ -106,7 +104,7 @@ EXPORT_API Eina_Bool ewk_context_application_cache_delete_all(Ewk_Context* conte * * The default cache option is #EWK_CACHE_MODEL_DOCUMENT_VIEWER. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] context The context object * @param[in] model The cache model @@ -119,7 +117,7 @@ EXPORT_API Eina_Bool ewk_context_cache_model_set(Ewk_Context* context, Ewk_Cache /** * @brief Returns the cache model type. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] context The context object * @@ -128,7 +126,6 @@ EXPORT_API Eina_Bool ewk_context_cache_model_set(Ewk_Context* context, Ewk_Cache EXPORT_API Ewk_Cache_Model ewk_context_cache_model_get(const Ewk_Context* context); /** - * @if MOBILE * @brief Saves the created profile into permanent storage * * The profile used to save must be created by ewk_autofill_profile_new. @@ -143,12 +140,10 @@ EXPORT_API Ewk_Cache_Model ewk_context_cache_model_get(const Ewk_Context* contex * @c EINA_FALSE * * @see ewk_autofill_profile_new - * @endif */ EXPORT_API Eina_Bool ewk_context_form_autofill_profile_add(Ewk_Context* context, Ewk_Autofill_Profile* profile); /** - * @if MOBILE * @brief Gets the existing profile for given index * * @since_tizen 2.4 @@ -159,12 +154,10 @@ EXPORT_API Eina_Bool ewk_context_form_autofill_profile_add(Ewk_Context* context, * @return @c Ewk_Autofill_Profile if profile exists, otherwise @c NULL * * @see ewk_autofill_profile_delete - * @endif */ EXPORT_API Ewk_Autofill_Profile* ewk_context_form_autofill_profile_get(Ewk_Context* context, unsigned id); /** - * @if MOBILE * @brief Gets a list of all existing profiles * * The obtained profile must be deleted by ewk_autofill_profile_delete. @@ -176,12 +169,10 @@ EXPORT_API Ewk_Autofill_Profile* ewk_context_form_autofill_profile_get(Ewk_Conte * @return @c Eina_List of Ewk_Autofill_Profile, otherwise @c NULL * * @see ewk_autofill_profile_delete - * @endif */ EXPORT_API Eina_List* ewk_context_form_autofill_profile_get_all(Ewk_Context* context); /** - * @if MOBILE * @brief Sets the given profile for the given id * * Data can be added to the created profile by ewk_autofill_profile_data_set. @@ -197,12 +188,10 @@ EXPORT_API Eina_List* ewk_context_form_autofill_profile_get_all(Ewk_Context* con * * @see ewk_autofill_profile_new * @see ewk_context_form_autofill_profile_add - * @endif */ EXPORT_API Eina_Bool ewk_context_form_autofill_profile_set(Ewk_Context* context, unsigned id, Ewk_Autofill_Profile* profile); /** - * @if MOBILE * @brief Removes Autofill Form profile completely * * @since_tizen 2.4 @@ -214,29 +203,24 @@ EXPORT_API Eina_Bool ewk_context_form_autofill_profile_set(Ewk_Context* context, @c EINA_FALSE * * @see ewk_context_form_autofill_profile_get_all - * @endif */ EXPORT_API Eina_Bool ewk_context_form_autofill_profile_remove(Ewk_Context* context, unsigned id); /** - * @if MOBILE * @brief Deletes all candidate form data from DB * * @since_tizen 2.4 * * @param[in] context Context object - * @endif */ EXPORT_API void ewk_context_form_candidate_data_delete_all(Ewk_Context* context); /** - * @if MOBILE * @brief Deletes whole password data from DB * * @since_tizen 2.4 * * @param context Context object - * @endif */ EXPORT_API void ewk_context_form_password_data_delete_all(Ewk_Context* context); @@ -245,14 +229,13 @@ EXPORT_API void ewk_context_form_password_data_delete_all(Ewk_Context* context); * all resources cached in memory\n * such as images, CSS, JavaScript, XSL, and fonts for @a context. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] context The context object to clear all resource caches */ EXPORT_API void ewk_context_resource_cache_clear(Ewk_Context* context); /** - * @if MOBILE * @brief Requests to get image representing the given URL. * * @since_tizen 2.4 @@ -263,12 +246,10 @@ EXPORT_API void ewk_context_resource_cache_clear(Ewk_Context* context); * must not be @c 0 * * @return @c Evas_Object instance, otherwise @c 0 - * @endif */ EXPORT_API Evas_Object* ewk_context_icon_database_icon_object_add(Ewk_Context* context, const char* uri, Evas* canvas); /** - * @if MOBILE * @brief Requests for deleting all web indexed databases. * * @since_tizen 2.4 @@ -276,12 +257,10 @@ EXPORT_API Evas_Object* ewk_context_icon_database_icon_object_add(Ewk_Context* c * @param[in] context Context object * * @return @c EINA_TRUE on success, otherwise @c EINA_FALSE - * @endif */ EXPORT_API Eina_Bool ewk_context_web_indexed_database_delete_all(Ewk_Context* context); /** - * @if MOBILE * @brief Deletes web storage. * * @details This function does not ensure that all data will be removed. @@ -292,7 +271,6 @@ EXPORT_API Eina_Bool ewk_context_web_indexed_database_delete_all(Ewk_Context* co * @param[in] context Context object * * @return @c EINA_TRUE on success, otherwise @c EINA_FALSE - * @endif */ EXPORT_API Eina_Bool ewk_context_web_storage_delete_all(Ewk_Context* context); diff --git a/tizen_src/ewk/efl_integration/public/ewk_context_menu.h b/tizen_src/ewk/efl_integration/public/ewk_context_menu.h index bf01ce4..a1a1db0 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_context_menu.h +++ b/tizen_src/ewk/efl_integration/public/ewk_context_menu.h @@ -40,7 +40,7 @@ extern "C" { * \enum _Ewk_Context_Menu_Item_Tag * @brief Enumeration that provides the tags of items for the context menu. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif + * @since_tizen 2.3 */ enum _Ewk_Context_Menu_Item_Tag{ EWK_CONTEXT_MENU_ITEM_TAG_NO_ACTION = 0, /**< No action */ @@ -140,26 +140,26 @@ enum _Ewk_Context_Menu_Item_Tag{ /** * @brief The structure type that creates a type name for Ewk_Context_Menu_Item_Tag. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif + * @since_tizen 2.3 */ typedef uint32_t Ewk_Context_Menu_Item_Tag; /** * @brief The structure type that creates a type name for _Ewk_Context_Menu. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif + * @since_tizen 2.3 */ typedef struct _Ewk_Context_Menu Ewk_Context_Menu; /** * @brief The structure type that creates a type name for _Ewk_Context_Menu_Item. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif + * @since_tizen 2.3 */ typedef struct _Ewk_Context_Menu_Item Ewk_Context_Menu_Item; /** * @brief Counts the number of the context menu item. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif + * @since_tizen 2.3 * * @param[in] menu The context menu object * @@ -170,7 +170,7 @@ EXPORT_API unsigned ewk_context_menu_item_count(Ewk_Context_Menu* menu); /** * @brief Returns the nth item in a context menu. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif + * @since_tizen 2.3 * * @param[in] menu The context menu object * @param[in] n The number of the item @@ -185,7 +185,7 @@ EXPORT_API Ewk_Context_Menu_Item* ewk_context_menu_nth_item_get(Ewk_Context_Menu * @remarks If all context menu items are removed, neither context menu nor\n * selection handles will be shown. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif + * @since_tizen 2.3 * * @param[in] menu The context menu object * @param[in] item The context menu item to remove @@ -196,7 +196,6 @@ EXPORT_API Ewk_Context_Menu_Item* ewk_context_menu_nth_item_get(Ewk_Context_Menu EXPORT_API Eina_Bool ewk_context_menu_item_remove(Ewk_Context_Menu* menu, Ewk_Context_Menu_Item* item); /** - * @if MOBILE * @brief Adds the context menu item to the context menu object. * * @since_tizen 2.3 @@ -209,12 +208,10 @@ EXPORT_API Eina_Bool ewk_context_menu_item_remove(Ewk_Context_Menu* menu, Ewk_Co * * @return @c EINA_TRUE on successful request,\n * otherwise @c EINA_FALSE on failure - * @endif */ EXPORT_API Eina_Bool ewk_context_menu_item_append_as_action(Ewk_Context_Menu* menu, Ewk_Context_Menu_Item_Tag tag, const char* title, Eina_Bool enabled); /** - * @if MOBILE * @brief Adds the context menu item to the context menu object. * * @since_tizen 2.3 @@ -228,14 +225,13 @@ EXPORT_API Eina_Bool ewk_context_menu_item_append_as_action(Ewk_Context_Menu* me * * @return @c EINA_TRUE on successful request,\n * otherwise @c EINA_FALSE on failure - * @endif */ EXPORT_API Eina_Bool ewk_context_menu_item_append(Ewk_Context_Menu* menu, Ewk_Context_Menu_Item_Tag tag, const char* title, const char* icon_file, Eina_Bool enabled); /** * @brief Returns the tag of context menu item. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 3.0 @endif + * @since_tizen 2.3 * * @param[in] item The context menu item object * @@ -244,7 +240,6 @@ EXPORT_API Eina_Bool ewk_context_menu_item_append(Ewk_Context_Menu* menu, Ewk_Co EXPORT_API Ewk_Context_Menu_Item_Tag ewk_context_menu_item_tag_get(Ewk_Context_Menu_Item* item); /** - * @if MOBILE * @brief Returns the link url string of context menu item. * * @since_tizen 2.3 @@ -253,12 +248,10 @@ EXPORT_API Ewk_Context_Menu_Item_Tag ewk_context_menu_item_tag_get(Ewk_Context_M * * @return The current link url string on success,\n * otherwise @c 0 on failure - * @endif */ EXPORT_API const char* ewk_context_menu_item_link_url_get(Ewk_Context_Menu_Item* item); /** - * @if MOBILE * @brief Returns the image url string of context menu item. * * @since_tizen 2.3 @@ -267,7 +260,6 @@ EXPORT_API const char* ewk_context_menu_item_link_url_get(Ewk_Context_Menu_Item* * * @return The current image url string on success,\n * otherwise @c 0 on failure - * @endif */ EXPORT_API const char* ewk_context_menu_item_image_url_get(Ewk_Context_Menu_Item* item); diff --git a/tizen_src/ewk/efl_integration/public/ewk_cookie_manager.h b/tizen_src/ewk/efl_integration/public/ewk_cookie_manager.h index f4a0eaa..31b5d6e 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_cookie_manager.h +++ b/tizen_src/ewk/efl_integration/public/ewk_cookie_manager.h @@ -39,7 +39,7 @@ extern "C" { /** * @brief The structure type that creates a type name for #Ewk_Cookie_Manager. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ typedef struct Ewk_Cookie_Manager Ewk_Cookie_Manager; @@ -47,7 +47,7 @@ typedef struct Ewk_Cookie_Manager Ewk_Cookie_Manager; * \enum Ewk_Cookie_Accept_Policy * * @brief Enumeration that contains accept policies for the cookies. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ enum Ewk_Cookie_Accept_Policy { EWK_COOKIE_ACCEPT_POLICY_ALWAYS, /**< Accepts every cookie sent from any page */ @@ -57,7 +57,7 @@ enum Ewk_Cookie_Accept_Policy { /** * @brief Enumeration that creates a type name for the Ewk_Cookie_Accept_Policy. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ typedef enum Ewk_Cookie_Accept_Policy Ewk_Cookie_Accept_Policy; @@ -67,7 +67,7 @@ typedef enum Ewk_Cookie_Accept_Policy Ewk_Cookie_Accept_Policy; * @details By default, only cookies set by the main document loaded are * accepted. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] manager The cookie manager to update * @param[in] policy A #Ewk_Cookie_Accept_Policy @@ -77,7 +77,7 @@ EXPORT_API void ewk_cookie_manager_accept_policy_set(Ewk_Cookie_Manager* manager /** * @brief Called for use with ewk_cookie_manager_accept_policy_async_get(). * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] policy A #Ewk_Cookie_Accept_Policy * @param[in] event_info The user data that will be passed when @@ -91,7 +91,7 @@ typedef void (*Ewk_Cookie_Manager_Policy_Async_Get_Cb)(Ewk_Cookie_Accept_Policy * @details By default, only cookies set by the main document loaded are * accepted. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] manager The cookie manager to query * @param[in] callback The function to call when the policy is received @@ -102,7 +102,7 @@ EXPORT_API void ewk_cookie_manager_accept_policy_async_get(const Ewk_Cookie_Mana /** * @brief Deletes all the cookies of @a manager. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] manager The cookie manager to update */ diff --git a/tizen_src/ewk/efl_integration/public/ewk_error.h b/tizen_src/ewk/efl_integration/public/ewk_error.h index 7950cae..84ae2f5 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_error.h +++ b/tizen_src/ewk/efl_integration/public/ewk_error.h @@ -38,19 +38,15 @@ extern "C" { */ /** - * @if MOBILE * @brief The structure type that creates a type name for #Ewk_Error. * @since_tizen 2.3 - * @endif */ typedef struct _Ewk_Error Ewk_Error; /** - * @if MOBILE * \enum Ewk_Error_Code * @brief Enumeration that provides an option to error codes. * @since_tizen 2.3 - * @endif */ typedef enum { EWK_ERROR_CODE_UNKNOWN, /* Unknown */ @@ -71,7 +67,6 @@ typedef enum { } Ewk_Error_Code; /** - * @if MOBILE * @brief Query failing URL for this error. * * @details URL that failed loading. @@ -85,12 +80,10 @@ typedef enum { * save yourself some cpu cycles and use\n * eina_stringshare_ref() instead of eina_stringshare_add() or\n * strdup() - * @endif */ EXPORT_API const char* ewk_error_url_get(const Ewk_Error* error); /** - * @if MOBILE * @brief Query the error code. * * @since_tizen 2.3 @@ -98,12 +91,10 @@ EXPORT_API const char* ewk_error_url_get(const Ewk_Error* error); * @param[in] error The error object to query * * @return The error code #Ewk_Error_Code - * @endif */ EXPORT_API int ewk_error_code_get(const Ewk_Error* error); /** - * @if MOBILE * @brief Query description for this error. * * @since_tizen 2.3 @@ -115,12 +106,10 @@ EXPORT_API int ewk_error_code_get(const Ewk_Error* error); * save yourself some cpu cycles and use\n * eina_stringshare_ref() instead of eina_stringshare_add() or\n * strdup() - * @endif */ EXPORT_API const char* ewk_error_description_get(const Ewk_Error* error); /** - * @if MOBILE * @brief Query if error should be treated as a cancellation. * * @since_tizen 2.3 @@ -129,7 +118,6 @@ EXPORT_API const char* ewk_error_description_get(const Ewk_Error* error); * * @return @c EINA_TRUE if this error should be treated as a cancellation\n * otherwise @c EINA_FALSE - * @endif */ EXPORT_API Eina_Bool ewk_error_cancellation_get(const Ewk_Error* error); diff --git a/tizen_src/ewk/efl_integration/public/ewk_geolocation.h b/tizen_src/ewk/efl_integration/public/ewk_geolocation.h index aa8f3cf..5b29cca 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_geolocation.h +++ b/tizen_src/ewk/efl_integration/public/ewk_geolocation.h @@ -40,14 +40,14 @@ extern "C" { /** * @brief The structure type that creates a type name for #Ewk_Geolocation_Permission_Request. * - * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif + * @since_tizen 2.4 */ typedef struct _Ewk_Geolocation_Permission_Request Ewk_Geolocation_Permission_Request; /** * @brief Requests for getting origin of geolocation permission request. * - * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif + * @since_tizen 2.4 * * @param[in] request Ewk_Geolocation_Permission_Request object to get origin * diff --git a/tizen_src/ewk/efl_integration/public/ewk_main.h b/tizen_src/ewk/efl_integration/public/ewk_main.h index ad37e90..87618a4 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_main.h +++ b/tizen_src/ewk/efl_integration/public/ewk_main.h @@ -45,7 +45,7 @@ extern "C" { * - Initializes components needed by EFL,\n * - Increases a reference count of Chromium's instance. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @return A reference count of Chromium's instance on success,\n * otherwise @c 0 on failure @@ -59,7 +59,7 @@ EXPORT_API int ewk_init(void); * @details If the reference count reaches @c 0, Chromium's instance is * destroyed. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @return A reference count of Chromium's instance */ diff --git a/tizen_src/ewk/efl_integration/public/ewk_policy_decision.h b/tizen_src/ewk/efl_integration/public/ewk_policy_decision.h index b82e68e..480bad5 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_policy_decision.h +++ b/tizen_src/ewk/efl_integration/public/ewk_policy_decision.h @@ -39,7 +39,7 @@ extern "C" { /** * \enum _Ewk_Policy_Decision_Type * @brief Enumeration that provides an option to policy decision types. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ enum _Ewk_Policy_Decision_Type { EWK_POLICY_DECISION_USE, /**< Use */ @@ -49,20 +49,20 @@ enum _Ewk_Policy_Decision_Type { /** * @brief Enumeration that creates a type name for the Ewk_Policy_Decision_Type. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ typedef enum _Ewk_Policy_Decision_Type Ewk_Policy_Decision_Type; /** * @brief The structure type that creates a type name for Ewk_Policy_Decision. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ typedef struct _Ewk_Policy_Decision Ewk_Policy_Decision; /** * \enum _Ewk_Policy_Navigation_Type * @brief Enumeration that provides an option to policy navigation types. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ enum _Ewk_Policy_Navigation_Type { EWK_POLICY_NAVIGATION_TYPE_LINK_CLICKED = 0, /**< Link clicked */ @@ -75,14 +75,14 @@ enum _Ewk_Policy_Navigation_Type { /** * @brief Enumeration that creates a type name for #Ewk_Policy_Navigation_Type. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ typedef enum _Ewk_Policy_Navigation_Type Ewk_Policy_Navigation_Type; /** * @brief Returns a cookie from the Policy Decision object. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] policy_decision The policy decision object * @@ -94,7 +94,7 @@ EXPORT_API const char* ewk_policy_decision_cookie_get(Ewk_Policy_Decision* polic /** * @brief Returns a URL from the Policy Decision object. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] policy_decision The policy decision object * @@ -106,7 +106,7 @@ EXPORT_API const char* ewk_policy_decision_url_get(Ewk_Policy_Decision* policy_d /** * @brief Returns a scheme from the Policy Decision object. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] policy_decision The policy decision object * @@ -118,7 +118,7 @@ EXPORT_API const char* ewk_policy_decision_scheme_get(Ewk_Policy_Decision* polic /** * @brief Returns a host from the Policy Decision object. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] policy_decision The policy decision object * @@ -130,7 +130,7 @@ EXPORT_API const char* ewk_policy_decision_host_get(Ewk_Policy_Decision* policy_ /** * @brief Returns an HTTP method from the Policy Decision object. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] policy_decision The policy decision object * @@ -142,7 +142,7 @@ EXPORT_API const char* ewk_policy_decision_http_method_get(Ewk_Policy_Decision* /** * @brief Returns a MIME type for response data from the Policy Decision object. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] policy_decision policy decision object * @@ -154,7 +154,7 @@ EXPORT_API const char* ewk_policy_decision_response_mime_get(Ewk_Policy_Decision /** * @brief Return HTTP headers for response data from the Policy Decision object. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] policy_decision The policy decision object * @@ -166,7 +166,7 @@ EXPORT_API const Eina_Hash* ewk_policy_decision_response_headers_get(Ewk_Policy_ /** * @brief Returns an HTTP status code from the Policy Decision object. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] policy_decision The policy decision object * @@ -177,7 +177,7 @@ EXPORT_API int ewk_policy_decision_response_status_code_get(Ewk_Policy_Decision* /** * @brief Returns a policy type from the Policy Decision object. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] policy_decision The policy decision object * @@ -188,7 +188,7 @@ EXPORT_API Ewk_Policy_Decision_Type ewk_policy_decision_type_get(const Ewk_Polic /** * @brief Accepts the action which triggers this decision. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] policy_decision The policy decision object * @@ -200,7 +200,7 @@ EXPORT_API Eina_Bool ewk_policy_decision_use(Ewk_Policy_Decision* policy_decisio /** * @brief Ignores the action which triggers this decision. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] policy_decision The policy decision object * @@ -212,7 +212,7 @@ EXPORT_API Eina_Bool ewk_policy_decision_ignore(Ewk_Policy_Decision* policy_deci /** * @brief Returns a navigation type from the Policy Decision object. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] policy_decision The policy decision object * diff --git a/tizen_src/ewk/efl_integration/public/ewk_security_origin.h b/tizen_src/ewk/efl_integration/public/ewk_security_origin.h index 79e2c5d..d363657 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_security_origin.h +++ b/tizen_src/ewk/efl_integration/public/ewk_security_origin.h @@ -39,14 +39,14 @@ extern "C" { /** * @brief The structure type that creates a type name for #Ewk_Security_Origin. - * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif + * @since_tizen 2.4 */ typedef struct _Ewk_Security_Origin Ewk_Security_Origin; /** * @brief Requests for getting host of security origin. * - * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif + * @since_tizen 2.4 * * @param[in] origin Security origin * @@ -57,7 +57,7 @@ EXPORT_API Eina_Stringshare* ewk_security_origin_host_get(const Ewk_Security_Ori /** * @brief Requests for getting host of security origin. * - * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif + * @since_tizen 2.4 * * @param[in] origin Security origin * diff --git a/tizen_src/ewk/efl_integration/public/ewk_settings.h b/tizen_src/ewk/efl_integration/public/ewk_settings.h index ffea564..810a541 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_settings.h +++ b/tizen_src/ewk/efl_integration/public/ewk_settings.h @@ -42,12 +42,11 @@ extern "C" { /** * @brief The structure type that creates a type name for #Ewk_Settings. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ typedef struct Ewk_Settings Ewk_Settings; /** - * @if MOBILE * @brief Requests enable/disable password form autofill * * @since_tizen 2.4 @@ -57,12 +56,10 @@ typedef struct Ewk_Settings Ewk_Settings; * @c EINA_FALSE to disable * * @return @c EINA_TRUE on success, otherwise @c EINA_FALSE - * @endif */ EXPORT_API Eina_Bool ewk_settings_autofill_password_form_enabled_set(Ewk_Settings* settings, Eina_Bool enable); /** - * @if MOBILE * @brief Requests enable/disable form candidate data for autofill * * @since_tizen 2.4 @@ -72,12 +69,10 @@ EXPORT_API Eina_Bool ewk_settings_autofill_password_form_enabled_set(Ewk_Setting * @c EINA_FALSE to disable * * @return @c EINA_TRUE on success, otherwise @c EINA_FALSE - * @endif */ EXPORT_API Eina_Bool ewk_settings_form_candidate_data_enabled_set(Ewk_Settings* settings, Eina_Bool enable); /** - * @if MOBILE * @brief Enables/disables form autofill profile feature. * * @since_tizen 2.4 @@ -87,12 +82,10 @@ EXPORT_API Eina_Bool ewk_settings_form_candidate_data_enabled_set(Ewk_Settings* * @c EINA_FALSE to disable * * @return @c EINA_TRUE on success, otherwise @c EINA_FALSE - * @endif */ EXPORT_API Eina_Bool ewk_settings_form_profile_data_enabled_set(Ewk_Settings *settings, Eina_Bool enable); /** - * @if MOBILE * @brief Requests setting of auto fit. * * @since_tizen 2.3 @@ -103,12 +96,10 @@ EXPORT_API Eina_Bool ewk_settings_form_profile_data_enabled_set(Ewk_Settings *se * * @return @c EINA_TRUE on success,\n * otherwise @c EINA_FALSE on failure - * @endif */ EXPORT_API Eina_Bool ewk_settings_auto_fitting_set(Ewk_Settings* settings, Eina_Bool enable); /** - * @if MOBILE * @brief Returns the auto fit status. * * @since_tizen 2.3 @@ -117,14 +108,13 @@ EXPORT_API Eina_Bool ewk_settings_auto_fitting_set(Ewk_Settings* settings, Eina_ * * @return @c EINA_TRUE if auto fit is enabled,\n * otherwise @c EINA_FALSE - * @endif */ EXPORT_API Eina_Bool ewk_settings_auto_fitting_get(const Ewk_Settings* settings); /** * @brief Enables/disables JavaScript executing. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] settings The settings object to set JavaScript executing * @param[in] enable If @c EINA_TRUE JavaScript executing is enabled,\n @@ -138,7 +128,7 @@ EXPORT_API Eina_Bool ewk_settings_javascript_enabled_set(Ewk_Settings* settings, /** * @brief Returns whether JavaScript can be executable. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] settings The settings object to query if JavaScript can be * executed @@ -151,7 +141,7 @@ EXPORT_API Eina_Bool ewk_settings_javascript_enabled_get(const Ewk_Settings* set /** * @brief Enables/disables auto loading of images. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] settings The settings object to set auto loading of images * @param[in] automatic If @c EINA_TRUE auto loading of images is enabled,\n @@ -165,7 +155,7 @@ EXPORT_API Eina_Bool ewk_settings_loads_images_automatically_set(Ewk_Settings* s /** * @brief Returns whether images can be loaded automatically. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] settings The settings object to get auto loading of images * @@ -177,7 +167,7 @@ EXPORT_API Eina_Bool ewk_settings_loads_images_automatically_get(const Ewk_Setti /** * @brief Sets the default text encoding name. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] settings The settings object to set the default text encoding name * @param[in] encoding The default text encoding name @@ -192,7 +182,7 @@ EXPORT_API Eina_Bool ewk_settings_default_text_encoding_name_set(Ewk_Settings* s * * @details The returned string is guaranteed to be stringshared. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] settings The settings object to query the default text encoding * name @@ -206,7 +196,7 @@ EXPORT_API const char* ewk_settings_default_text_encoding_name_get(const Ewk_Set * * @details By default, the default font size is @c 16. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] settings The settings object to set the default font size * @param[in] size A new default font size to set @@ -219,7 +209,7 @@ EXPORT_API Eina_Bool ewk_settings_default_font_size_set(Ewk_Settings* settings, /** * @brief Returns the default font size. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] settings The settings object to get the default font size * @@ -233,7 +223,7 @@ EXPORT_API int ewk_settings_default_font_size_get(const Ewk_Settings* settings); * * @details By default, the scripts can open new windows. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] settings The settings object to set if the scripts can open * new windows @@ -248,7 +238,7 @@ EXPORT_API Eina_Bool ewk_settings_scripts_can_open_windows_set(Ewk_Settings* set /** * @brief Returns whether the scripts can open new windows. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] settings The settings object to query whether the scripts can * open new windows diff --git a/tizen_src/ewk/efl_integration/public/ewk_settings_product.h b/tizen_src/ewk/efl_integration/public/ewk_settings_product.h index 387f598..6a094ea 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_settings_product.h +++ b/tizen_src/ewk/efl_integration/public/ewk_settings_product.h @@ -708,7 +708,7 @@ EXPORT_API Eina_Bool ewk_settings_text_style_state_enabled_get(const Ewk_Setting /** * @brief Enables/disables legacy font size mode * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] settings settings object * @param[in] enable If @c EINA_TRUE legacy font size is enabled\n @@ -721,7 +721,7 @@ EXPORT_API Eina_Bool ewk_settings_legacy_font_size_enabled_set(Ewk_Settings* set /** * @brief Return whether legacy font size mode is enabled * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] settings settings object * @@ -733,7 +733,7 @@ EXPORT_API Eina_Bool ewk_settings_legacy_font_size_enabled_get(Ewk_Settings* set /** * @brief Sets font-family as system font for font rendering * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] settings settings object * @param[in] use @c EINA_TRUE to use one of the system fonts which is selected by user in Settings @@ -746,7 +746,7 @@ EXPORT_API Eina_Bool ewk_settings_use_system_font_set(Ewk_Settings* settings, Ei /** * @brief Returns whether we use the system font which is selected by user in Settings or use a system default font * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] settings settings object * diff --git a/tizen_src/ewk/efl_integration/public/ewk_view.h b/tizen_src/ewk/efl_integration/public/ewk_view.h index d637a51..d236154 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_view.h +++ b/tizen_src/ewk/efl_integration/public/ewk_view.h @@ -49,7 +49,7 @@ extern "C" { /** * @brief Request to set the current page's visibility. * - * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif + * @since_tizen 2.4 * * @param[in] o View object to set the visibility. * @param[in] enable EINA_TRUE to set on the visibility of the page, @@ -64,7 +64,7 @@ EXPORT_API Eina_Bool ewk_view_visibility_set(Evas_Object* o, Eina_Bool enable); * * If orientation value is changed, orientationchanged event will occur. * - * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif + * @since_tizen 2.4 * * @param[in] o View object to receive orientation event. * @param[in] orientation The new orientation of the device. (degree) @@ -77,7 +77,6 @@ EXPORT_API Eina_Bool ewk_view_visibility_set(Evas_Object* o, Eina_Bool enable); EXPORT_API void ewk_view_orientation_send(Evas_Object *o, int orientation); /** - * @if MOBILE * @brief Returns the selection text. * * @details Returned string becomes invalidated upon next call to this api. @@ -87,12 +86,10 @@ EXPORT_API void ewk_view_orientation_send(Evas_Object *o, int orientation); * @param[in] o View object to get selection text. * * @return @c selection text, otherwise @c NULL - * @endif */ EXPORT_API const char* ewk_view_text_selection_text_get(Evas_Object* o); /** - * @if MOBILE * @brief Clears the current selection. * * @since_tizen 2.4 @@ -100,14 +97,13 @@ EXPORT_API const char* ewk_view_text_selection_text_get(Evas_Object* o); * @param[in] o View object with selection in progress * * @return @c EINA_TRUE on success, otherwise @c EINA_FALSE - * @endif */ EXPORT_API Eina_Bool ewk_view_text_selection_clear(Evas_Object* o); /** * @brief Creates a new EFL Chromium view object. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] e The canvas object where to create the view object * @@ -131,7 +127,7 @@ EXPORT_API Evas_Object *ewk_view_add_in_incognito_mode(Evas *e); /** * @brief Gets the #Ewk_Context of this view. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to get the #Ewk_Context * @@ -147,7 +143,7 @@ EXPORT_API Ewk_Context* ewk_view_context_get(const Evas_Object* o); * smart callback 'url,changed' is called. This is important for\n * EWK API functions which operate on pages. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to load @a url * @param[in] url The uniform resource identifier to load @@ -163,7 +159,7 @@ EXPORT_API Eina_Bool ewk_view_url_set(Evas_Object* o, const char* url); * @details It returns an internal string that should not be modified.\n * The string is guaranteed to be stringshared. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to get the current URL * @@ -190,7 +186,7 @@ EXPORT_API const char* ewk_view_original_url_get(const Evas_Object* o); /** * @brief Asks the main frame to reload the current document. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to reload the current document * @@ -202,7 +198,7 @@ EXPORT_API Eina_Bool ewk_view_reload(Evas_Object* o); /** * @brief Asks the main frame to stop loading. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to stop loading * @@ -214,7 +210,7 @@ EXPORT_API Eina_Bool ewk_view_stop(Evas_Object* o); /** * @brief Gets the #Ewk_Settings of this view. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to get the #Ewk_Settings * @@ -226,7 +222,7 @@ EXPORT_API Ewk_Settings* ewk_view_settings_get(const Evas_Object* o); /** * @brief Asks the main frame to navigate back in history. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to navigate back * @@ -238,7 +234,7 @@ EXPORT_API Eina_Bool ewk_view_back(Evas_Object* o); /** * @brief Asks the main frame to navigate forward in history. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to navigate forward * @@ -251,7 +247,7 @@ EXPORT_API Eina_Bool ewk_view_forward(Evas_Object* o); * @brief Checks whether it is possible to navigate backwards one item in * history. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to query if backward navigation is possible * @@ -264,7 +260,7 @@ EXPORT_API Eina_Bool ewk_view_back_possible(Evas_Object* o); * @brief Checks whether it is possible to navigate forwards one item in * history. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to query if forward navigation is possible * @@ -284,7 +280,7 @@ EXPORT_API Eina_Bool ewk_view_forward_possible(Evas_Object* o); * to listen for EVAS_CALLBACK_DEL on a given view (@a o) to know\n * when to stop using the returned handle. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to get the back-forward navigation list * @@ -295,7 +291,7 @@ EXPORT_API Ewk_Back_Forward_List* ewk_view_back_forward_list_get(const Evas_Obje /** * @brief Clears the back-forward list of a page. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to clear the back-forward list */ @@ -307,7 +303,7 @@ EXPORT_API void ewk_view_back_forward_list_clear(const Evas_Object* o); * @details It returns an internal string that should not be modified.\n * The string is guaranteed to be stringshared. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to get the current title * @@ -321,7 +317,7 @@ EXPORT_API const char* ewk_view_title_get(const Evas_Object* o); * * @details The progress estimation from @c 0.0 to @c 1.0. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to get the current progress * @@ -333,7 +329,7 @@ EXPORT_API double ewk_view_load_progress_get(const Evas_Object* o); /** * @brief Requests to set the user agent string. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to set the user agent string * @param[in] user_agent The user agent string to set,\n @@ -347,7 +343,7 @@ EXPORT_API Eina_Bool ewk_view_user_agent_set(Evas_Object* o, const char* user_ag /** * @brief Returns the user agent string. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to get the user agent string * @@ -358,7 +354,7 @@ EXPORT_API const char* ewk_view_user_agent_get(const Evas_Object* o); /** * @brief Gets the last known content's size. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to get the content's size * @param[in] width The width pointer to store the content's size width, @@ -375,7 +371,7 @@ EXPORT_API Eina_Bool ewk_view_contents_size_get(const Evas_Object* o, Evas_Coord /** * @brief Callback for ewk_view_script_execute(). * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object * @param[in] result_value The value returned by the script\n @@ -389,7 +385,7 @@ typedef void (*Ewk_View_Script_Execute_Cb)(Evas_Object* o, const char* result_va /** * @brief Requests the execution of the given script. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @remarks This allows to use @c NULL for the callback parameter\n * So, if the result data from the script is not required, @@ -410,7 +406,7 @@ EXPORT_API Eina_Bool ewk_view_script_execute(Evas_Object* o, const char* script, /** * @brief Scales the current page, centered at the given point. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to set the zoom level * @param[in] scale_factor A new level to set @@ -429,7 +425,7 @@ EXPORT_API Eina_Bool ewk_view_scale_set(Evas_Object* o, double scale_factor, int * called immediately\n * until the scale factor of the page is really changed. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to get the scale factor of * @@ -441,7 +437,7 @@ EXPORT_API double ewk_view_scale_get(const Evas_Object* o); /** * @brief Exits fullscreen when the back key is pressed. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to exit the fullscreen mode * @@ -453,7 +449,7 @@ EXPORT_API Eina_Bool ewk_view_fullscreen_exit(Evas_Object* o); /** * @brief Suspends the operation associated with the view object. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to suspend */ @@ -463,7 +459,7 @@ EXPORT_API void ewk_view_suspend(Evas_Object* o); * @brief Resumes the operation associated with the view object after calling * ewk_view_suspend(). * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to resume */ @@ -472,7 +468,7 @@ EXPORT_API void ewk_view_resume(Evas_Object* o); /** * \enum Ewk_Http_Method * @brief Enumeration that provides HTTP method options. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ enum Ewk_Http_Method { EWK_HTTP_METHOD_GET, /**< Get */ @@ -484,14 +480,14 @@ enum Ewk_Http_Method { /** * @brief Enumeration that creates a type name for the #Ewk_Http_Method. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ typedef enum Ewk_Http_Method Ewk_Http_Method; /** * @brief Requests loading of the given request data. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to load * @param[in] url The uniform resource identifier to load @@ -505,7 +501,6 @@ typedef enum Ewk_Http_Method Ewk_Http_Method; EXPORT_API Eina_Bool ewk_view_url_request_set(Evas_Object* o, const char* url, Ewk_Http_Method method, Eina_Hash* headers, const char* body); /** - * @if MOBILE * @brief Requests loading the given contents by MIME type into the view object. * * @since_tizen 2.3 @@ -522,14 +517,13 @@ EXPORT_API Eina_Bool ewk_view_url_request_set(Evas_Object* o, const char* url, E * * @return @c EINA_TRUE on a successful request,\n * otherwise @c EINA_FALSE on errors - * @endif */ EXPORT_API Eina_Bool ewk_view_contents_set(Evas_Object* o, const char* contents, size_t contents_size, char* mime_type, char* encoding, char* base_uri); /** * @brief Scrolls the webpage of view by dx and dy. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to scroll * @param[in] dx The horizontal offset to scroll @@ -540,7 +534,7 @@ EXPORT_API void ewk_view_scroll_by(Evas_Object* o, int dx, int dy); /** * @brief Gets the current scroll position of the given view. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to get the current scroll position * @param[in] x The pointer to store the horizontal position, may be @c NULL @@ -557,7 +551,7 @@ EXPORT_API Eina_Bool ewk_view_scroll_pos_get(Evas_Object* o, int* x, int* y); * @details Both values are from zero to the contents size minus * the viewport size. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to scroll * @param[in] x The horizontal position to scroll @@ -572,7 +566,7 @@ EXPORT_API Eina_Bool ewk_view_scroll_set(Evas_Object* o, int x, int y); * Enum values used to specify search options. * @brief Enumeration that provides the option to find text. * @details It contains enum values used to specify search options. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ enum Ewk_Find_Options { EWK_FIND_OPTIONS_NONE, /**< No search flags, this means a case sensitive, no wrap, forward only search */ @@ -588,14 +582,14 @@ enum Ewk_Find_Options { /** * @brief Enumeration that creates a type name for the #Ewk_Find_Options. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 */ typedef enum Ewk_Find_Options Ewk_Find_Options; /** * @brief Searches and highlights the given string in the document. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] o The view object to find text * @param[in] text The text to find @@ -620,7 +614,7 @@ EXPORT_API Eina_Bool ewk_view_text_find(Evas_Object* o, const char* text, Ewk_Fi * If an @a unreachableUrl is passed it is used as the url for the loaded * content.\n This is typically used to display error pages for a failed load. * - * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.4 * * @param[in] o view object to load the HTML into * @param[in] html HTML data to load -- 2.7.4 From 0ae487c67caf45514a211a0243d57784a9d7a091 Mon Sep 17 00:00:00 2001 From: Manjeet Date: Wed, 21 Feb 2024 01:21:43 +0530 Subject: [PATCH 14/16] [M120 Migration] Set IO|GPU thread type with higher priorites This patch sets IO and InProcGPU thread types to higher priorites kCompositing and kDisplayCritical respectively, like ANDROID, to improve rendering performance. Reference: https://review.tizen.org/gerrit/290935/ Change-Id: Ib6de5c7a19feeb21e794889692439004ab39ff8a Signed-off-by: Manjeet --- content/child/child_process.cc | 2 +- content/gpu/in_process_gpu_thread.cc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/content/child/child_process.cc b/content/child/child_process.cc index 2e4788b..deae27d 100644 --- a/content/child/child_process.cc +++ b/content/child/child_process.cc @@ -135,7 +135,7 @@ ChildProcess::ChildProcess(base::ThreadType io_thread_type, base::Thread::Options thread_options(base::MessagePumpType::IO, 0); thread_options.thread_type = io_thread_type; // TODO(1329208): Figure out whether IS_ANDROID can be lifted here. -#if BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_EFL) // TODO(reveman): Remove this in favor of setting it explicitly for each type // of process. thread_options.thread_type = base::ThreadType::kCompositing; diff --git a/content/gpu/in_process_gpu_thread.cc b/content/gpu/in_process_gpu_thread.cc index 2d1bafa..a2be5a1 100644 --- a/content/gpu/in_process_gpu_thread.cc +++ b/content/gpu/in_process_gpu_thread.cc @@ -56,6 +56,9 @@ void InProcessGpuThread::Init() { // Up the priority of the |io_thread_| on Android. io_thread_type = base::ThreadType::kDisplayCritical; #endif +#if BUILDFLAG(IS_EFL) + io_thread_type = base::ThreadType::kDisplayCritical; +#endif gpu_process_ = std::make_unique(io_thread_type); -- 2.7.4 From 552a32a4138c06dc3ae0cac5d9798178b632a9e3 Mon Sep 17 00:00:00 2001 From: Sun-woo Nam Date: Sun, 23 Apr 2023 17:12:41 +0800 Subject: [PATCH 15/16] [M120 Migration] Apply opacity/filter/border-radius for video hole. 1. Pass video hole flag to DirectRenderer 2. Disable blend for border-radius case 3. Disable blend and use Black Quad with opacity to simulate opacity effect. 4. Update render target id for filter effect node If parent node set filter:brightness, chromium will create a kFilter effect node. This effect node will create a contribute render surface which will cover on video. So we need to update it's render target, let it to render on the same surface with video hole rectangle. 5. Implement opacity css Update video layer's target render surface to it's parent target In some special case, like disney+, Hoichoi.tv opacity animation will cause opacity abnormal. opacity is 1.0f, but create render surface. Reference: https://review.tizen.org/gerrit/#/c/291821/ https://review.tizen.org/gerrit/#/c/292417/ https://review.tizen.org/gerrit/#/c/297840/ https://review.tizen.org/gerrit/#/c/302794/ Change-Id: I6b07af528bb5e912fabec2a7c8a831adb96fbec9 Signed-off-by: Sun-woo Nam --- cc/layers/layer_impl.h | 4 +++ cc/layers/video_layer_impl.cc | 31 +++++++++++++++++++ cc/layers/video_layer_impl.h | 3 ++ cc/trees/draw_property_utils.cc | 18 ++++++++++- cc/trees/effect_node.h | 11 ++++++- .../viz/common/quads/aggregated_render_pass.cc | 12 ++++++++ .../viz/common/quads/aggregated_render_pass.h | 3 ++ .../viz/common/quads/compositor_render_pass.cc | 15 ++++++++-- .../viz/common/quads/compositor_render_pass.h | 3 ++ components/viz/common/quads/render_pass_internal.h | 5 ++++ components/viz/common/transition_utils.cc | 6 +++- components/viz/service/display/direct_renderer.cc | 6 ++++ components/viz/service/display/direct_renderer.h | 5 ++++ components/viz/service/display/skia_renderer.cc | 31 +++++++++++++++++-- .../viz/service/display/surface_aggregator.cc | 35 ++++++++++++++++++++-- .../viz/service/display/surface_aggregator.h | 3 ++ .../compositor_render_pass_mojom_traits.cc | 3 ++ .../compositor_render_pass_mojom_traits.h | 7 +++++ services/viz/public/mojom/BUILD.gn | 4 +++ .../mojom/compositing/compositor_render_pass.mojom | 3 ++ 20 files changed, 198 insertions(+), 10 deletions(-) diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h index a196bc7..9660e89 100644 --- a/cc/layers/layer_impl.h +++ b/cc/layers/layer_impl.h @@ -98,7 +98,11 @@ class CC_EXPORT LayerImpl { void SetEffectTreeIndex(int index); int effect_tree_index() const { return effect_tree_index_; } +#if defined(TIZEN_VIDEO_HOLE) + virtual int render_target_effect_tree_index() const; +#else int render_target_effect_tree_index() const; +#endif void SetScrollTreeIndex(int index); int scroll_tree_index() const { return scroll_tree_index_; } diff --git a/cc/layers/video_layer_impl.cc b/cc/layers/video_layer_impl.cc index 51f4784..b51b823 100644 --- a/cc/layers/video_layer_impl.cc +++ b/cc/layers/video_layer_impl.cc @@ -242,6 +242,13 @@ void VideoLayerImpl::AppendQuads(viz::CompositorRenderPass* render_pass, if (is_clipped()) { clip_rect_opt = clip_rect(); } + +#if defined(TIZEN_VIDEO_HOLE) + if (frame_->storage_type() == media::VideoFrame::STORAGE_HOLE) { + render_pass->has_video_hole = true; + } +#endif + updater_->AppendQuads(render_pass, frame_, transform, quad_rect, visible_quad_rect, draw_properties().mask_filter_info, clip_rect_opt, contents_opaque(), draw_opacity(), @@ -251,6 +258,15 @@ void VideoLayerImpl::AppendQuads(viz::CompositorRenderPass* render_pass, const gfx::Rect video_rect = cc::MathUtil::MapEnclosingClippedRect(transform, gfx::Rect(rotated_size)); if (previous_visible_rect_ != video_rect) { + LOG(INFO) << " VideoLayerImpl::AppendQuads, id: " << id() + << ", rect changed from: " << previous_visible_rect_.ToString() + << ", to: " << video_rect.ToString() << ", RenderPassId" + << render_pass->id << ", bounds: " << bounds().ToString() + << ", visible_drawable_content_rect: " + << visible_drawable_content_rect().ToString() + << ", draw_opacity: " << draw_opacity() << ", media rotation: " + << media::VideoRotationToString(media_transform.rotation) + << ", transform: " << transform.ToString(); #if defined(USE_TTRACE) TTRACE(TTRACE_TAG_WEB, "VideoResourceUpdater::AppendQuads -> rect change start!"); @@ -319,6 +335,21 @@ gfx::ContentColorUsage VideoLayerImpl::GetContentColorUsage() const { return frame_color_space.GetContentColorUsage(); } +#if defined(TIZEN_VIDEO_HOLE) +int VideoLayerImpl::render_target_effect_tree_index() const { + EffectNode* effect_node = GetEffectTree().Node(effect_tree_index()); + + // If we only set opacity style on a video element, we need to return + // it's target id here, or video hole rect will be drawn onto RPDQ. + if (may_contain_video() && + (effect_node->render_surface_reason == RenderSurfaceReason::kOpacity || + effect_node->render_surface_reason == RenderSurfaceReason::kFilter)) { + return effect_node->target_id; + } + return LayerImpl::render_target_effect_tree_index(); +} +#endif + void VideoLayerImpl::SetNeedsRedraw() { UnionUpdateRect(gfx::Rect(bounds())); layer_tree_impl()->SetNeedsRedraw(); diff --git a/cc/layers/video_layer_impl.h b/cc/layers/video_layer_impl.h index 9b1fa01..de261d5 100644 --- a/cc/layers/video_layer_impl.h +++ b/cc/layers/video_layer_impl.h @@ -55,6 +55,9 @@ class CC_EXPORT VideoLayerImpl : public LayerImpl { void DidBecomeActive() override; void ReleaseResources() override; gfx::ContentColorUsage GetContentColorUsage() const override; +#if defined(TIZEN_VIDEO_HOLE) + int render_target_effect_tree_index() const override; +#endif void SetNeedsRedraw(); diff --git a/cc/trees/draw_property_utils.cc b/cc/trees/draw_property_utils.cc index 06a9aa9..2e442ac 100644 --- a/cc/trees/draw_property_utils.cc +++ b/cc/trees/draw_property_utils.cc @@ -754,8 +754,17 @@ gfx::Rect LayerVisibleRect(PropertyTrees* property_trees, LayerImpl* layer) { ConditionalClip LayerClipRect(PropertyTrees* property_trees, LayerImpl* layer) { const EffectTree* effect_tree = &property_trees->effect_tree(); const EffectNode* effect_node = effect_tree->Node(layer->effect_tree_index()); +#if defined(TIZEN_VIDEO_HOLE) + bool is_opacity_video = + layer->may_contain_video() && + (effect_node->render_surface_reason == RenderSurfaceReason::kOpacity || + effect_node->render_surface_reason == RenderSurfaceReason::kFilter); +#endif const EffectNode* target_node = effect_node->HasRenderSurface() +#if defined(TIZEN_VIDEO_HOLE) + && !is_opacity_video +#endif ? effect_node : effect_tree->Node(effect_node->target_id); bool include_expanding_clips = false; @@ -836,7 +845,14 @@ void UpdateRenderTarget(EffectTree* effect_tree) { if (i == kContentsRootPropertyNodeId) { // Render target of the node corresponding to root is itself. node->target_id = kContentsRootPropertyNodeId; - } else if (effect_tree->parent(node)->HasRenderSurface()) { + } else if (effect_tree->parent(node)->HasRenderSurface() +#if defined(TIZEN_VIDEO_HOLE) + && effect_tree->parent(node)->render_surface_reason != + RenderSurfaceReason::kOpacity && + effect_tree->parent(node)->render_surface_reason != + RenderSurfaceReason::kFilter) +#endif + { node->target_id = node->parent_id; } else { node->target_id = effect_tree->parent(node)->target_id; diff --git a/cc/trees/effect_node.h b/cc/trees/effect_node.h index 45cbaac..76bac35 100644 --- a/cc/trees/effect_node.h +++ b/cc/trees/effect_node.h @@ -175,7 +175,16 @@ struct CC_EXPORT EffectNode { viz::ViewTransitionElementResourceId view_transition_element_resource_id; bool HasRenderSurface() const { - return render_surface_reason != RenderSurfaceReason::kNone; + return render_surface_reason != RenderSurfaceReason::kNone +#if defined(TIZEN_VIDEO_HOLE) + && render_surface_reason != RenderSurfaceReason::kRoundedCorner && + !(render_surface_reason == RenderSurfaceReason::kFilter && + filters.HasFilterOfType(FilterOperation::BRIGHTNESS)) && + !(render_surface_reason == RenderSurfaceReason::kBackdropFilter && + (backdrop_filters.HasFilterOfType(FilterOperation::BLUR) || + backdrop_filters.HasFilterOfType(FilterOperation::OPACITY))) +#endif + ; } #if DCHECK_IS_ON() diff --git a/components/viz/common/quads/aggregated_render_pass.cc b/components/viz/common/quads/aggregated_render_pass.cc index b394881..9cb33cf 100644 --- a/components/viz/common/quads/aggregated_render_pass.cc +++ b/components/viz/common/quads/aggregated_render_pass.cc @@ -64,6 +64,9 @@ void AggregatedRenderPass::SetAll( const absl::optional& backdrop_filter_bounds, gfx::ContentColorUsage color_usage, bool has_transparent_background, +#if defined(TIZEN_VIDEO_HOLE) + bool has_video_hole, +#endif bool cache_render_pass, bool has_damage_from_contributing_content, bool generate_mipmap) { @@ -78,6 +81,9 @@ void AggregatedRenderPass::SetAll( this->backdrop_filter_bounds = backdrop_filter_bounds; content_color_usage = color_usage; this->has_transparent_background = has_transparent_background; +#if defined(TIZEN_VIDEO_HOLE) + this->has_video_hole = has_video_hole; +#endif this->cache_render_pass = cache_render_pass; this->has_damage_from_contributing_content = has_damage_from_contributing_content; @@ -164,6 +170,9 @@ std::unique_ptr AggregatedRenderPass::Copy( copy_pass->SetAll(new_id, output_rect, damage_rect, transform_to_root_target, filters, backdrop_filters, backdrop_filter_bounds, content_color_usage, has_transparent_background, +#if defined(TIZEN_VIDEO_HOLE) + has_video_hole, +#endif cache_render_pass, has_damage_from_contributing_content, generate_mipmap); return copy_pass; @@ -179,6 +188,9 @@ std::unique_ptr AggregatedRenderPass::DeepCopy() const { copy_pass->SetAll(id, output_rect, damage_rect, transform_to_root_target, filters, backdrop_filters, backdrop_filter_bounds, content_color_usage, has_transparent_background, +#if defined(TIZEN_VIDEO_HOLE) + has_video_hole, +#endif cache_render_pass, has_damage_from_contributing_content, generate_mipmap); diff --git a/components/viz/common/quads/aggregated_render_pass.h b/components/viz/common/quads/aggregated_render_pass.h index 5503b94..4f6497a 100644 --- a/components/viz/common/quads/aggregated_render_pass.h +++ b/components/viz/common/quads/aggregated_render_pass.h @@ -62,6 +62,9 @@ class VIZ_COMMON_EXPORT AggregatedRenderPass : public RenderPassInternal { const absl::optional& backdrop_filter_bounds, gfx::ContentColorUsage color_usage, bool has_transparent_background, +#if defined(TIZEN_VIDEO_HOLE) + bool has_video_hole, +#endif bool cache_render_pass, bool has_damage_from_contributing_content, bool generate_mipmap); diff --git a/components/viz/common/quads/compositor_render_pass.cc b/components/viz/common/quads/compositor_render_pass.cc index 2c97801..886f108 100644 --- a/components/viz/common/quads/compositor_render_pass.cc +++ b/components/viz/common/quads/compositor_render_pass.cc @@ -92,6 +92,9 @@ void CompositorRenderPass::SetAll( gfx::Size subtree_capture_size, ViewTransitionElementResourceId resource_id, bool has_transparent_background, +#if defined(TIZEN_VIDEO_HOLE) + bool has_video_hole, +#endif bool cache_render_pass, bool has_damage_from_contributing_content, bool generate_mipmap, @@ -109,6 +112,9 @@ void CompositorRenderPass::SetAll( this->subtree_size = subtree_capture_size; this->view_transition_element_resource_id = resource_id; this->has_transparent_background = has_transparent_background; +#if defined(TIZEN_VIDEO_HOLE) + this->has_video_hole = has_video_hole; +#endif this->cache_render_pass = cache_render_pass; this->has_damage_from_contributing_content = has_damage_from_contributing_content; @@ -196,9 +202,12 @@ std::unique_ptr CompositorRenderPass::DeepCopy() const { filters, backdrop_filters, backdrop_filter_bounds, subtree_capture_id, subtree_size, view_transition_element_resource_id, - has_transparent_background, cache_render_pass, - has_damage_from_contributing_content, generate_mipmap, - has_per_quad_damage); + has_transparent_background, +#if defined(TIZEN_VIDEO_HOLE) + has_video_hole, +#endif + cache_render_pass, has_damage_from_contributing_content, + generate_mipmap, has_per_quad_damage); if (shared_quad_state_list.empty()) { DCHECK(quad_list.empty()); diff --git a/components/viz/common/quads/compositor_render_pass.h b/components/viz/common/quads/compositor_render_pass.h index 97c2fb5..2c37d8e 100644 --- a/components/viz/common/quads/compositor_render_pass.h +++ b/components/viz/common/quads/compositor_render_pass.h @@ -77,6 +77,9 @@ class VIZ_COMMON_EXPORT CompositorRenderPass : public RenderPassInternal { gfx::Size subtree_capture_size, ViewTransitionElementResourceId resource_id, bool has_transparent_background, +#if defined(TIZEN_VIDEO_HOLE) + bool has_video_hole, +#endif bool cache_render_pass, bool has_damage_from_contributing_content, bool generate_mipmap, diff --git a/components/viz/common/quads/render_pass_internal.h b/components/viz/common/quads/render_pass_internal.h index cc2bacd..b533888 100644 --- a/components/viz/common/quads/render_pass_internal.h +++ b/components/viz/common/quads/render_pass_internal.h @@ -62,6 +62,11 @@ class VIZ_COMMON_EXPORT RenderPassInternal { // If false, the pixels in the render pass' texture are all opaque. bool has_transparent_background = true; +#if defined(TIZEN_VIDEO_HOLE) + // If true, disable blend when draw render pass quad + bool has_video_hole = false; +#endif + // If true we might reuse the texture if there is no damage. bool cache_render_pass = false; diff --git a/components/viz/common/transition_utils.cc b/components/viz/common/transition_utils.cc index 3d46bf86..a87dd98 100644 --- a/components/viz/common/transition_utils.cc +++ b/components/viz/common/transition_utils.cc @@ -229,7 +229,11 @@ TransitionUtils::CopyPassWithQuadFiltering( source_pass.backdrop_filters, source_pass.backdrop_filter_bounds, source_pass.subtree_capture_id, source_pass.subtree_size, source_pass.view_transition_element_resource_id, - source_pass.has_transparent_background, source_pass.cache_render_pass, + source_pass.has_transparent_background, +#if defined(TIZEN_VIDEO_HOLE) + source_pass.has_video_hole, +#endif + source_pass.cache_render_pass, source_pass.has_damage_from_contributing_content, source_pass.generate_mipmap, source_pass.has_per_quad_damage); diff --git a/components/viz/service/display/direct_renderer.cc b/components/viz/service/display/direct_renderer.cc index a52c7f2..003bbad 100644 --- a/components/viz/service/display/direct_renderer.cc +++ b/components/viz/service/display/direct_renderer.cc @@ -366,6 +366,12 @@ void DirectRenderer::DrawFrame( // Draw all non-root render passes except for the root render pass. for (const auto& pass : *render_passes_in_draw_order) { +#if defined(TIZEN_VIDEO_HOLE) + if (pass->has_video_hole) + current_frame()->has_video_hole = true; + else + current_frame()->has_video_hole = false; +#endif if (pass.get() == root_render_pass) break; DrawRenderPassAndExecuteCopyRequests(pass.get()); diff --git a/components/viz/service/display/direct_renderer.h b/components/viz/service/display/direct_renderer.h index aea178a..c242001 100644 --- a/components/viz/service/display/direct_renderer.h +++ b/components/viz/service/display/direct_renderer.h @@ -144,6 +144,11 @@ class VIZ_SERVICE_EXPORT DirectRenderer { gfx::AxisTransform2d target_to_device_transform; OverlayProcessorInterface::CandidateList overlay_list; + +#if defined(TIZEN_VIDEO_HOLE) + bool has_video_hole = false; +#endif + // When we have a buffer queue, the output surface could be treated as an // overlay plane, and the struct to store that information is in // |output_surface_plane|. diff --git a/components/viz/service/display/skia_renderer.cc b/components/viz/service/display/skia_renderer.cc index 3aabb29..c54bfa3 100644 --- a/components/viz/service/display/skia_renderer.cc +++ b/components/viz/service/display/skia_renderer.cc @@ -99,6 +99,10 @@ #include "components/viz/service/display/overlay_processor_surface_control.h" #endif +#if defined(TIZEN_VIDEO_HOLE) +#include "base/numerics/math_constants.h" +#endif + namespace viz { namespace { @@ -2284,15 +2288,38 @@ void SkiaRenderer::DrawColoredQuad(SkColor4f color, // account for the layer applying those effects. We need to truncate to an // integral value of [0, 255] to match the explicit floor workaround in // blink::ConversionContext::StartEffect. +#if defined(TIZEN_VIDEO_HOLE) + SkColor4f dst_color = color; + SkBlendMode blend_mode = params->blend_mode; + bool is_video_hole = + color == SkColors::kTransparent && (current_frame()->has_video_hole); + + // kSrc blend mode means disable blend + if (is_video_hole) { + blend_mode = SkBlendMode::kSrc; + if (std::fabs(1.f - params->opacity) > + std::numeric_limits::epsilon()) { + dst_color = SkColors::kBlack; + } + } + + dst_color.fA = floor(params->opacity * dst_color.fA * 255.f) / 255.f; +#else color.fA = floor(params->opacity * color.fA * 255.f) / 255.f; +#endif const SkPoint* draw_region = params->draw_region ? params->draw_region->points : nullptr; current_canvas_->experimental_DrawEdgeAAQuad( gfx::RectFToSkRect(params->visible_rect), draw_region, - static_cast(params->aa_flags), color, - params->blend_mode); + static_cast(params->aa_flags), +#if defined(TIZEN_VIDEO_HOLE) + dst_color, blend_mode +#else + color, params->blend_mode +#endif + ); } void SkiaRenderer::DrawSingleImage(const SkImage* image, diff --git a/components/viz/service/display/surface_aggregator.cc b/components/viz/service/display/surface_aggregator.cc index e7bd483..61c78e4 100644 --- a/components/viz/service/display/surface_aggregator.cc +++ b/components/viz/service/display/surface_aggregator.cc @@ -1003,6 +1003,9 @@ void SurfaceAggregator::EmitSurfaceContent( source.transform_to_root_target, source.filters, source.backdrop_filters, source.backdrop_filter_bounds, root_content_color_usage_, source.has_transparent_background, +#if defined(TIZEN_VIDEO_HOLE) + source.has_video_hole, +#endif source.cache_render_pass, resolved_pass.aggregation().has_damage, source.generate_mipmap); @@ -1244,6 +1247,9 @@ void SurfaceAggregator::AddColorConversionPass() { AddRenderPassHelper(color_conversion_render_pass_id_, output_rect, root_render_pass->damage_rect, root_content_color_usage_, root_render_pass->has_transparent_background, +#if defined(TIZEN_VIDEO_HOLE) + root_render_pass->has_video_hole, +#endif /*pass_is_color_conversion_pass=*/true, /*quad_state_to_target_transform=*/gfx::Transform(), /*quad_state_contents_opaque=*/false, SkBlendMode::kSrc, @@ -1302,6 +1308,9 @@ void SurfaceAggregator::AddRootReadbackPass() { AddRenderPassHelper(readback_render_pass_id_, output_rect, root_render_pass->damage_rect, root_content_color_usage_, has_transparent_background, +#if defined(TIZEN_VIDEO_HOLE) + root_render_pass->has_video_hole, +#endif /*pass_is_color_conversion_pass=*/false, /*quad_state_to_target_transform=*/gfx::Transform(), /*quad_state_contents_opaque=*/false, @@ -1336,6 +1345,9 @@ void SurfaceAggregator::AddDisplayTransformPass() { root_surface_transform_, root_render_pass->damage_rect), root_render_pass->content_color_usage, root_render_pass->has_transparent_background, +#if defined(TIZEN_VIDEO_HOLE) + root_render_pass->has_video_hole, +#endif /*pass_is_color_conversion_pass=*/false, root_surface_transform_, are_contents_opaque, SkBlendMode::kSrcOver, root_render_pass->id); } @@ -1346,6 +1358,9 @@ void SurfaceAggregator::AddRenderPassHelper( const gfx::Rect& render_pass_damage_rect, gfx::ContentColorUsage pass_color_usage, bool pass_has_transparent_background, +#if defined(TIZEN_VIDEO_HOLE) + bool pass_is_video_hole, +#endif bool pass_is_color_conversion_pass, const gfx::Transform& quad_state_to_target_transform, bool quad_state_contents_opaque, @@ -1360,6 +1375,9 @@ void SurfaceAggregator::AddRenderPassHelper( /*backdrop_filters=*/cc::FilterOperations(), /*backdrop_filter_bounds=*/gfx::RRectF(), pass_color_usage, pass_has_transparent_background, +#if defined(TIZEN_VIDEO_HOLE) + pass_is_video_hole, +#endif /*cache_render_pass=*/false, /*has_damage_from_contributing_content=*/false, /*generate_mipmap=*/false); @@ -1399,6 +1417,15 @@ void SurfaceAggregator::CopyQuadsToPass( const QuadList& source_quad_list = source_pass.quad_list; const SharedQuadState* last_copied_source_shared_quad_state = nullptr; +#if defined(TIZEN_VIDEO_HOLE) + // We have this flag for checking need to disable blend mode in GLRenderer + // We need to pass this flag to AggregatedRenderPass as it was created by + // Root surface id. + if (source_pass.has_video_hole) { + dest_pass->has_video_hole = true; + } +#endif + // If the current frame has copy requests or cached render passes, then // aggregate the entire thing, as otherwise parts of the copy requests may be // ignored and we could cache partially drawn render pass. @@ -1662,8 +1689,12 @@ void SurfaceAggregator::CopyPasses(ResolvedFrameData& resolved_frame) { resolved_pass.remapped_id(), output_rect, output_rect, transform_to_root_target, source.filters, source.backdrop_filters, source.backdrop_filter_bounds, root_content_color_usage_, - source.has_transparent_background, source.cache_render_pass, - resolved_pass.aggregation().has_damage, source.generate_mipmap); + source.has_transparent_background, +#if defined(TIZEN_VIDEO_HOLE) + source.has_video_hole, +#endif + source.cache_render_pass, resolved_pass.aggregation().has_damage, + source.generate_mipmap); UpdatePersistentPassDataMergeState(resolved_pass, copy_pass.get(), /*is_merged_pass=*/false); diff --git a/components/viz/service/display/surface_aggregator.h b/components/viz/service/display/surface_aggregator.h index c3e0063..6f1fa64 100644 --- a/components/viz/service/display/surface_aggregator.h +++ b/components/viz/service/display/surface_aggregator.h @@ -268,6 +268,9 @@ class VIZ_SERVICE_EXPORT SurfaceAggregator : public SurfaceObserver { const gfx::Rect& render_pass_damage_rect, gfx::ContentColorUsage pass_color_usage, bool pass_has_transparent_background, +#if defined(TIZEN_VIDEO_HOLE) + bool pass_is_video_hole, +#endif bool pass_is_color_conversion_pass, const gfx::Transform& quad_state_to_target_transform, bool quad_state_contents_opaque, diff --git a/services/viz/public/cpp/compositing/compositor_render_pass_mojom_traits.cc b/services/viz/public/cpp/compositing/compositor_render_pass_mojom_traits.cc index 40ac4e9..240da89 100644 --- a/services/viz/public/cpp/compositing/compositor_render_pass_mojom_traits.cc +++ b/services/viz/public/cpp/compositing/compositor_render_pass_mojom_traits.cc @@ -45,6 +45,9 @@ bool StructTraitshas_transparent_background = data.has_transparent_background(); +#if defined(TIZEN_VIDEO_HOLE) + (*out)->has_video_hole = data.has_video_hole(); +#endif (*out)->has_per_quad_damage = data.has_per_quad_damage(); (*out)->cache_render_pass = data.cache_render_pass(); diff --git a/services/viz/public/cpp/compositing/compositor_render_pass_mojom_traits.h b/services/viz/public/cpp/compositing/compositor_render_pass_mojom_traits.h index a491df6..7fc918b 100644 --- a/services/viz/public/cpp/compositing/compositor_render_pass_mojom_traits.h +++ b/services/viz/public/cpp/compositing/compositor_render_pass_mojom_traits.h @@ -83,6 +83,13 @@ struct StructTraitshas_transparent_background; } +#if defined(TIZEN_VIDEO_HOLE) + static bool has_video_hole( + const std::unique_ptr& input) { + return input->has_video_hole; + } +#endif + static bool has_per_quad_damage( const std::unique_ptr& input) { return input->has_per_quad_damage; diff --git a/services/viz/public/mojom/BUILD.gn b/services/viz/public/mojom/BUILD.gn index 64661c3..d3ee6e9 100644 --- a/services/viz/public/mojom/BUILD.gn +++ b/services/viz/public/mojom/BUILD.gn @@ -604,6 +604,10 @@ mojom("mojom") { if (tizen_tbm_support) { enabled_features += [ "tizen_tbm_support" ] } + + if (tizen_video_hole) { + enabled_features += [ "tizen_video_hole" ] + } } # The enum that SharedImageFormat uses internally to denote singleplanar diff --git a/services/viz/public/mojom/compositing/compositor_render_pass.mojom b/services/viz/public/mojom/compositing/compositor_render_pass.mojom index 4dca661..440b409 100644 --- a/services/viz/public/mojom/compositing/compositor_render_pass.mojom +++ b/services/viz/public/mojom/compositing/compositor_render_pass.mojom @@ -42,4 +42,7 @@ struct CompositorRenderPass { // inconsistent states give new privileges to the sender that were not already // available with |damage_rect| or |quad_list|. bool has_per_quad_damage; + + [EnableIf=tizen_video_hole] + bool has_video_hole = false; }; -- 2.7.4 From cf03b4a31031c4c51e8f0f170bef3bab8572b3d0 Mon Sep 17 00:00:00 2001 From: Manjeet Date: Wed, 21 Feb 2024 16:10:05 +0530 Subject: [PATCH 16/16] fixup! [M120 Migration] Enable snapshot feature for EFL port This commit adds sample code to test sync screenshot API in ubrowser. Reference: https://review.tizen.org/gerrit/298956 Change-Id: I9781243ac601361437d6330035f93a2d53aa9776 Signed-off-by: Manjeet --- tizen_src/ewk/ubrowser/window.cc | 19 +++++++++++++++---- tizen_src/ewk/ubrowser/window.h | 2 +- tizen_src/ewk/ubrowser/window_ui.cc | 12 +++++++++++- tizen_src/ewk/ubrowser/window_ui.h | 1 + 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/tizen_src/ewk/ubrowser/window.cc b/tizen_src/ewk/ubrowser/window.cc index 416fc30..721139d 100644 --- a/tizen_src/ewk/ubrowser/window.cc +++ b/tizen_src/ewk/ubrowser/window.cc @@ -434,13 +434,24 @@ void Window::SetAutoRotate() { (sizeof(rots) / sizeof(int))); } -void Window::TakeScreenshotAsync() { +void Window::TakeScreenshot(bool sync) { log_trace("%s", __PRETTY_FUNCTION__); Eina_Rectangle rect; EINA_RECTANGLE_SET(&rect, 0, 0, 400, 400); - ewk_view_screenshot_contents_get_async(web_view_, rect, 1.0, - evas_object_evas_get(web_view_), - &Window::OnScreenshotCaptured, NULL); + if (!sync) { + ewk_view_screenshot_contents_get_async(web_view_, rect, 1.0, + evas_object_evas_get(web_view_), + &Window::OnScreenshotCaptured, NULL); + return; + } + + Evas_Object* snapshot = ewk_view_screenshot_contents_get( + web_view_, rect, 1.0, evas_object_evas_get(web_view_)); + if (!snapshot) { + fprintf(stderr, "Failed to get snapshot sync\n"); + return; + } + OnScreenshotCaptured(snapshot, NULL); } #if BUILDFLAG(IS_TIZEN_TV) diff --git a/tizen_src/ewk/ubrowser/window.h b/tizen_src/ewk/ubrowser/window.h index 2eaad6a..d144a5e 100644 --- a/tizen_src/ewk/ubrowser/window.h +++ b/tizen_src/ewk/ubrowser/window.h @@ -52,7 +52,7 @@ class Window { void ShowInspectorURL(const char* url); void SetGoogleDataProxyHeaders() const; void SetAutoRotate(); - void TakeScreenshotAsync(); + void TakeScreenshot(bool sync); void Exit() const; IdType Id() const; diff --git a/tizen_src/ewk/ubrowser/window_ui.cc b/tizen_src/ewk/ubrowser/window_ui.cc index 7946def6..ff28560 100644 --- a/tizen_src/ewk/ubrowser/window_ui.cc +++ b/tizen_src/ewk/ubrowser/window_ui.cc @@ -316,6 +316,9 @@ Evas_Object* WindowUI::CreateExtraActionsMenu(Evas_Object* parent) { elm_ctxpopup_item_append(menu_, "Take screenshot async", NULL, &WindowUI::OnTakeScreenshotAsync, this); + elm_ctxpopup_item_append(menu_, "Take screenshot sync", NULL, + &WindowUI::OnTakeScreenshotSync, this); + elm_ctxpopup_item_append(menu_, "Quit", NULL, &WindowUI::Exit, this); return menu_; @@ -676,7 +679,14 @@ void WindowUI::OnShowZoomPopup(void* data, Evas_Object* obj, void*) { void WindowUI::OnTakeScreenshotAsync(void* data, Evas_Object* obj, void*) { log_trace("%s", __PRETTY_FUNCTION__); WindowUI* thiz = static_cast(data); - thiz->window_.TakeScreenshotAsync(); + thiz->window_.TakeScreenshot(false); + thiz->CloseMenu(); +} + +void WindowUI::OnTakeScreenshotSync(void* data, Evas_Object* obj, void*) { + log_trace("%s", __PRETTY_FUNCTION__); + WindowUI* thiz = static_cast(data); + thiz->window_.TakeScreenshot(true); thiz->CloseMenu(); } diff --git a/tizen_src/ewk/ubrowser/window_ui.h b/tizen_src/ewk/ubrowser/window_ui.h index b7a4ebf9..81bed26 100644 --- a/tizen_src/ewk/ubrowser/window_ui.h +++ b/tizen_src/ewk/ubrowser/window_ui.h @@ -90,6 +90,7 @@ class WindowUI { static void ClosePopup(void* data, Evas_Object*, void*); static void OnShowZoomPopup(void* data, Evas_Object*, void*); static void OnTakeScreenshotAsync(void* data, Evas_Object*, void*); + static void OnTakeScreenshotSync(void* data, Evas_Object*, void*); static void OnZoomChanged(void* data, Evas_Object*, void*); static void OnRememberFormDataChange(void* data, Evas_Object*, void*); static void OnRememberPasswordChange(void* data, Evas_Object*, void*); -- 2.7.4