From 0dc3209acce59d58969ebe7598e3afef15956538 Mon Sep 17 00:00:00 2001 From: v-saha Date: Wed, 8 Feb 2023 12:42:10 +0530 Subject: [PATCH 01/16] [M108 Migration] Fix default font size setting issue. Default font size was not changed by |ewk_settings_default_font_size_set|. This is because the set value was not delivered to renderer process. Changed to apply value by calling |ewkUpdateWebkitPreferences|. Reference: https://review.tizen.org/gerrit/280568 Change-Id: I9f3311a4a598fc1553d637bcb41d95b320f5c3d2 Signed-off-by: v-saha --- tizen_src/ewk/efl_integration/public/ewk_settings.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/tizen_src/ewk/efl_integration/public/ewk_settings.cc b/tizen_src/ewk/efl_integration/public/ewk_settings.cc index 1a8b3e8..57ea4cc 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_settings.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_settings.cc @@ -639,6 +639,7 @@ Eina_Bool ewk_settings_default_font_size_set(Ewk_Settings* settings, int size) { EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false); settings->getPreferences().default_font_size = size; + ewkUpdateWebkitPreferences(settings->getEvasObject()); return true; } -- 2.7.4 From 3807deafe2b914b9a3658f2b54712935baf94d60 Mon Sep 17 00:00:00 2001 From: v-saha Date: Thu, 9 Feb 2023 11:46:20 +0530 Subject: [PATCH 02/16] [M108 Migration] Support ecore mainloop on utility process Ecore events are not triggered on utility process as MessagePumpDefault is used as the message pump. This commit sets MessagePumpEcore as the message pump for utility process to support ecore events. Reference: https://review.tizen.org/gerrit/279393 Change-Id: If2b62fdef2bc9a44e446e37ba67d71c6f93b1845 Signed-off-by: v-saha --- content/utility/utility_main.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/utility/utility_main.cc b/content/utility/utility_main.cc index c15f7b9..3097f60 100644 --- a/content/utility/utility_main.cc +++ b/content/utility/utility_main.cc @@ -84,7 +84,11 @@ int UtilityMain(MainFunctionParams parameters) { base::MessagePumpType message_pump_type = parameters.command_line->HasSwitch(switches::kMessageLoopTypeUi) ? base::MessagePumpType::UI +#if BUILDFLAG(IS_EFL) + : base::MessagePumpType::ECORE; +#else : base::MessagePumpType::DEFAULT; +#endif #if BUILDFLAG(IS_MAC) auto sandbox_type = -- 2.7.4 From a46f4d4540151c912d6469e8e2eb6d3d398f6459 Mon Sep 17 00:00:00 2001 From: "ayush.k123" Date: Wed, 8 Feb 2023 15:08:50 +0530 Subject: [PATCH 03/16] [M108 Migration] Remove EWK_BRINGUP from ewk_back_forward_list_private This removes EWK_BRIRNGUP from the file and replaces deprecated notification types with methods in WebContentsObserver as per the reference in [1]. NOTIFICATION_NAV_ENTRY_CHANGED -> WebContentsObserver::NavigationEntryChanged NOTIFICATION_NAV_ENTRY_COMMITTED -> WebContentsObserver::NavigationEntryCommitted [1] https://chromium-review.googlesource.com/630420 Reference: https://review.tizen.org/gerrit/283901/ Change-Id: Ib980ae58958b734d3d1b92984095446e6dfb8f3f Signed-off-by: Ayush Kumar --- tizen_src/ewk/efl_integration/eweb_view.cc | 3 +- .../private/ewk_back_forward_list_private.cc | 47 ++++++---------------- .../private/ewk_back_forward_list_private.h | 18 ++++----- 3 files changed, 21 insertions(+), 47 deletions(-) diff --git a/tizen_src/ewk/efl_integration/eweb_view.cc b/tizen_src/ewk/efl_integration/eweb_view.cc index 741dce6..9238206 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.cc +++ b/tizen_src/ewk/efl_integration/eweb_view.cc @@ -2341,8 +2341,7 @@ void EWebView::InitializeContent() { wc_efl->SetEflDelegate(new WebContentsEflDelegateEwk(this)); wcva()->wcva_helper()->SetEflDelegate(wc_efl->GetEflDelegate()); - back_forward_list_.reset( - new _Ewk_Back_Forward_List(web_contents_->GetController())); + back_forward_list_.reset(new _Ewk_Back_Forward_List(web_contents_.get())); permission_popup_manager_.reset(new PermissionPopupManager(evas_object_)); gin_native_bridge_dispatcher_host_.reset( diff --git a/tizen_src/ewk/efl_integration/private/ewk_back_forward_list_private.cc b/tizen_src/ewk/efl_integration/private/ewk_back_forward_list_private.cc index 5f1bdc4..c2396c3 100644 --- a/tizen_src/ewk/efl_integration/private/ewk_back_forward_list_private.cc +++ b/tizen_src/ewk/efl_integration/private/ewk_back_forward_list_private.cc @@ -4,23 +4,13 @@ #include "ewk_back_forward_list_private.h" -#include "content/public/browser/notification_service.h" -#include "content/public/browser/notification_types.h" #include "content/public/browser/navigation_details.h" +#include "content/public/browser/web_contents.h" _Ewk_Back_Forward_List::_Ewk_Back_Forward_List( - content::NavigationController& controller) - : navigation_controller_(controller) { -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup - // FIXME: Removed in upversion. - notification_registrar_.Add( - this, content::NOTIFICATION_NAV_ENTRY_CHANGED, - content::NotificationService::AllBrowserContextsAndSources()); -#endif - notification_registrar_.Add( - this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, - content::NotificationService::AllBrowserContextsAndSources()); -} + content::WebContents* web_contents) + : content::WebContentsObserver(web_contents), + navigation_controller_(web_contents->GetController()) {} int _Ewk_Back_Forward_List::GetCurrentIndex() const { return navigation_controller_.GetCurrentEntryIndex(); @@ -89,27 +79,14 @@ void _Ewk_Back_Forward_List::ClearCache() { cache_.clear(); } -void _Ewk_Back_Forward_List::Observe( - int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) { - switch (static_cast(type)) { - case content::NOTIFICATION_NAV_ENTRY_COMMITTED: { - content::Details d = details; - NewPageCommited(d->previous_entry_index, d->entry); - break; - } -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup - // FIXME: Removed in upversion. - case content::NOTIFICATION_NAV_ENTRY_CHANGED: { - content::Details d = details; - const content::NavigationEntry* entry = d->changed_entry; - UpdateItemWithEntry(entry); - break; - } -#endif - default: { return; } - } +void _Ewk_Back_Forward_List::NavigationEntryCommitted( + const content::LoadCommittedDetails& load_details) { + NewPageCommited(load_details.previous_entry_index, load_details.entry); +} + +void _Ewk_Back_Forward_List::NavigationEntryChanged( + const content::EntryChangedDetails& change_details) { + UpdateItemWithEntry(change_details.changed_entry); } _Ewk_Back_Forward_List_Item* _Ewk_Back_Forward_List::FindOrCreateItem( diff --git a/tizen_src/ewk/efl_integration/private/ewk_back_forward_list_private.h b/tizen_src/ewk/efl_integration/private/ewk_back_forward_list_private.h index efb7cab..3c92d05 100644 --- a/tizen_src/ewk/efl_integration/private/ewk_back_forward_list_private.h +++ b/tizen_src/ewk/efl_integration/private/ewk_back_forward_list_private.h @@ -9,8 +9,7 @@ #include "base/strings/utf_string_conversions.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_entry.h" -#include "content/public/browser/notification_observer.h" -#include "content/public/browser/notification_registrar.h" +#include "content/public/browser/web_contents_observer.h" #include "private/back_forward_list.h" #include @@ -44,13 +43,13 @@ class _Ewk_Back_Forward_List_Item }; class _Ewk_Back_Forward_List : public back_forward_list::List, - public content::NotificationObserver { + public content::WebContentsObserver { public: typedef std::map> CacheMap; - _Ewk_Back_Forward_List(content::NavigationController& controller); + explicit _Ewk_Back_Forward_List(content::WebContents* web_contents); ~_Ewk_Back_Forward_List() {} int GetCurrentIndex() const override; @@ -64,19 +63,18 @@ class _Ewk_Back_Forward_List : public back_forward_list::List, void UpdateItemWithEntry(content::NavigationEntry* entry); void ClearCache(); - // FIXME: EWK_BRINGUP: Check the need. - void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details); + // content::WebContentsObserver implementation + void NavigationEntryCommitted( + const content::LoadCommittedDetails& load_details) override; + void NavigationEntryChanged( + const content::EntryChangedDetails& change_details) override; private: _Ewk_Back_Forward_List_Item* FindOrCreateItem(int index) const; void InsertEntryToIndexes(unsigned index, content::NavigationEntry* entry) const; - private: content::NavigationController& navigation_controller_; - content::NotificationRegistrar notification_registrar_; mutable CacheMap cache_; mutable std::vector indexes_; }; -- 2.7.4 From b88ab6b38b2a9c7ac864741f3d1909cd8ae0ad42 Mon Sep 17 00:00:00 2001 From: Koyyani Maheswari Date: Tue, 7 Feb 2023 15:04:55 +0530 Subject: [PATCH 04/16] fixup! [M108 Migration][MM] Handle buffering and playback This commit fixes crash when playing audio element. There is a case that video demuxer stream is used even if it doesn't exist. So prevent access to invalid demuxer stream. Reference: https://review.tizen.org/gerrit/280782/ Change-Id: I737793d799f657f4553ca4d3ffe2ea5fc2f6ed7c Signed-off-by: Koyyani Maheswari --- tizen_src/chromium_impl/media/filters/media_player_esplusplayer.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tizen_src/chromium_impl/media/filters/media_player_esplusplayer.cc b/tizen_src/chromium_impl/media/filters/media_player_esplusplayer.cc index baab703..077a93d 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_esplusplayer.cc +++ b/tizen_src/chromium_impl/media/filters/media_player_esplusplayer.cc @@ -756,6 +756,10 @@ esplusplayer_submit_status MediaPlayerESPlusPlayer::SubmitEsPacket( } void MediaPlayerESPlusPlayer::UpdateBufferedDtsDifference() { + // Ignore unless audio and video streams are valid. + if (!IsValid(DemuxerStream::AUDIO) || !IsValid(DemuxerStream::VIDEO)) + return; + const auto& audio_ts = last_frames_.get().first; const auto& video_ts = last_frames_.get().first; -- 2.7.4 From 3d23f5c0eeea5104a7ae89b5c8dd9eb79384cf89 Mon Sep 17 00:00:00 2001 From: Bakka Uday Kiran Date: Fri, 3 Feb 2023 12:56:33 +0530 Subject: [PATCH 05/16] [M108 Migration][API] Add ewk_settings_tizen_compatibility_mode_set API This API allows rendering the pages as if they are run with the specified engine version. The compatibility mode changes behavior of web features since they follow the newest specifications resulting in different behavior for content delivered for earlier engines. API will be applied by WRT/XWalk to support product patches for chromium-efl in compatibility mode with WebKit/Tizen 2.4. WebCore patches will be applied once compatibility mode is set. Checking whether engine has been launched with compatibility mode: * renderer: content::WebSettings::TizenCompatibilityModeEnabled() Blink::Settings::TizenCompatibilityModeEnabled() * ui: WebPreferencesEfl::TizenVersion::{major|minor|release|} Applying WebCore changes immediately after changing compatibility mode can be done inside Page::settingsChanged(TizenVersionChange). Ewk API can be tested with ubrowser by passing tizen-version | -t flag, for example, $ ubrowser -t 2.4 Also, this patch exposes TizenVersion on blink::web_pref::WebPreferences to allow client to check if compatibility mode is turned on. Struct TizenVersion has been replaced with individual elements in web_preferences.mojom for simplicity. Reference: https://review.tizen.org/gerrit/c/279762 Change-Id: I4c720a371846fdef4d01dada80723d32bd5ef2fa Signed-off-by: Bakka Uday Kiran --- .../public/common/web_preferences/web_preferences.h | 9 +++++++++ .../web_preferences/web_preferences_mojom_traits.h | 17 +++++++++++++++++ .../mojom/webpreferences/web_preferences.mojom | 9 +++++++++ .../blink/public/platform/web_runtime_features.h | 1 + third_party/blink/public/web/web_settings.h | 4 ++++ .../renderer/core/exported/web_settings_impl.cc | 12 ++++++++++++ .../renderer/core/exported/web_settings_impl.h | 5 +++++ .../blink/renderer/core/exported/web_view_impl.cc | 6 ++++++ third_party/blink/renderer/core/frame/settings.cc | 21 +++++++++++++++++++++ third_party/blink/renderer/core/frame/settings.h | 14 ++++++++++++++ .../blink/renderer/core/frame/settings_delegate.h | 3 +++ third_party/blink/renderer/core/page/page.cc | 12 ++++++++++++ .../platform/exported/web_runtime_features.cc | 5 +++++ .../platform/runtime_enabled_features.json5 | 3 +++ .../ewk/efl_integration/public/ewk_settings.cc | 8 ++++++-- tizen_src/ewk/ubrowser/window.cc | 9 +++++++++ 16 files changed, 136 insertions(+), 2 deletions(-) diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h index f908293..651f9e7 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences.h +++ b/third_party/blink/public/common/web_preferences/web_preferences.h @@ -271,6 +271,15 @@ struct BLINK_COMMON_EXPORT WebPreferences { float default_minimum_page_scale_factor; float default_maximum_page_scale_factor; +#if BUILDFLAG(IS_EFL) + bool TizenCompatibilityModeEnabled() const { + return (tizen_version_major && tizen_version_major < 3); + } + unsigned tizen_version_major = 7; + unsigned tizen_version_minor = 5; + unsigned tizen_version_release = 0; +#endif + // Whether download UI should be hidden on this page. bool hide_download_ui; diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h index e3290de..2b741fd 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h +++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h @@ -764,6 +764,23 @@ struct BLINK_COMMON_EXPORT StructTraits