From a43f40781444e8d4f4bdb72295de8bc9da03c6c9 Mon Sep 17 00:00:00 2001 From: liuxd Date: Mon, 20 Feb 2023 15:44:46 +0800 Subject: [PATCH 01/16] [M108 Migration][VD] Support device 1. Allow to show IME by the Enter key in RC device For TV profile, to support the new requirement that allow to show IME by the Enter key in Remote Control device. Now add a parameter in web keyboard event to mark if the key event is from RC; and use "is_from_rc" and "windows_key_code == ui::VKEY_RETURN" to distinguish the Enter key in Remote Control device. Migrated from M94_aura: https://review.tizen.org/gerrit/#/c/281776 2.Support device name property in keyboard event There is a requirement from HotelTV product team to support device name property in keyboard event: Some 3rd-party want to distinguish by device name when key event fired between devices. Refer: https://review.tizen.org/gerrit/#/c/+/282276 Signed-off-by: liuxd Change-Id: I05d8e28afe2b12ccf1d281c7634bab380a0e5b90 --- .../ui/ozone/platform/efl/efl_event_handler.cc | 12 ++++++++++++ .../ui/ozone/platform/efl/efl_keycode_map.h | 20 -------------------- ui/events/blink/web_input_event.cc | 7 +++++++ ui/events/event.cc | 4 ++++ ui/events/event.h | 5 +++++ ui/events/event_utils.h | 9 +++++++++ ui/events/events_default.cc | 14 ++++++++++++++ 7 files changed, 51 insertions(+), 20 deletions(-) diff --git a/tizen_src/chromium_impl/ui/ozone/platform/efl/efl_event_handler.cc b/tizen_src/chromium_impl/ui/ozone/platform/efl/efl_event_handler.cc index 3031154..544c3ca 100644 --- a/tizen_src/chromium_impl/ui/ozone/platform/efl/efl_event_handler.cc +++ b/tizen_src/chromium_impl/ui/ozone/platform/efl/efl_event_handler.cc @@ -303,6 +303,18 @@ KeyEvent MakeWebKeyEvent(bool pressed, const EVT* evt) { KeyEvent event(type, windows_key_code, domCode, key_modifiers, domKey, base::TimeTicks::Now(), false); +#if BUILDFLAG(IS_TIZEN_TV) + const char* device_name = evas_device_name_get(evt->dev); + if (device_name) { + // We need distinguish if key is from RC in render process + if (IsRCDevice(evas_device_class_get(evt->dev), device_name)) + event.is_from_rc = true; + + // Add device name property in keyboard event. + event.device_name = device_name; + } +#endif + #else KeyEvent event(type, windows_key_code, key_modifiers, base::TimeTicks::Now()); #endif diff --git a/tizen_src/chromium_impl/ui/ozone/platform/efl/efl_keycode_map.h b/tizen_src/chromium_impl/ui/ozone/platform/efl/efl_keycode_map.h index aa8a622..7c0e258 100644 --- a/tizen_src/chromium_impl/ui/ozone/platform/efl/efl_keycode_map.h +++ b/tizen_src/chromium_impl/ui/ozone/platform/efl/efl_keycode_map.h @@ -11,26 +11,6 @@ namespace ui { -// TV RC device names -const std::string kDeviceNameSmartView = "SMART_VIEW"; -const std::string kDeviceNamePanelKey = "wt61p807 panel key device"; -const std::string kDeviceNameRemote = "wt61p807 rc device"; -const std::string kDeviceNameSmartRC = "Smart Control"; -// To allow to receive Tomato send key events -const std::string kDeviceNameAutoModeDevice = "AUTO_MODE_DEVICE"; -const std::string kDeviceNameIME = "ime"; - -bool IsRCDevice(Evas_Device_Class device_id, const std::string device_name) { - if (device_id == EVAS_DEVICE_CLASS_KEYBOARD) { - return (!device_name.compare(kDeviceNameRemote) || - !device_name.compare(kDeviceNameSmartView) || - !device_name.compare(kDeviceNamePanelKey) || - !device_name.compare(kDeviceNameAutoModeDevice) || - device_name.find(kDeviceNameSmartRC) != std::string::npos); - } - return false; -} - static ui::KeyboardCode UIKeyCodeFromEflKey(const char* key) { static std::unordered_map code_from_key_map({ {"Shift_L", ui::VKEY_SHIFT}, diff --git a/ui/events/blink/web_input_event.cc b/ui/events/blink/web_input_event.cc index bacbcac..9933003 100644 --- a/ui/events/blink/web_input_event.cc +++ b/ui/events/blink/web_input_event.cc @@ -95,6 +95,13 @@ blink::WebKeyboardEvent MakeWebKeyboardEventFromUiEvent(const KeyEvent& event) { #if BUILDFLAG(IS_EFL) webkit_event.is_system_key = event.is_system_key; #endif +#if BUILDFLAG(IS_TIZEN_TV) + webkit_event.is_from_rc = event.is_from_rc; + + strncpy(webkit_event.device_name, event.device_name.c_str(), + sizeof(webkit_event.device_name) - 1); + webkit_event.device_name[sizeof(webkit_event.device_name) - 1] = '\0'; +#endif return webkit_event; } diff --git a/ui/events/event.cc b/ui/events/event.cc index 21cafe7..9e35019 100644 --- a/ui/events/event.cc +++ b/ui/events/event.cc @@ -831,6 +831,10 @@ KeyEvent::KeyEvent(const PlatformEvent& native_event, int event_flags) #if BUILDFLAG(IS_EFL) is_system_key(IsSystemKeyFromNative(native_event)), #endif +#if BUILDFLAG(IS_TIZEN_TV) + is_from_rc(IsFromRCFromNative(native_event)), + device_name(DeviceNameFromNative(native_event)), +#endif is_char_(IsCharFromNative(native_event)) { #if defined(USE_OZONE) DCHECK(native_event->IsKeyEvent()); diff --git a/ui/events/event.h b/ui/events/event.h index fc78a03..5543e94 100644 --- a/ui/events/event.h +++ b/ui/events/event.h @@ -911,6 +911,11 @@ class EVENTS_EXPORT KeyEvent : public Event { bool is_system_key = false; #endif +#if BUILDFLAG(IS_TIZEN_TV) + bool is_from_rc = false; + std::string device_name; +#endif + protected: friend class KeyEventTestApi; diff --git a/ui/events/event_utils.h b/ui/events/event_utils.h index ca4e631..6bd2233 100644 --- a/ui/events/event_utils.h +++ b/ui/events/event_utils.h @@ -126,6 +126,15 @@ EVENTS_EXPORT DomKey KeyFromNative(const PlatformEvent& native_event); EVENTS_EXPORT bool IsSystemKeyFromNative(const PlatformEvent& native_event); #endif +#if BUILDFLAG(IS_TIZEN_TV) +// Returns the |is_from_rc| value from a native event. +EVENTS_EXPORT bool IsFromRCFromNative(const PlatformEvent& native_event); + +// Returns the |device_name| value from a native event. +EVENTS_EXPORT std::string DeviceNameFromNative( + const PlatformEvent& native_event); +#endif + // Returns true if the keyboard event is a character event rather than // a keystroke event. EVENTS_EXPORT bool IsCharFromNative(const PlatformEvent& native_event); diff --git a/ui/events/events_default.cc b/ui/events/events_default.cc index c434740..741e925 100644 --- a/ui/events/events_default.cc +++ b/ui/events/events_default.cc @@ -99,6 +99,20 @@ bool IsSystemKeyFromNative(const PlatformEvent& native_event) { } #endif +#if BUILDFLAG(IS_TIZEN_TV) +bool IsFromRCFromNative(const PlatformEvent& native_event) { + const ui::KeyEvent* event = static_cast(native_event); + DCHECK(event->IsKeyEvent()); + return event->is_from_rc; +} + +std::string DeviceNameFromNative(const PlatformEvent& native_event) { + const ui::KeyEvent* event = static_cast(native_event); + DCHECK(event->IsKeyEvent()); + return event->device_name; +} +#endif + bool IsCharFromNative(const PlatformEvent& native_event) { const ui::KeyEvent* event = static_cast(native_event); DCHECK(event->IsKeyEvent()); -- 2.7.4 From f1d660486e7f4dfc694e2c73ece2fe977f1bb326 Mon Sep 17 00:00:00 2001 From: Sun-woo Nam Date: Thu, 2 Jun 2022 19:10:48 -0700 Subject: [PATCH 02/16] [M108 Migration][MM] Handle BufferingState for playback - Fix the issue that time is not changed when video is playing. - Ignore "underrun" for changing ready state. Reference: https://review.tizen.org/gerrit/275855 https://review.tizen.org/gerrit/284178 Change-Id: I57386011655b774f7038685801a6a8622a293c26 Signed-off-by: Sun-woo Nam --- tizen_src/chromium_impl/media/filters/media_player_esplusplayer.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 c2084bb..30c306c 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_esplusplayer.cc +++ b/tizen_src/chromium_impl/media/filters/media_player_esplusplayer.cc @@ -871,11 +871,7 @@ void MediaPlayerESPlusPlayer::OnBufferingStatusChanged(DemuxerStream::Type type, // TODO: Check if controller can control underflow. Currently buffering // related state changes are commented for the same (in Play and // RequestStateChange). - if (status == kBufferUnderrun) { - GetRendererClient(type)->OnBufferingStateChange(BUFFERING_HAVE_NOTHING, - DEMUXER_UNDERFLOW); - } else if (status == kBufferMaxThreshold || status == kBufferOverflow || - status == kBufferAhead || status == kBufferEos) { + if (status != kBufferNone) { GetRendererClient(type)->OnBufferingStateChange( BUFFERING_HAVE_ENOUGH, BUFFERING_CHANGE_REASON_UNKNOWN); } -- 2.7.4 From b2ebeb1be826d424b67c8e8f264bb41be3a2d6dc Mon Sep 17 00:00:00 2001 From: Chandan Padhi Date: Tue, 21 Feb 2023 14:34:27 +0530 Subject: [PATCH 03/16] [M108 Migration][clang] set default value for _clang variable This commit enables clang build by default for VD QB. Reference: https://review.tizen.org/gerrit/274246/ Change-Id: I5b5932598d2f3235afefb04a5e62b9fd3f268395 Signed-off-by: Chandan Padhi --- packaging/chromium-efl.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packaging/chromium-efl.spec b/packaging/chromium-efl.spec index 7c436d8..04fa71a 100644 --- a/packaging/chromium-efl.spec +++ b/packaging/chromium-efl.spec @@ -176,6 +176,10 @@ BuildRequires: binutils-gold %define ARCHITECTURE x86_64 %endif +%if "%{?tizen_profile_name}" == "tv" +%{!?_clang: %define _clang 1} +%endif + %if "%{?_clang}" == "1" && "%{ARCHITECTURE}" == "armv7l" %define __use_clang 1 %else -- 2.7.4 From 1ffa1ca0af1958ab6aa9b07aeaca5677cde3eb30 Mon Sep 17 00:00:00 2001 From: Venugopal S M Date: Mon, 18 Jul 2022 18:10:35 -0700 Subject: [PATCH 04/16] [M108 Migration][MM] Handle PlaybackRate. - Enable call to setPlaybackRate - Delay setting playback rate if player is not prepared(HBBTV) Reference: https://review.tizen.org/gerrit/278307 https://review.tizen.org/gerrit/278434 https://review.tizen.org/gerrit/281298 https://review.tizen.org/gerrit/288027 Change-Id: Ib82d363fb0c5f8e585a10967a3d913cd2eb181d3 Signed-off-by: Venugopal S M --- .../content/browser/media/tizen_renderer_impl.cc | 9 ++++----- .../media/base/tizen/media_player_bridge_capi.cc | 17 +++++++++++++++++ .../media/base/tizen/media_player_bridge_capi.h | 1 + .../media/filters/media_player_esplusplayer.cc | 2 +- .../media/filters/media_player_esplusplayer.h | 2 +- 5 files changed, 24 insertions(+), 7 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 19667a5..f45686c 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 @@ -432,13 +432,12 @@ void TizenRendererImpl::SetPlaybackRate(double playback_rate) { playback_rate_ = playback_rate; - // TODO: Random error is observed on TM1. - // EsppPlayer::GetEsppPlayer()->SetRate(playback_rate_); - - if (playback_rate > 0) + if (playback_rate > 0) { + GetPlayer()->SetRate(playback_rate_); GetPlayer()->Play(); - else + } else { GetPlayer()->Pause(); + } } void TizenRendererImpl::SetVolume(float volume) { diff --git a/tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.cc b/tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.cc index 6da6d56..9eefb6aa 100644 --- a/tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.cc +++ b/tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.cc @@ -128,6 +128,7 @@ MediaPlayerBridgeCapi::MediaPlayerBridgeCapi(int player_id, is_seeking_(false), is_play_pending_(false), is_initialized_(false), + is_set_playback_rate_delayed_(false), duration_(0), playback_time_(0), seek_duration_(0), @@ -302,11 +303,21 @@ void MediaPlayerBridgeCapi::Play() { return; } + if (GetPlayerState() < PLAYER_STATE_READY) { + delayed_player_state_ = PLAYER_STATE_DELAYED_PLAY; + return; + } + if (playback_rate_ == 0.0) { is_paused_ = false; return; } + if (is_set_playback_rate_delayed_) { + is_set_playback_rate_delayed_ = false; + SetRate(playback_rate_); + } + if (player_start(player_) != PLAYER_ERROR_NONE) { LOG(ERROR) << "|player_start| failed"; return; @@ -358,6 +369,12 @@ void MediaPlayerBridgeCapi::SetRate(double rate) { return; } + if (GetPlayerState() < PLAYER_STATE_READY) { + playback_rate_ = rate; + is_set_playback_rate_delayed_ = true; + return; + } + if (!is_file_url_ && player_set_streaming_playback_rate(player_, static_cast(rate)) != PLAYER_ERROR_NONE) { diff --git a/tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.h b/tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.h index 396abe9..59d4133 100644 --- a/tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.h +++ b/tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.h @@ -105,6 +105,7 @@ class MEDIA_EXPORT MediaPlayerBridgeCapi : public MediaPlayerEfl { bool is_play_pending_; bool is_player_released_; bool is_initialized_; + bool is_set_playback_rate_delayed_; double duration_; double playback_time_; 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 30c306c..a1b03fd 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_esplusplayer.cc +++ b/tizen_src/chromium_impl/media/filters/media_player_esplusplayer.cc @@ -459,7 +459,7 @@ void MediaPlayerESPlusPlayer::SetRate(double rate) { int error = esplusplayer_set_playback_rate(esplayer_, playback_rate_, should_mute); if (error != ESPLUSPLAYER_ERROR_TYPE_NONE) { - LOG(ERROR) << "player pause failed! error #" + LOG(ERROR) << "player set playback rate failed! error #" << esplusplayer_get_error_string( static_cast(error)); return; diff --git a/tizen_src/chromium_impl/media/filters/media_player_esplusplayer.h b/tizen_src/chromium_impl/media/filters/media_player_esplusplayer.h index 72e0f6d..1f80bd7 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_esplusplayer.h +++ b/tizen_src/chromium_impl/media/filters/media_player_esplusplayer.h @@ -161,7 +161,7 @@ class MEDIA_EXPORT MediaPlayerESPlusPlayer : public MediaPlayerTizen { last_frames_; double volume_ = 1.0; - bool playback_rate_ = 0.0; + double playback_rate_ = 0.0; bool is_prepared_ = false; bool is_preparing_ = false; bool is_paused_ = true; -- 2.7.4 From 1ad279a4bf3025d99a7ede5d861ae89a2d2fb4c0 Mon Sep 17 00:00:00 2001 From: Venugopal S M Date: Thu, 9 Jun 2022 19:23:40 +0530 Subject: [PATCH 05/16] [M108 Migration][MM] MediaSourceExperimental experimental feature Enables TrackDefaultList that SourceBuffer may consult. It causes MSE webTCT failure. Reference: https://review.tizen.org/gerrit/276105 Change-Id: Ic93e9656632e7cc6b920524ac74a620b1db0e471 Signed-off-by: Venugopal S M --- third_party/blink/renderer/platform/runtime_enabled_features.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index 503c566..5d8bf04 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 @@ -1663,7 +1663,7 @@ }, { name: "MediaSourceExperimental", - status: "experimental", + status: "stable", }, { name: "MediaSourceExtensionsForWebCodecs", -- 2.7.4 From 55ecc3eb01529375cc6abf7297ca69444e330cdc Mon Sep 17 00:00:00 2001 From: "ayush.k123" Date: Mon, 20 Feb 2023 09:56:12 +0530 Subject: [PATCH 06/16] [M108 Migration] Add Overscroll related callbacks & Bringup Edge Effect feature This patch adds overscroll related callbacks, - overscrolled,left - overscrolled,right - overscrolled,top - overscrolled,bottom They will be invoked when overscroll occurs for specific element. Edge Effect is a glow like effect shown when webpage is overscrolled horizontally or vertically to give an indication to user that the webpage contents end at that point. Browser is notified with 'DidOverscroll' and 'DidUpdateMainFrameLayout' to keep track of overscroll and contents size changes. References: https://review.tizen.org/gerrit/282151/ Change-Id: I2fcdfd64c68619705f695f6253b00709d7ea903b Signed-off-by: Ayush Kumar --- .../renderer_host/render_widget_host_view_aura.cc | 4 + content/public/renderer/render_frame_observer.h | 1 + content/renderer/render_frame_impl.cc | 8 + content/renderer/render_frame_impl.h | 1 + third_party/blink/public/web/web_local_frame.h | 5 + .../blink/public/web/web_local_frame_client.h | 1 + .../blink/renderer/core/frame/local_dom_window.cc | 12 + .../blink/renderer/core/frame/local_dom_window.h | 7 + .../blink/renderer/core/frame/local_frame_client.h | 3 + .../renderer/core/frame/local_frame_client_impl.cc | 10 + .../renderer/core/frame/local_frame_client_impl.h | 3 + .../renderer/core/frame/web_local_frame_impl.cc | 11 + .../renderer/core/frame/web_local_frame_impl.h | 3 + third_party/blink/renderer/core/frame/window.idl | 4 + .../content/browser/renderer_host/edge_effect.cc | 123 ++++--- .../content/browser/renderer_host/edge_effect.h | 29 +- .../rwhv_aura_offscreen_helper_efl.cc | 77 ++++- .../renderer_host/rwhv_aura_offscreen_helper_efl.h | 7 + .../web_contents_view_aura_helper_efl.cc | 5 +- .../public/browser/web_contents_efl_delegate.h | 4 + tizen_src/chromium_impl/edje_resources/Edge.edc | 356 ++++++++++++++++++++- .../images/b_end_effect_bottom_bg.png | Bin 0 -> 2468 bytes .../images/b_end_effect_bottom_edge_bg.png | Bin 0 -> 2357 bytes .../edje_resources/images/b_end_effect_left_bg.png | Bin 0 -> 3019 bytes .../images/b_end_effect_left_edge_bg.png | Bin 0 -> 2824 bytes .../images/b_end_effect_right_bg.png | Bin 0 -> 3020 bytes .../images/b_end_effect_right_edge_bg.png | Bin 0 -> 2768 bytes .../edje_resources/images/b_end_effect_top_bg.png | Bin 0 -> 2479 bytes .../images/b_end_effect_top_edge_bg.png | Bin 0 -> 2339 bytes .../efl_integration/common/render_messages_ewk.h | 6 + .../renderer/render_frame_observer_efl.cc | 8 + .../renderer/render_frame_observer_efl.h | 2 + .../web_contents_efl_delegate_ewk.cc | 6 + .../web_contents_efl_delegate_ewk.h | 3 + .../efl_integration/web_contents_observer_efl.cc | 16 + .../efl_integration/web_contents_observer_efl.h | 3 + 36 files changed, 638 insertions(+), 80 deletions(-) create mode 100755 tizen_src/chromium_impl/edje_resources/images/b_end_effect_bottom_bg.png create mode 100755 tizen_src/chromium_impl/edje_resources/images/b_end_effect_bottom_edge_bg.png create mode 100755 tizen_src/chromium_impl/edje_resources/images/b_end_effect_left_bg.png create mode 100755 tizen_src/chromium_impl/edje_resources/images/b_end_effect_left_edge_bg.png create mode 100755 tizen_src/chromium_impl/edje_resources/images/b_end_effect_right_bg.png create mode 100755 tizen_src/chromium_impl/edje_resources/images/b_end_effect_right_edge_bg.png create mode 100755 tizen_src/chromium_impl/edje_resources/images/b_end_effect_top_bg.png create mode 100755 tizen_src/chromium_impl/edje_resources/images/b_end_effect_top_edge_bg.png diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index 8b3a5ce..133558d 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -1108,6 +1108,10 @@ void RenderWidgetHostViewAura::DidOverscroll( const ui::DidOverscrollParams& params) { if (overscroll_controller_) overscroll_controller_->OnDidOverscroll(params); +#if BUILDFLAG(IS_EFL) + if (offscreen_helper_) + offscreen_helper_->DidOverscroll(params); +#endif } void RenderWidgetHostViewAura::GestureEventAck( diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h index d1d08d3..5dc7166 100644 --- a/content/public/renderer/render_frame_observer.h +++ b/content/public/renderer/render_frame_observer.h @@ -127,6 +127,7 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, virtual void DidCreateNewDocument() {} virtual void DidCreateDocumentElement() {} #if BUILDFLAG(IS_EFL) + virtual void AddEdgeEffectForUIF(bool, bool, bool, bool) {} virtual void PlayLinkEffect() {} virtual void PrintToPdf(int width, int height, diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc index 859a801..7be59b4 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc @@ -3914,6 +3914,14 @@ void RenderFrameImpl::DidDispatchDOMContentLoadedEvent() { } #if BUILDFLAG(IS_EFL) +void RenderFrameImpl::AddEdgeEffectForUIF(bool top, + bool bottom, + bool left, + bool right) { + for (auto& observer : observers_) + observer.AddEdgeEffectForUIF(top, bottom, right, left); +} + void RenderFrameImpl::PlayLinkEffect() { for (auto& observer : observers_) observer.PlayLinkEffect(); diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h index d09efdb..d22f0f8 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h @@ -541,6 +541,7 @@ class CONTENT_EXPORT RenderFrameImpl void DidClearWindowObject() override; void DidCreateDocumentElement() override; #if BUILDFLAG(IS_EFL) + void AddEdgeEffectForUIF(bool, bool, bool, bool) override; void PlayLinkEffect() override; void PrintToPdf(int width, int height, diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h index d3b3529..6ec3917 100644 --- a/third_party/blink/public/web/web_local_frame.h +++ b/third_party/blink/public/web/web_local_frame.h @@ -716,6 +716,11 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame { // The size of the document in this frame. virtual gfx::Size DocumentSize() const = 0; +#if BUILDFLAG(IS_TIZEN) + // The size of the scrollable content size in this frame. + virtual gfx::Size ScrollableContentSize() const = 0; +#endif + // Returns true if the contents (minus scrollbars) has non-zero area. virtual bool HasVisibleContent() const = 0; diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h index e927f2d..3fe6c51 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h @@ -382,6 +382,7 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateDocumentElement() {} #if BUILDFLAG(IS_EFL) + virtual void AddEdgeEffectForUIF(bool, bool, bool, bool) {} virtual void PlayLinkEffect() {} virtual void PrintToPdf(int width, int height, diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc index f18293c..7458c2c 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc @@ -1417,6 +1417,18 @@ bool LocalDOMWindow::find(const String& string, return Editor::FindString(*GetFrame(), string, options); } +#if BUILDFLAG(IS_EFL) +void LocalDOMWindow::addEdgeEffectONSCROLLTizenUIF(bool top, + bool bottom, + bool right, + bool left) const { +#if BUILDFLAG(IS_TIZEN) + if (GetFrame() && GetFrame()->Client()) + GetFrame()->Client()->AddEdgeEffectForUIF(top, bottom, right, left); +#endif +} +#endif + bool LocalDOMWindow::offscreenBuffering() const { return true; } diff --git a/third_party/blink/renderer/core/frame/local_dom_window.h b/third_party/blink/renderer/core/frame/local_dom_window.h index 9373ba0..08f0d78 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.h +++ b/third_party/blink/renderer/core/frame/local_dom_window.h @@ -317,6 +317,13 @@ class CORE_EXPORT LocalDOMWindow final : public DOMWindow, void moveBy(int x, int y) const; void moveTo(int x, int y) const; +#if BUILDFLAG(IS_EFL) + void addEdgeEffectONSCROLLTizenUIF(bool top, + bool bottom, + bool right, + bool left) const; +#endif + void resizeBy(int x, int y) const; void resizeTo(int width, int height) const; diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h index dda91c4..1ecad0e 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h @@ -298,6 +298,9 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { virtual void RunScriptsAtDocumentElementAvailable() = 0; virtual void RunScriptsAtDocumentReady(bool document_is_empty) = 0; virtual void RunScriptsAtDocumentIdle() = 0; +#if BUILDFLAG(IS_EFL) + virtual void AddEdgeEffectForUIF(bool, bool, bool, bool) {} +#endif virtual void DidCreateScriptContext(v8::Local, int32_t world_id) = 0; diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc index 4f233e8..a195252 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc @@ -208,6 +208,16 @@ void LocalFrameClientImpl::DocumentElementAvailable() { web_frame_->Client()->DidCreateDocumentElement(); } +#if BUILDFLAG(IS_EFL) +void LocalFrameClientImpl::AddEdgeEffectForUIF(bool top, + bool bottom, + bool right, + bool left) { + if (web_frame_->Client()) + web_frame_->Client()->AddEdgeEffectForUIF(top, bottom, right, left); +} +#endif + void LocalFrameClientImpl::RunScriptsAtDocumentElementAvailable() { if (web_frame_->Client()) web_frame_->Client()->RunScriptsAtDocumentElementAvailable(); diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h index 210ce94..df85a91 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h @@ -77,6 +77,9 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { void RunScriptsAtDocumentElementAvailable() override; void RunScriptsAtDocumentReady(bool document_is_empty) override; void RunScriptsAtDocumentIdle() override; +#if BUILDFLAG(IS_EFL) + void AddEdgeEffectForUIF(bool, bool, bool, bool) override; +#endif void DidCreateScriptContext(v8::Local, int32_t world_id) override; diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc index 15ef698..5e4f00b 100644 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc @@ -1720,6 +1720,17 @@ void WebLocalFrameImpl::DeleteSurroundingText(int before, int after) { GetFrame()->GetInputMethodController().DeleteSurroundingText(before, after); } +#if BUILDFLAG(IS_TIZEN) +gfx::Size WebLocalFrameImpl::ScrollableContentSize() const { + if (!GetFrameView() || !GetFrameView()->GetLayoutView()) + return gfx::Size(); + + return gfx::Size( + ToPixelSnappedRect(GetFrameView()->GetLayoutView()->DocumentRect()) + .size()); +} +#endif + void WebLocalFrameImpl::DeleteSurroundingTextInCodePoints(int before, int after) { TRACE_EVENT0("blink", "WebLocalFrameImpl::deleteSurroundingTextInCodePoints"); diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h index f25bb3a..6031575 100644 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h @@ -363,6 +363,9 @@ class CORE_EXPORT WebLocalFrameImpl final session_storage_area) override; void AddHitTestOnTouchStartCallback( base::RepeatingCallback callback) override; +#if BUILDFLAG(IS_TIZEN) + gfx::Size ScrollableContentSize() const override; +#endif // WebNavigationControl overrides: bool DispatchBeforeUnloadEvent(bool) override; diff --git a/third_party/blink/renderer/core/frame/window.idl b/third_party/blink/renderer/core/frame/window.idl index 79b54e2..3e0afa5 100644 --- a/third_party/blink/renderer/core/frame/window.idl +++ b/third_party/blink/renderer/core/frame/window.idl @@ -143,6 +143,10 @@ void scrollBy(optional ScrollToOptions options = {}); void scrollBy(unrestricted double x, unrestricted double y); + // This API is called from TAU library to show edge effect manually. + // It is added to match with the Tizen 2.3 compatibility. + void addEdgeEffectONSCROLLTizenUIF(boolean top, boolean bottom, boolean right, boolean left); + // Visual Viewport API // https://github.com/WICG/ViewportAPI [Replaceable, SameObject] readonly attribute VisualViewport visualViewport; diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/edge_effect.cc b/tizen_src/chromium_impl/content/browser/renderer_host/edge_effect.cc index a4e3648..c6b52e3 100644 --- a/tizen_src/chromium_impl/content/browser/renderer_host/edge_effect.cc +++ b/tizen_src/chromium_impl/content/browser/renderer_host/edge_effect.cc @@ -35,7 +35,11 @@ namespace content { namespace { -bool g_force_disable_edge_effect = false; + +// To enable or disable Edge Effect globally. By default enabled. +bool g_edge_effect_enabled = true; + +const base::TimeDelta kEffectDuration = base::Milliseconds(200); void viewResizeCallback(void* data, Evas*, Evas_Object* view, void*) { int width, height; @@ -58,10 +62,7 @@ void viewHideCallback(void* data, Evas*, Evas_Object* view, void*) { } } -EdgeEffect::EdgeEffect(Evas_Object* parent) - : enabled_(true) - , parent_view_(parent) - , edge_object_(NULL) { +EdgeEffect::EdgeEffect(Evas_Object* parent) : parent_view_(parent) { DCHECK(parent); edge_object_ = edje_object_add(evas_object_evas_get(parent)); @@ -74,10 +75,8 @@ EdgeEffect::EdgeEffect(Evas_Object* parent) CHECK(edje_object_file_set(edge_object_, edge_edj.AsUTF8Unsafe().c_str(), "edge_effect")); - int x, y, width, height; - evas_object_geometry_get(parent, &x, &y, &width, &height); - evas_object_move(edge_object_, x, y); - evas_object_resize(edge_object_, width, height); + UpdateRect(); + evas_object_show(edge_object_); evas_object_pass_events_set(edge_object_, EINA_TRUE); @@ -92,6 +91,8 @@ EdgeEffect::EdgeEffect(Evas_Object* parent) } EdgeEffect::~EdgeEffect() { + if (effect_timer_) + ecore_timer_del(effect_timer_); evas_object_del(edge_object_); evas_object_event_callback_del(parent_view_, EVAS_CALLBACK_RESIZE, viewResizeCallback); @@ -105,57 +106,67 @@ EdgeEffect::~EdgeEffect() { //static void EdgeEffect::EnableGlobally(bool enable) { - g_force_disable_edge_effect = !enable; -} + g_edge_effect_enabled = enable; +} + +const std::string EdgeEffect::GetSourceString(const Direction direction) { + switch (direction) { + case TOP: + return std::string("edge,top"); + case BOTTOM: + return std::string("edge,bottom"); + case LEFT: + return std::string("edge,left"); + case RIGHT: + return std::string("edge,right"); + default: + return std::string(); + } +} + +void EdgeEffect::ShowOrHide(const Direction direction, bool show) { + if (direction < TOP || direction > RIGHT) + return; -void EdgeEffect::Show(const std::string& source) { - if (!enabled_ || g_force_disable_edge_effect) + if (show && !enabled_) return; - const char* state = 0; - double ret = 0; - if (source.find("top") != std::string::npos) - state = edje_object_part_state_get(edge_object_, "edge_effect_top", &ret); - else if (source.find("bottom") != std::string::npos) - state = edje_object_part_state_get(edge_object_, "edge_effect_bottom", &ret); - else if (source.find("left") != std::string::npos) - state = edje_object_part_state_get(edge_object_, "edge_effect_left", &ret); - else if (source.find("right") != std::string::npos) - state = edje_object_part_state_get(edge_object_, "edge_effect_right", &ret); - - if (state && !strcmp(state, "visible")) + if ((show && visible_[direction]) || (!show && !visible_[direction])) return; - edje_object_signal_emit(edge_object_, "edge,show", source.c_str()); -} + visible_[direction] = show; -void EdgeEffect::Hide(const std::string& source) { - const char* state = 0; - double ret = 0; - if (source.find("top") != std::string::npos) - state = edje_object_part_state_get(edge_object_, "edge_effect_top", &ret); - else if (source.find("bottom") != std::string::npos) - state = edje_object_part_state_get(edge_object_, "edge_effect_bottom", &ret); - else if (source.find("left") != std::string::npos) - state = edje_object_part_state_get(edge_object_, "edge_effect_left", &ret); - else if (source.find("right") != std::string::npos) - state = edje_object_part_state_get(edge_object_, "edge_effect_right", &ret); + if (show) + UpdateRect(); - if (state && strcmp(state, "visible")) - return; + std::string msg; + msg = show ? "edge,show" : "edge,hide"; + + edje_object_signal_emit(edge_object_, msg.c_str(), + GetSourceString(direction).c_str()); +} - edje_object_signal_emit(edge_object_, "edge,hide", source.c_str()); +bool EdgeEffect::IsVisible() const { + return visible_[TOP] || visible_[BOTTOM] || visible_[LEFT] || visible_[RIGHT]; } void EdgeEffect::Hide() { - edje_object_signal_emit(edge_object_, "edge,hide", "edge,top"); - edje_object_signal_emit(edge_object_, "edge,hide", "edge,bottom"); - edje_object_signal_emit(edge_object_, "edge,hide", "edge,left"); - edje_object_signal_emit(edge_object_, "edge,hide", "edge,right"); + if (!IsVisible() || effect_timer_) + return; + + std::string msg = "edge,hide"; + for (int i = TOP; i <= RIGHT; i++) { + if (visible_[i]) { + edje_object_signal_emit( + edge_object_, msg.c_str(), + GetSourceString(static_cast(i)).c_str()); + visible_[i] = false; + } + } } void EdgeEffect::Enable() { - enabled_ = true; + enabled_ = g_edge_effect_enabled; } void EdgeEffect::ResizeObject(int width, int height) { @@ -183,4 +194,24 @@ void EdgeEffect::Disable() { enabled_ = false; } +void EdgeEffect::UpdateRect() { + int x, y, w, h; + evas_object_geometry_get(parent_view_, &x, &y, &w, &h); + + int x1, y1, w1, h1; + evas_object_geometry_get(edge_object_, &x1, &y1, &w1, &h1); + if (gfx::Rect(x, y, w, h) == gfx::Rect(x1, y1, w1, h1)) + return; + + evas_object_move(edge_object_, x, y); + evas_object_resize(edge_object_, w, h); +} + +Eina_Bool EdgeEffect::OnEffectTimerExpired(void* data) { + auto edge_effect = static_cast(data); + edge_effect->effect_timer_ = nullptr; + edge_effect->Hide(); + return ECORE_CALLBACK_CANCEL; +} + } // namespace content diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/edge_effect.h b/tizen_src/chromium_impl/content/browser/renderer_host/edge_effect.h index d63e8ca..eaceb89 100644 --- a/tizen_src/chromium_impl/content/browser/renderer_host/edge_effect.h +++ b/tizen_src/chromium_impl/content/browser/renderer_host/edge_effect.h @@ -26,22 +26,30 @@ #ifndef EDGE_EFFECT_H #define EDGE_EFFECT_H +#include #include #include +#include "base/time/time.h" #include "content/common/content_export.h" +#include "ui/gfx/geometry/rect.h" namespace content { class CONTENT_EXPORT EdgeEffect { public: + enum Direction { TOP = 1, BOTTOM, LEFT, RIGHT }; + EdgeEffect(Evas_Object* view); ~EdgeEffect(); + EdgeEffect(const EdgeEffect&) = delete; + EdgeEffect& operator=(const EdgeEffect&) = delete; + static void EnableGlobally(bool enable); - void Show(const std::string& source); - void Hide(const std::string& source); + void ShowOrHide(const Direction direction, bool show); + void Hide(); void Enable(); void Disable(); @@ -51,12 +59,23 @@ class CONTENT_EXPORT EdgeEffect { void ShowObject(); void HideObject(); + void UpdateRect(); + private: - // Is this instance of EdgeEffect enabled. - bool enabled_; + const std::string GetSourceString(const Direction direction); + bool IsVisible() const; + + static Eina_Bool OnEffectTimerExpired(void* data); Evas_Object* parent_view_; - Evas_Object* edge_object_; + Evas_Object* edge_object_ = nullptr; + + // Flag is set when edge effect is enabled. + bool enabled_ = true; + bool visible_[RIGHT + 1] = {false}; + + gfx::Rect rect_; + Ecore_Timer* effect_timer_ = nullptr; }; } // namespace content diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc index f85b628..a283e89 100644 --- a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc +++ b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc @@ -1273,8 +1273,11 @@ bool RWHVAuraOffscreenHelperEfl::TouchEventsEnabled() { } EdgeEffect& RWHVAuraOffscreenHelperEfl::EnsureEdgeEffect() { - if (!edge_effect_) + if (!edge_effect_) { edge_effect_ = base::WrapUnique(new EdgeEffect(content_image_)); + edge_effect_->UpdateRect(); + } + return *edge_effect_.get(); } @@ -1358,20 +1361,76 @@ void RWHVAuraOffscreenHelperEfl::HandleGesture(blink::WebGestureEvent& event) { fling_cancel.SetType(blink::WebInputEvent::Type::kGestureFlingCancel); fling_cancel.SetSourceDevice(blink::WebGestureDevice::kTouchscreen); SendGestureEvent(fling_cancel); + } else if (event_type == blink::WebInputEvent::Type::kGesturePinchBegin) { + EnsureEdgeEffect().Disable(); + } else if (event_type == blink::WebInputEvent::Type::kGesturePinchEnd) { + EnsureEdgeEffect().Enable(); } else if (event_type == blink::WebInputEvent::Type::kGestureScrollUpdate) { if (event.data.scroll_update.delta_x < 0) - EnsureEdgeEffect().Hide("edge,left"); + EnsureEdgeEffect().ShowOrHide(EdgeEffect::Direction::LEFT, false); else if (event.data.scroll_update.delta_x > 0) - EnsureEdgeEffect().Hide("edge,right"); + EnsureEdgeEffect().ShowOrHide(EdgeEffect::Direction::RIGHT, false); if (event.data.scroll_update.delta_y < 0) - EnsureEdgeEffect().Hide("edge,top"); + EnsureEdgeEffect().ShowOrHide(EdgeEffect::Direction::TOP, false); else if (event.data.scroll_update.delta_y > 0) - EnsureEdgeEffect().Hide("edge,bottom"); - } else if (event_type == blink::WebInputEvent::Type::kGesturePinchBegin) { - EnsureEdgeEffect().Disable(); - } else if (event_type == blink::WebInputEvent::Type::kGesturePinchEnd) { - EnsureEdgeEffect().Enable(); + EnsureEdgeEffect().ShowOrHide(EdgeEffect::Direction::BOTTOM, false); } } +#if BUILDFLAG(IS_TIZEN) +void RWHVAuraOffscreenHelperEfl::OnEdgeEffectForUIF(bool top, + bool bottom, + bool right, + bool left) { + EnsureEdgeEffect().Enable(); + + if (top) + EnsureEdgeEffect().ShowOrHide(EdgeEffect::Direction::TOP, true); + if (bottom) + EnsureEdgeEffect().ShowOrHide(EdgeEffect::Direction::BOTTOM, true); + if (left) + EnsureEdgeEffect().ShowOrHide(EdgeEffect::Direction::LEFT, true); + if (right) + EnsureEdgeEffect().ShowOrHide(EdgeEffect::Direction::RIGHT, true); + + EnsureEdgeEffect().Hide(); + EnsureEdgeEffect().Disable(); +} +#endif + +void RWHVAuraOffscreenHelperEfl::DidOverscroll( + const ui::DidOverscrollParams& params) { + if (web_contents_) { + WebContentsImpl* wc = static_cast(web_contents_); + WebContentsViewAura* wcva = + static_cast(wc->GetView()); + wcva->wcva_helper()->OnOverscrolled(params.accumulated_overscroll, + params.latest_overscroll_delta); + } + + const gfx::Vector2dF& accumulated_overscroll = params.accumulated_overscroll; + const gfx::Vector2dF& latest_overscroll_delta = + params.latest_overscroll_delta; + + if (GetScrollableSize().width() > 0) { + if (latest_overscroll_delta.x() < 0 && (int)accumulated_overscroll.x() < 0) + EnsureEdgeEffect().ShowOrHide(EdgeEffect::Direction::LEFT, true); + if (latest_overscroll_delta.x() > 0 && (int)accumulated_overscroll.x() > 0) + EnsureEdgeEffect().ShowOrHide(EdgeEffect::Direction::RIGHT, true); + } + + if (GetScrollableSize().height() > 0) { + if (latest_overscroll_delta.y() < 0 && + (int)accumulated_overscroll.y() < 0) { + EnsureEdgeEffect().ShowOrHide(EdgeEffect::Direction::TOP, true); + } + if (latest_overscroll_delta.y() > 0 && (int)accumulated_overscroll.y() > 0) + EnsureEdgeEffect().ShowOrHide(EdgeEffect::Direction::BOTTOM, true); + } +} + +void RWHVAuraOffscreenHelperEfl::UpdateEdgeEffect() { + EnsureEdgeEffect().UpdateRect(); +} + } // namespace content diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.h b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.h index 37d1dbe..e195e6b 100644 --- a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.h +++ b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.h @@ -35,6 +35,7 @@ namespace ui { class EflEventHandler; class IMContextEfl; +struct DidOverscrollParams; } // namespace ui namespace content { @@ -97,6 +98,11 @@ class CONTENT_EXPORT RWHVAuraOffscreenHelperEfl { } int GetTopControlsHeight(); + void DidOverscroll(const ui::DidOverscrollParams& params); +#if BUILDFLAG(IS_TIZEN) + void OnEdgeEffectForUIF(bool, bool, bool, bool); +#endif + void Focus(bool focus); bool HasFocus(); void SetPageVisibility(bool visible); @@ -125,6 +131,7 @@ class CONTENT_EXPORT RWHVAuraOffscreenHelperEfl { RenderWidgetHostViewAura* rwhva() { return rwhv_aura_; } void OnGestureEvent(ui::GestureEvent* event); EdgeEffect& EnsureEdgeEffect(); + void UpdateEdgeEffect(); void HandleGestureBegin(); void HandleGestureEnd(); void SendGestureEvent(blink::WebGestureEvent& event); diff --git a/tizen_src/chromium_impl/content/browser/web_contents/web_contents_view_aura_helper_efl.cc b/tizen_src/chromium_impl/content/browser/web_contents/web_contents_view_aura_helper_efl.cc index 067a13a..8b2ea46 100644 --- a/tizen_src/chromium_impl/content/browser/web_contents/web_contents_view_aura_helper_efl.cc +++ b/tizen_src/chromium_impl/content/browser/web_contents/web_contents_view_aura_helper_efl.cc @@ -169,11 +169,10 @@ bool WebContentsViewAuraHelperEfl::ImeHandleKeyEventEnabled() const { void WebContentsViewAuraHelperEfl::OnOverscrolled( const gfx::Vector2dF& accumulated_overscroll, const gfx::Vector2dF& latest_overscroll_delta) { -#if !defined(EWK_BRINGUP) - if (efl_delegate_) + if (efl_delegate_) { efl_delegate_->OnOverscrolled(accumulated_overscroll, latest_overscroll_delta); -#endif + } } } // namespace content diff --git a/tizen_src/chromium_impl/content/public/browser/web_contents_efl_delegate.h b/tizen_src/chromium_impl/content/public/browser/web_contents_efl_delegate.h index 0b25d66..502073a 100644 --- a/tizen_src/chromium_impl/content/public/browser/web_contents_efl_delegate.h +++ b/tizen_src/chromium_impl/content/public/browser/web_contents_efl_delegate.h @@ -75,6 +75,10 @@ class CONTENT_EXPORT WebContentsEflDelegate { ui::TextInputType dialog_type, double dialog_value, content::DateTimeChooserEfl* date_chooser) = 0; + + virtual void OnOverscrolled( + const gfx::Vector2dF& accumulated_overscroll, + const gfx::Vector2dF& latest_overscroll_delta) = 0; }; } // namespace content diff --git a/tizen_src/chromium_impl/edje_resources/Edge.edc b/tizen_src/chromium_impl/edje_resources/Edge.edc index 9878a66..22a7a33 100644 --- a/tizen_src/chromium_impl/edje_resources/Edge.edc +++ b/tizen_src/chromium_impl/edje_resources/Edge.edc @@ -26,6 +26,14 @@ collections { group { name: "edge_effect"; images { + image: "b_end_effect_bottom_bg.png" COMP; + image: "b_end_effect_bottom_edge_bg.png" COMP; + image: "b_end_effect_top_bg.png" COMP; + image: "b_end_effect_top_edge_bg.png" COMP; + image: "b_end_effect_left_bg.png" COMP; + image: "b_end_effect_left_edge_bg.png" COMP; + image: "b_end_effect_right_bg.png" COMP; + image: "b_end_effect_right_edge_bg.png" COMP; image: "overscrolling_dark_top.png" COMP; image: "overscrolling_dark_bottom.png" COMP; image: "overscrolling_dark_left.png" COMP; @@ -33,7 +41,7 @@ collections { } parts { - part { name: "clipper"; + part { name: "clipper1"; type: RECT; scale: 1; description { state: "default" 0.0; @@ -42,6 +50,40 @@ collections { color: 255 255 255 0; } } + part { name: "clipper2"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + rel1.offset: -3 -3; + rel2.offset: 3 3; + color: 255 255 255 0; + } + } + + part { name: "edge_effect_top_wearable"; + type: IMAGE; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + min: 0 76; + max: -1 76; + fixed: 0 1; + align: 0.5 1.0; + color: 66 151 255 0; + visible: 0; + rel1 { relative: 0.0 0.0; to: "clipper2"; } + rel2 { relative: 1.0 0.0; to: "clipper2"; } + image.normal: "b_end_effect_top_edge_bg.png"; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "hidden" 0.0; + inherit: "default" 0.0; + } + } part { name: "edge_effect_top"; type: IMAGE; scale: 1; @@ -52,8 +94,8 @@ collections { align: 0.5 0.0; color: 255 255 255 100; visible: 0; - rel1 { relative: 0.0 0.0; to: "clipper"; } - rel2 { relative: 1.0 0.0; to: "clipper"; } + rel1 { relative: 0.0 0.0; to: "clipper1"; } + rel2 { relative: 1.0 0.0; to: "clipper1"; } image.normal: "overscrolling_dark_top.png"; } description { state: "visible" 0.0; @@ -65,6 +107,54 @@ collections { inherit: "default" 0.0; } } + part { name: "edge_glow_top"; + type: IMAGE; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + min: 0 70; + max: -1 70; + fixed: 0 1; + align: 0.5 1.0; + color: 66 151 255 51; + visible: 0; + rel1 { relative: 0.0 0.0; to: "clipper2"; } + rel2 { relative: 1.0 0.0; to: "clipper2"; } + image.normal: "b_end_effect_top_bg.png"; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + align: 0.5 0.0; + visible: 1; + } + description { state: "hidden" 0.0; + inherit: "default" 0.0; + } + } + part { name: "edge_effect_bottom_wearable"; + type: IMAGE; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + min: 0 76; + max: -1 76; + fixed: 0 1; + align: 0.5 0.0; + color: 66 151 255 0; + visible: 0; + rel1 { relative: 0.0 1.0; to: "clipper2"; } + rel2 { relative: 1.0 1.0; to: "clipper2"; } + image.normal: "b_end_effect_bottom_edge_bg.png"; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "hidden" 0.0; + inherit: "default" 0.0; + } + } part { name: "edge_effect_bottom"; type: IMAGE; scale: 1; @@ -75,8 +165,8 @@ collections { align: 0.5 1.0; color: 255 255 255 100; visible: 0; - rel1 { relative: 0.0 1.0; to: "clipper"; } - rel2 { relative: 1.0 1.0; to: "clipper"; } + rel1 { relative: 0.0 1.0; to: "clipper1"; } + rel2 { relative: 1.0 1.0; to: "clipper1"; } image.normal: "overscrolling_dark_bottom.png"; } description { state: "visible" 0.0; @@ -88,6 +178,54 @@ collections { inherit: "default" 0.0; } } + part { name: "edge_glow_bottom"; + type: IMAGE; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + min: 0 70; + max: -1 70; + fixed: 0 1; + align: 0.5 0.0; + color: 66 151 255 51; + visible: 0; + rel1 { relative: 0.0 1.0; to: "clipper2"; } + rel2 { relative: 1.0 1.0; to: "clipper2"; } + image.normal: "b_end_effect_bottom_bg.png"; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + align: 0.5 1.0; + } + description { state: "hidden" 0.0; + inherit: "default" 0.0; + } + } + part { name: "edge_effect_left_wearable"; + type: IMAGE; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + min: 76 0; + max: 76 -1; + fixed: 1 0; + align: 1.0 0.5; + color: 66 151 255 0; + visible: 0; + rel1 { relative: 0.0 0.0; to: "clipper2"; } + rel2 { relative: 0.0 1.0; to: "clipper2"; } + image.normal: "b_end_effect_left_edge_bg.png"; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "hidden" 0.0; + inherit: "default" 0.0; + } + } part { name: "edge_effect_left"; type: IMAGE; scale: 1; @@ -98,8 +236,8 @@ collections { align: 0.0 0.5; color: 255 255 255 100; visible: 0; - rel1 { relative: 0.0 0.0; to: "clipper"; } - rel2 { relative: 0.0 1.0; to: "clipper"; } + rel1 { relative: 0.0 0.0; to: "clipper1"; } + rel2 { relative: 0.0 1.0; to: "clipper1"; } image.normal: "overscrolling_dark_left.png"; } description { state: "visible" 0.0; @@ -111,6 +249,54 @@ collections { inherit: "default" 0.0; } } + part { name: "edge_glow_left"; + type: IMAGE; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + min: 70 0; + max: 70 -1; + fixed: 1 0; + align: 1.0 0.5; + color: 66 151 255 51; + visible: 0; + rel1 { relative: 0.0 0.0; to: "clipper2"; } + rel2 { relative: 0.0 1.0; to: "clipper2"; } + image.normal: "b_end_effect_left_bg.png"; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + align: 0.0 0.5; + } + description { state: "hidden" 0.0; + inherit: "default" 0.0; + } + } + part { name: "edge_effect_right_wearable"; + type: IMAGE; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + min: 76 0; + max: 76 -1; + fixed: 1 0; + align: 0.0 0.5; + color: 66 151 255 0; + visible: 0; + rel1 { relative: 1.0 0.0; to: "clipper2"; } + rel2 { relative: 1.0 1.0; to: "clipper2"; } + image.normal: "b_end_effect_right_edge_bg.png"; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { state: "hidden" 0.0; + inherit: "default" 0.0; + } + } part { name: "edge_effect_right"; type: IMAGE; scale: 1; @@ -121,8 +307,8 @@ collections { align: 1.0 0.5; color: 255 255 255 100; visible: 0; - rel1 { relative: 1.0 0.0; to: "clipper"; } - rel2 { relative: 1.0 1.0; to: "clipper"; } + rel1 { relative: 1.0 0.0; to: "clipper1"; } + rel2 { relative: 1.0 1.0; to: "clipper1"; } image.normal: "overscrolling_dark_right.png"; } description { state: "visible" 0.0; @@ -134,64 +320,200 @@ collections { inherit: "default" 0.0; } } + part { name: "edge_glow_right"; + type: IMAGE; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + min: 70 0; + max: 70 -1; + fixed: 1 0; + align: 0.0 0.5; + color: 66 151 255 51; + visible: 0; + rel1 { relative: 1.0 0.0; to: "clipper2"; } + rel2 { relative: 1.0 1.0; to: "clipper2"; } + image.normal: "b_end_effect_right_bg.png"; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + align: 1.0 0.5; + } + description { state: "hidden" 0.0; + inherit: "default" 0.0; + } + } } programs { + program { name: "edge_top_show_wearable"; + signal: "edge,show,wearable"; + source: "edge,top"; + action: STATE_SET "visible" 0.0; + transition: CUBIC_BEZIER 0.2 0.25 0.46 0.45 1.0; + target: "edge_effect_top_wearable"; + } program { name: "edge_top_show"; signal: "edge,show"; source: "edge,top"; action: STATE_SET "visible" 0.0; - transition: LINEAR 0.5; + transition: LINEAR 0.2; target: "edge_effect_top"; } + program { name: "glow_top_show"; + signal: "glow,show"; + source: "edge,top"; + action: STATE_SET "visible" 0.0; + transition: CUBIC_BEZIER 0.2 0.25 0.46 0.45 1.0; + target: "edge_glow_top"; + } + program { name: "edge_bottom_show_wearable"; + signal: "edge,show,wearable"; + source: "edge,bottom"; + action: STATE_SET "visible" 0.0; + transition: CUBIC_BEZIER 0.2 0.25 0.46 0.45 1.0; + target: "edge_effect_bottom_wearable"; + } program { name: "edge_bottom_show"; signal: "edge,show"; source: "edge,bottom"; action: STATE_SET "visible" 0.0; - transition: LINEAR 0.5; + transition: LINEAR 0.2; target: "edge_effect_bottom"; } + program { name: "glow_bottom_show"; + signal: "glow,show"; + source: "edge,bottom"; + action: STATE_SET "visible" 0.0; + transition: CUBIC_BEZIER 0.2 0.25 0.46 0.45 1.0; + target: "edge_glow_bottom"; + } + program { name: "edge_left_show_wearable"; + signal: "edge,show,wearable"; + source: "edge,left"; + action: STATE_SET "visible" 0.0; + transition: CUBIC_BEZIER 0.2 0.25 0.46 0.45 1.0; + target: "edge_effect_left_wearable"; + } program { name: "edge_left_show"; signal: "edge,show"; source: "edge,left"; action: STATE_SET "visible" 0.0; - transition: LINEAR 0.5; + transition: LINEAR 0.2; target: "edge_effect_left"; } + program { name: "glow_left_show"; + signal: "glow,show"; + source: "edge,left"; + action: STATE_SET "visible" 0.0; + transition: CUBIC_BEZIER 0.2 0.25 0.46 0.45 1.0; + target: "edge_glow_left"; + } + program { name: "edge_right_show_wearable"; + signal: "edge,show,wearable"; + source: "edge,right"; + action: STATE_SET "visible" 0.0; + transition: CUBIC_BEZIER 0.2 0.25 0.46 0.45 1.0; + target: "edge_effect_right_wearable"; + } program { name: "edge_right_show"; signal: "edge,show"; source: "edge,right"; action: STATE_SET "visible" 0.0; - transition: LINEAR 0.5; + transition: LINEAR 0.2; target: "edge_effect_right"; } + program { name: "glow_right_show"; + signal: "glow,show"; + source: "edge,right"; + action: STATE_SET "visible" 0.0; + transition: CUBIC_BEZIER 0.2 0.25 0.46 0.45 1.0; + target: "edge_glow_right"; + } + program { name: "edge_top_hide_wearable"; + signal: "edge,hide,wearable"; + source: "edge,top"; + action: STATE_SET "hidden" 0.0; + transition: CUBIC_BEZIER 0.2 0.25 0.46 0.45 1.0; + target: "edge_effect_top_wearable"; + } program { name: "edge_top_hide"; signal: "edge,hide"; source: "edge,top"; action: STATE_SET "hidden" 0.0; - transition: LINEAR 0.5; + transition: LINEAR 0.2; target: "edge_effect_top"; } + program { name: "glow_top_hide"; + signal: "glow,hide"; + source: "edge,top"; + action: STATE_SET "hidden" 0.0; + transition: CUBIC_BEZIER 0.2 0.25 0.46 0.45 1.0; + target: "edge_glow_top"; + } + program { name: "edge_bottom_hide_wearable"; + signal: "edge,hide,wearable"; + source: "edge,bottom"; + action: STATE_SET "hidden" 0.0; + transition: CUBIC_BEZIER 0.2 0.25 0.46 0.45 1.0; + target: "edge_effect_bottom_wearable"; + } program { name: "edge_bottom_hide"; signal: "edge,hide"; source: "edge,bottom"; action: STATE_SET "hidden" 0.0; - transition: LINEAR 0.5; + transition: LINEAR 0.2; target: "edge_effect_bottom"; } + program { name: "glow_bottom_hide"; + signal: "glow,hide"; + source: "edge,bottom"; + action: STATE_SET "hidden" 0.0; + transition: CUBIC_BEZIER 0.2 0.25 0.46 0.45 1.0; + target: "edge_glow_bottom"; + } + program { name: "edge_left_hide_wearable"; + signal: "edge,hide,wearable"; + source: "edge,left"; + action: STATE_SET "hidden" 0.0; + transition: CUBIC_BEZIER 0.2 0.25 0.46 0.45 1.0; + target: "edge_effect_left_wearable"; + } program { name: "edge_left_hide"; signal: "edge,hide"; source: "edge,left"; action: STATE_SET "hidden" 0.0; - transition: LINEAR 0.5; + transition: LINEAR 0.2; target: "edge_effect_left"; } + program { name: "glow_left_hide"; + signal: "glow,hide"; + source: "edge,left"; + action: STATE_SET "hidden" 0.0; + transition: CUBIC_BEZIER 0.2 0.25 0.46 0.45 1.0; + target: "edge_glow_left"; + } + program { name: "edge_right_hide_wearable"; + signal: "edge,hide,wearable"; + source: "edge,right"; + action: STATE_SET "hidden" 0.0; + transition: CUBIC_BEZIER 0.2 0.25 0.46 0.45 1.0; + target: "edge_effect_right_wearable"; + } program { name: "edge_right_hide"; signal: "edge,hide"; source: "edge,right"; action: STATE_SET "hidden" 0.0; - transition: LINEAR 0.5; + transition: LINEAR 0.2; target: "edge_effect_right"; } + program { name: "glow_right_hide"; + signal: "glow,hide"; + source: "edge,right"; + action: STATE_SET "hidden" 0.0; + transition: CUBIC_BEZIER 0.2 0.25 0.46 0.45 1.0; + target: "edge_glow_right"; + } } } } diff --git a/tizen_src/chromium_impl/edje_resources/images/b_end_effect_bottom_bg.png b/tizen_src/chromium_impl/edje_resources/images/b_end_effect_bottom_bg.png new file mode 100755 index 0000000000000000000000000000000000000000..61c54a498a931e860966ef2fe50dbf87b551ad0c GIT binary patch literal 2468 zcma)8YgAKL77ik!QB(vJ@j-}>0z#6T2YE<M#Q3gSUiCDk~=|U8!%#DJbA5K^Ak9+so_xtv@&p!K{ zb@D<(HrSw@&?pqjCNO}*N1-g@5Ib`AEad(0x$I};vlQk=!r{zC!60ENe##_Ze0?0sEgi*;7n^oUY=rt7ZpRL;{XbkN~U^Xhy;LwCy?+Yf+vy0 zAQKp5B4+BrB5DfBP6nUDo6v>Rq(kxV~ML6#UC{3)hg zTL#MEKn@d&{J}}25(bIGW3zcg7L^3hxfB3E44OZIL~JrPt57PJK*>rs^YVP0EeBLclRybi0m(2Q>dTORMxV~668tGt&a^&_ z%LC|C3f-Sf;;<YJFtzY4d<`WXC9w zt+Cp>ryPZ{x*y142~__c>fV$P5#e}scwc6OyQj>}JsT}p==T_I!m0DzQ}_S%GU+)ztXa` z>PdOWctN~f^R_DsCkrw%4vo6~4yMbXUUh+~F$AzB(J2{~32?-=GjZ>`}6cIS6( z2U}zgXs2RuP1niqid>)AO{ksvuIF^ebi9apnACKg)TVNc6Fhzzb6KfPNoQ^=b}(f; zUSjP0{q-rs5`)k%3omPUpEDfVeqvt3lE%=e8jsMB;~F5p_dP$Vs%GSN2#?L`Yl(VV z_8d$*S=Z*fY^ja=6YI*Ga~p1M8jr`rq3t=bqkA@oAADPNYX29&VnN}H$(Y)-V`&5B zFY&FZt-#)(|helteuQUFPX1qu^ zbS>QAmOsPlwO*k!+3L1im0H!WxL!8aKu>I3ZL02S?%V4YyQMt}Of7vSl+SL&SiIYg zr>efx<6D*gVzFY&x=T_6^asK)S9dFDdY08bOF{MDsvbG?#@A-vsS8etObO|{g7D`(<`@kNp|3qe%N;FJ*#@2Ah9Tw} zizS9T>CQ>zV?@0C$z-H$^Rugsdv+nc(5Nel*A8mw`IcZpSXo$^FbSBCc8YjQ65N_I z9CN-jaO;%-w2aW&=Tjch6aIE?2y4|EC%ftaeZDT#OYPS6RdKhYJ(+*2$0>cEB0_V4 zeZV)Vt9OktXW`>>$c14kDTXf8f2rq4cdRb%&^4ZJJW(@y*ruzZqR=vF<%q(FHuAT0 z6yGscPHfabH+y~xaE<#q|Q}HiQRDOvg=oOi@pmhwRDd7mmgm z#x!GN%dcwj&5(jrVM=t$hIa=GGqZV}uX1Wn$i{n!pj1=)^78XDrHiYzS{He4^pb~* ztkF(awqIZmt+9;Fy|}*h@-oray}E+~kn*O-9ET-#+Rw zst#}Ky4}Sz&3QjQakWP`TD`4HD!0rl9~_N1UHQN_HH|y5RkPkbX{^@rv;PYv%Hq`k literal 0 HcmV?d00001 diff --git a/tizen_src/chromium_impl/edje_resources/images/b_end_effect_bottom_edge_bg.png b/tizen_src/chromium_impl/edje_resources/images/b_end_effect_bottom_edge_bg.png new file mode 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w2NOBjZ@l%EHp#edg@3!-*4T z1wsD-M{XGZ+-v+MudTf0cy;NcORynq=cq`##jC4nxho=+-kG>z?p>z<}QF42RUkWCf8n=Z91h&V-wbUV4* z{cn4wY+nB@oqY+ZrT7#^Y^`tu^sw#g$UeH(lYk%9o+{fC#KKV zrFMQ8ce$lvS zU2@I(^boCq{i<^+^YCZZWty`i4O54<63=mkmjq_5SQak~1SqSW6S5DL_@LHPF*|^pNl_Y{ZLqowXV=xYLe&Rjx~y(lO}WeD~59)5bgWbinsg8y=>YFlctlO z4>^v1+^Tjg@*LiEqjNk<(bG}hQGG9P;80aj!arghDkqX0LXn=I9Q$7O3v@4R5lVk$ v?O=!Uj_*K{X3tA9>UN8mz3fdEVL4&L51*d9!-Py{eq=mceV|g8{mK6Y2b9-| literal 0 HcmV?d00001 diff --git a/tizen_src/chromium_impl/edje_resources/images/b_end_effect_left_bg.png b/tizen_src/chromium_impl/edje_resources/images/b_end_effect_left_bg.png new file mode 100755 index 0000000000000000000000000000000000000000..9680e8f4067ce5540047b67c1efc39274da1e685 GIT binary patch literal 3019 zcmbVOX;f3!7QRUYkts#WBodM!P!-5T5)ug%60j&JU|6I@YGM)~kK81N0AUi43J6L? zE%jA|R+bvRDCF!1?|6$rH)0Dwj4XhXf8ldg_XW1;ZkD0WH16tO(H5bzL4_X^QIATL}P zDC7y^_O%IJ0RRyuVsjK6KVLdu3OeyL7$+qtgV+Gz>aLXW_>n>ddap2CBw=8u8?Iu} zA^`&%O!mY3$(X_j(P!~;;jZ`{Y<_$spC-V%yP;i`bjSfHRPfMBP%Md}D;d~#e(6wO zGmXQd-$4|S4D9bgas2$zOsQOmCOc6a`FIKyO{F;z$W*E`)d5Y!6UaC`2}i;^5=nGt zJl&aye*a-1HMt;+9?0^3uLX@5*a(F}M#te|V`H6SNlsFEIF3N0(QtSoj!1Nb5ROrC z5(Q7`D2cLJ@xT&B@#P|!LL`--H6D3;rO^ro7K-%uC4e$NzdsyHqTVM8N*PYcli>(X zc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Eru&Yf%Jh~k`4vvjcwt8Ms?(@n z`zMzQ@}G9;(?>}af~yarV_q3v>6)SMTrf;j&CtJwMyt7@YQvNV+HT`p@XW7>6~1YP z@Uqno{r4k|Fzk*VwBPciv0gO@%c)vzZK$QRRMo4V2Mj&s9?9^8<%y#!ZtP*ghdVzq zvX=QXuX(5IgmOQ(xs;9ZMD|_(GEs-y*g9%(HADMK&hU9Xhn5XFE`cLm7#(X$r}cbAGMGvDFuHI^E|pbaz)yk~G`cR-$iIUGf8a)7eG};Z-K(*HX&o0W^n) zsO4-h#2oc9#nzhSItEW>w+zf(1C}q8j?DDsn5PJ9Uolf=Q*5VUWhB4NTc_&n^$^+n zzepW&SybvX78F+LhnRLpmpJVB-qKielp@ugdcE9w*u=7;tUIYzRUgx$?GSeg<7vjZ zMKP<^-5-8fb&RTeuGBtEU3>V=!Ty9JEoRBRx(+2TMuN+qY%%t)97+mGIJtm{QIp$y z&P`rIbTnu8{@a6{x6N=)|Km8rbNTzs%kXJOOR)Ke>sFr<)V@NTwYb*Smys#|l6~%R zf-&b`uwm|CasJbO-3keAc>Oxr-6OkcmAS{6*^{(8JrX!Av@jT%XZxn>F}ox87ugFS z?~3SoUC!R@HTXE7BgrTDRUD(Cqjs3=!$L}}ZYgH<<&;Cu5IRe)m9XpH{5QuE$#PkEZ*Rn_P#>y-pFNETj`+Q*F zm(*%VS)iX6IrZq}QqykaJs)H_Lyoyg>`Ay6O0)Xmf$18DSM?*>)7y8veo^FLt1&fz9YOBwL8NIeC$*3P|jz0viEl_D|9=?D2z9IBs|L8I7 deNhM?fc+L;F=Ng*tu(*aK3+Rm<(}LF{{@ue-yr}1 literal 0 HcmV?d00001 diff --git a/tizen_src/chromium_impl/edje_resources/images/b_end_effect_left_edge_bg.png b/tizen_src/chromium_impl/edje_resources/images/b_end_effect_left_edge_bg.png new file mode 100755 index 0000000000000000000000000000000000000000..e65a5201179206a3c7db5a29b346e157cace7b20 GIT binary patch literal 2824 zcmb_eX;c$g7Oo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OO>u zR^~;45Eq5R(dUoOylXM70(#S(SC6TbESx@GYw_yH^@|yP6@z83ti9z`?X%;-Dp|st z-p1>*+rzJI4wob1uj^WjkG9{tg%7e;9bZ_TNoJeZ6fKi(u6HWz+3AT5Nw8#)xxea^ z%%LqN-enFw9{b=W{E)E~3^;2!aW6v;76F5JcYRYU!v@J}G@fidB`^qG{^Y_g)RV`@hcZ^8!Zojn^Tlr-eW_MWBPcb&%CQFmkyF zEL`5lwu3)^hvCO4qxf;kCuAn5e+>234Ig_qQvjxYHJJ4;*O0)G|CkZs%Q$6Wf-Qdl D$1!5% literal 0 HcmV?d00001 diff --git a/tizen_src/chromium_impl/edje_resources/images/b_end_effect_top_bg.png b/tizen_src/chromium_impl/edje_resources/images/b_end_effect_top_bg.png new file mode 100755 index 0000000000000000000000000000000000000000..e723a0d216d4faeccdd96faa8fd38f4625a245ef GIT binary patch literal 2479 zcmbVOX;f2Z8oua2hbXv(RV*PKH6cP)2#G`+vLGrDHi1&akX%TVEF^&>0tbl;sELk} zXi>q~ilS^ISg0aUl>r;jI$#Y5ilQh*3xXSn4s)a6^oOT2XYP-C-|xB4^KRe!-E((y zLWAsJt}p-q?1I-YBLKik0NJsBwSn$kgQ9lm;i6#0Dk3Gx3ME$t0(8D42}A^oxG7)+ z$mOfkeg*>oV0N-FDpnC2vYyJ5hK+%c+1sd z1y|)QmV3^4V1jahTK@jf`L zNMxz&16!_$0RNN5XW8;7wG_lgfO1K?j0f#UvgeE#>fN6QvJjzcs9`c8v?<(Fri7O+ z0>z48CJhO_@!<>kR3ekjV6X{vG7(Q<`Qq`A;U9=2lJP`_AH&~|IpgDVS_*@V3-l$k z@Dv;qk7xP$v)FhF*_RSXA~G4izN8s#uvo6(ih1BnTp<*9TFd-XEtMeyxeAFaN+L;} znE;MJqL9c15-EZa>4!kY2*rGfQjWH4&&O(+piGzn^4T(p2=Sr6RN-ghGZ;jIe;}Da zVz8N(x&v8$bbmIUfb(b3nRF%*Ij!aYKRv@j$zUz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D9 zE7t?xu(m8P=5UHX|8w6)-EwVv8SO%1d_E6J{{49Wjz^Q;`u_3VYpc?s8vK4s-*ePV zLz5v@HhduW3$MpjSA&AKA5%^A^d)S|H#(~x+9shdxk)jF13ukV>wMFt8Q1RY{Q%tz zeZ1#ULGBmSfq*&+`t5uB_qV&}tQh;U?|U51t8OW%cu>>&S3G6aiiz-s8zM{3lTlAM z8Bk;>JsYK?=7blQ2l3q}cQ~9@cWR<;qH@)QsFap19uQ1oBN);Ka%&O)Cp~dM^XOnZy5qs=UzEW|Q7n**z?o8r$YkL2Y z{VKMs-v0V4T*ylMTi^f-^%;C<4GcYaTm?+zp-rvuneOV*lZv=oScAPGQ{(t?$+J$7Uw<;awy#x66ps$aO+)Lha z$GR9@Qn-2>eqVUP7TFXJf;QOQU-#_5d z!z249Q+D8)iucDCPv1Wa zlp@WWBp|mrRot~34R^|}e+qc~z3isnX#L=m+t$v``s~gE{7l}#caOV^A761eK0Gp} zT43WZ!x}#eE=^riM<2vAOLQHrq3j{~SYLxV?W35wI>9#aXf(gZnCiG-9ZG8N@>;A- zu$hxSS8nyg$}IiCj&tVHz>-%t7ke$re#m&*rYFpFUgZrs$z$bd?-lBINXys+{GE8g z>C^LOAj!>(fU&m-D*->rT}Z$X^)KNvHen?gg!O;PvpO#Ftj>RvXCz(ZSshp8w~<{* dsH1Wg(MdZmG2-PtPiO8e(UCFW#fY7`{{h|tyr=*G literal 0 HcmV?d00001 diff --git a/tizen_src/ewk/efl_integration/common/render_messages_ewk.h b/tizen_src/ewk/efl_integration/common/render_messages_ewk.h index 84ab6c7..ecc54df 100644 --- a/tizen_src/ewk/efl_integration/common/render_messages_ewk.h +++ b/tizen_src/ewk/efl_integration/common/render_messages_ewk.h @@ -164,6 +164,12 @@ IPC_MESSAGE_ROUTED2(EwkHostMsg_HandleTapGestureWithContext, IPC_MESSAGE_ROUTED0(EwkHostMsg_PlayLinkEffect) +IPC_MESSAGE_ROUTED4(EwkHostMsg_AddEdgeEffectForUIF, + bool /* top */, + bool /* bottom */, + bool /* right */, + bool /* left */) + IPC_MESSAGE_ROUTED2(EwkHostMsg_PlainTextGetContents, std::string, /* contentText */ int /* callback id */) diff --git a/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.cc b/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.cc index 30e9096..b5ccfa2 100644 --- a/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.cc +++ b/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.cc @@ -208,6 +208,14 @@ void RenderFrameObserverEfl::PrintToPdf(int width, print_helper.PrintToPdf(width, height); } +void RenderFrameObserverEfl::AddEdgeEffectForUIF(bool top, + bool bottom, + bool right, + bool left) { + Send(new EwkHostMsg_AddEdgeEffectForUIF(render_frame()->GetRoutingID(), top, + bottom, right, left)); +} + void RenderFrameObserverEfl::DidCreateScriptContext( v8::Local context, int world_id) { diff --git a/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.h b/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.h index 0d9098b..000c1070 100644 --- a/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.h +++ b/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.h @@ -52,6 +52,8 @@ class RenderFrameObserverEfl : public RenderFrameObserver { int world_id) override; void WillReleaseScriptContext(v8::Handle context, int world_id) override; + void AddEdgeEffectForUIF(bool, bool, bool, bool) override; + void DidCreateDocumentElement() override; void PlayLinkEffect() override; void PrintToPdf(int width, diff --git a/tizen_src/ewk/efl_integration/web_contents_efl_delegate_ewk.cc b/tizen_src/ewk/efl_integration/web_contents_efl_delegate_ewk.cc index a4ecb2c..33a26cc 100644 --- a/tizen_src/ewk/efl_integration/web_contents_efl_delegate_ewk.cc +++ b/tizen_src/ewk/efl_integration/web_contents_efl_delegate_ewk.cc @@ -94,3 +94,9 @@ void WebContentsEflDelegateEwk::OpenDateTimeDialog( content::DateTimeChooserEfl* date_time_chooser) { web_view_->InputPickerShow(dialog_type, dialog_value, date_time_chooser); } + +void WebContentsEflDelegateEwk::OnOverscrolled( + const gfx::Vector2dF& accumulated_overscroll, + const gfx::Vector2dF& latest_overscroll_delta) { + web_view_->OnOverscrolled(accumulated_overscroll, latest_overscroll_delta); +} diff --git a/tizen_src/ewk/efl_integration/web_contents_efl_delegate_ewk.h b/tizen_src/ewk/efl_integration/web_contents_efl_delegate_ewk.h index 0d6117c..921893b 100644 --- a/tizen_src/ewk/efl_integration/web_contents_efl_delegate_ewk.h +++ b/tizen_src/ewk/efl_integration/web_contents_efl_delegate_ewk.h @@ -49,6 +49,9 @@ class WebContentsEflDelegateEwk : public content::WebContentsEflDelegate { content::DateTimeChooserEfl* date_time_chooser) override; private: + void OnOverscrolled(const gfx::Vector2dF& accumulated_overscroll, + const gfx::Vector2dF& latest_overscroll_delta) override; + EWebView* web_view_; }; diff --git a/tizen_src/ewk/efl_integration/web_contents_observer_efl.cc b/tizen_src/ewk/efl_integration/web_contents_observer_efl.cc index 8917a69..05eacbc 100644 --- a/tizen_src/ewk/efl_integration/web_contents_observer_efl.cc +++ b/tizen_src/ewk/efl_integration/web_contents_observer_efl.cc @@ -12,6 +12,7 @@ #include "browser_context_efl.h" #include "common/print_pages_params.h" #include "common/render_messages_ewk.h" +#include "content/browser/renderer_host/render_widget_host_view_aura.h" #include "content/browser/web_contents/web_contents_impl.h" #include "content/public/browser/favicon_status.h" #include "content/public/browser/file_select_listener.h" @@ -251,6 +252,9 @@ bool WebContentsObserverEfl::OnMessageReceived( IPC_MESSAGE_HANDLER(EwkHostMsg_DidCreateDocumentElement, OnDidCreateDocumentElement) IPC_MESSAGE_HANDLER(EwkHostMsg_PlayLinkEffect, OnPlayLinkEffect) +#if BUILDFLAG(IS_TIZEN) + IPC_MESSAGE_HANDLER(EwkHostMsg_AddEdgeEffectForUIF, OnEdgeEffectForUIF) +#endif IPC_MESSAGE_HANDLER(EwkHostMsg_DidPrintPagesToPdf, OnPrintedMetafileReceived) IPC_MESSAGE_HANDLER(EwkHostMsg_WrtMessage, OnWrtPluginMessage) @@ -309,6 +313,18 @@ void WebContentsObserverEfl::OnPrintedMetafileReceived( params.filename)); } +#if BUILDFLAG(IS_TIZEN) +void WebContentsObserverEfl::OnEdgeEffectForUIF(bool top, + bool bottom, + bool right, + bool left) { + auto* rwhva = static_cast( + web_contents_.GetRenderWidgetHostView()); + if (rwhva) + rwhva->offscreen_helper()->OnEdgeEffectForUIF(top, bottom, right, left); +} +#endif + void WebContentsObserverEfl::OnWrtPluginMessage( const Ewk_Wrt_Message_Data& data) { std::unique_ptr p(new Ewk_Wrt_Message_Data); diff --git a/tizen_src/ewk/efl_integration/web_contents_observer_efl.h b/tizen_src/ewk/efl_integration/web_contents_observer_efl.h index 255067e..0d082a7 100644 --- a/tizen_src/ewk/efl_integration/web_contents_observer_efl.h +++ b/tizen_src/ewk/efl_integration/web_contents_observer_efl.h @@ -78,6 +78,9 @@ class WebContentsObserverEfl : public WebContentsObserver, public IPC::Sender { void OnFormSubmit(const GURL& url); void OnDidNotAllowScript(); void OnPlayLinkEffect(); +#if BUILDFLAG(IS_TIZEN) + void OnEdgeEffectForUIF(bool, bool, bool, bool); +#endif void OnWrtPluginMessage(const Ewk_Wrt_Message_Data& data); void OnWrtPluginSyncMessage(const Ewk_Wrt_Message_Data& data, IPC::Message* reply); -- 2.7.4 From 9053e24a25076a2a35bff41c56b2c770c8cdf064 Mon Sep 17 00:00:00 2001 From: "ayush.k123" Date: Wed, 22 Feb 2023 08:15:01 +0530 Subject: [PATCH 07/16] [M108 Migration] Add "custom,scroll,begin","custom,scroll,end" support Handles and context menu should be temporarily hidden durnig scrolling. But specific applications like email-app uses their own scrolling mechanism within chromium-efl does not know about this happening. This breaks chromium-EFL behaviour. To meet these requirements email-app provided smart callbacks to notify engine that custom scrolling is started and finished. The patch is a counterpart of above smart callbacks. Reference: https://review.tizen.org/gerrit/281741 Change-Id: I5ab6d978b50b4e9ed4302ad28fcc65f1c248453b Signed-off-by: Ayush Kumar --- tizen_src/ewk/efl_integration/eweb_view.cc | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/tizen_src/ewk/efl_integration/eweb_view.cc b/tizen_src/ewk/efl_integration/eweb_view.cc index 4638300..5d6f3a4 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.cc +++ b/tizen_src/ewk/efl_integration/eweb_view.cc @@ -115,6 +115,12 @@ static const char* kRendererCrashedHTMLMessage = // that the web view is only partially visible. static const char* kVisibleContentChangedSignalName = "visible,content,changed"; +// email-app specific signal which informs that custom scrolling is started. +const char* kCustomScrollBeginSignalName = "custom,scroll,begin"; + +// email-app specific signal which informs that custom scrolling is finished. +const char* kCustomScrollEndSignalName = "custom,scroll,end"; + inline void SetDefaultStringIfNull(const char*& variable, const char* default_string) { if (!variable) { @@ -284,15 +290,17 @@ void EWebView::VisibleContentChangedCallback(void* user_data, void EWebView::OnCustomScrollBeginCallback(void* user_data, Evas_Object* /*object*/, void* /*event_info*/) { - auto view = static_cast(user_data); - view->GetSelectionController()->SetControlsTemporarilyHidden(true, true); + auto* view = static_cast(user_data); + if (auto* selection_controller = view->GetSelectionController()) + selection_controller->SetControlsTemporarilyHidden(true,true); } void EWebView::OnCustomScrollEndCallback(void* user_data, Evas_Object* /*object*/, void* /*event_info*/) { - auto view = static_cast(user_data); - view->GetSelectionController()->SetControlsTemporarilyHidden(false, true); + auto* view = static_cast(user_data); + if (auto* selection_controller = view->GetSelectionController()) + selection_controller->SetControlsTemporarilyHidden(false,true); } EWebView::EWebView(Ewk_Context* context, Evas_Object* object) @@ -314,6 +322,10 @@ EWebView::EWebView(Ewk_Context* context, Evas_Object* object) kVisibleContentChangedSignalName, VisibleContentChangedCallback, this); + evas_object_smart_callback_add(evas_object_, kCustomScrollBeginSignalName, + OnCustomScrollBeginCallback, this); + evas_object_smart_callback_add(evas_object_, kCustomScrollEndSignalName, + OnCustomScrollEndCallback, this); evas_object_event_callback_add(evas_object_, EVAS_CALLBACK_FOCUS_IN, OnViewFocusIn, this); evas_object_event_callback_add(evas_object_, EVAS_CALLBACK_FOCUS_OUT, @@ -445,6 +457,10 @@ EWebView::~EWebView() { evas_object_smart_callback_del(evas_object_, kVisibleContentChangedSignalName, VisibleContentChangedCallback); + evas_object_smart_callback_del(evas_object_, kCustomScrollBeginSignalName, + OnCustomScrollBeginCallback); + evas_object_smart_callback_del(evas_object_, kCustomScrollEndSignalName, + OnCustomScrollEndCallback); } } -- 2.7.4 From 142c92a44fae95e52a67d4a77a3648427e82fa7f Mon Sep 17 00:00:00 2001 From: "ayush.k123" Date: Tue, 21 Feb 2023 15:04:22 +0530 Subject: [PATCH 08/16] [M108 Migration][WCS] Bringup contents magnifier This patch brings up contents magnifier. Reference: https://review.tizen.org/gerrit/282646/ Change-Id: Ib4dcd1c5d22083c1a601f201989ce3b66eb262f4 Signed-off-by: Ayush Kumar --- .../rwhv_aura_offscreen_helper_efl.cc | 55 +++++++- .../renderer_host/rwhv_aura_offscreen_helper_efl.h | 14 ++ .../browser/selection/selection_controller_efl.cc | 21 +-- .../browser/selection/selection_controller_efl.h | 1 + .../browser/selection/selection_magnifier_efl.cc | 150 ++++++++++++--------- .../browser/selection/selection_magnifier_efl.h | 2 +- 6 files changed, 155 insertions(+), 88 deletions(-) diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc index a283e89..cf06dce 100644 --- a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc +++ b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc @@ -465,6 +465,12 @@ void RWHVAuraOffscreenHelperEfl::PaintTextureToSurface(GLuint texture_id) { // for snapshot frame_rendered_ = true; + + // Get snapshot for magnifier. + if (!magnifier_snapshot_request_.is_null()) { + std::move(magnifier_snapshot_request_).Run(); + magnifier_snapshot_request_.Reset(); + } } void RWHVAuraOffscreenHelperEfl::InitEvasGL() { @@ -1309,8 +1315,10 @@ void RWHVAuraOffscreenHelperEfl::SendGestureEvent( blink::WebGestureEvent& event) { HandleGesture(event); blink::WebInputEvent::Type event_type = event.GetType(); - if (event_type == blink::WebInputEvent::Type::kGestureScrollUpdate) + if (magnifier_ && + event_type == blink::WebInputEvent::Type::kGestureScrollUpdate) { return; + } if (event_type != blink::WebInputEvent::Type::kUndefined) { rwhv_aura_->host()->ForwardGestureEventWithLatencyInfo( @@ -1318,6 +1326,51 @@ void RWHVAuraOffscreenHelperEfl::SendGestureEvent( } } +void RWHVAuraOffscreenHelperEfl::set_magnifier(bool status) { + magnifier_ = status; +} + +void RWHVAuraOffscreenHelperEfl::GetMagnifierSnapshot( + gfx::Rect snapshot_area, + float scale_factor, + std::unique_ptr cb) { +#if defined(USE_TTRACE) + TTRACE(TTRACE_TAG_WEB, + "RenderWidgetHostViewAuraHelperEfl::GetMagnifierSnapshot"); +#endif + // GetSnapshot might be replaced with something designed for magnifier. + Evas_Object* image = GetSnapshot(snapshot_area, scale_factor, true); + + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, + base::BindOnce(&ScreenshotCapturedCallback::Run, + base::Owned(cb.release()), base::Unretained(image))); +} + +void RWHVAuraOffscreenHelperEfl::RequestMagnifierSnapshotAsync( + const Eina_Rectangle rect, + Screenshot_Captured_Callback callback, + void* user_data, + float scale_factor) { + gfx::Rect snapshot_area(rect.x, rect.y, rect.w, rect.h); + gfx::Rect view_rect = GetViewBoundsInPix(); + + // Adjust snapshot rect for email app + auto visible_viewport_rect = selection_controller_->GetVisibleViewportRect(); + int hidden_view_width = visible_viewport_rect.x() - view_rect.x(); + int hidden_view_height = visible_viewport_rect.y() - view_rect.y(); + if (hidden_view_height || hidden_view_width) { + snapshot_area.set_x(snapshot_area.x() + hidden_view_width); + snapshot_area.set_y(snapshot_area.y() + hidden_view_height); + } + + magnifier_snapshot_request_ = + base::BindOnce(&RWHVAuraOffscreenHelperEfl::GetMagnifierSnapshot, + base::Unretained(this), snapshot_area, scale_factor, + std::move(std::unique_ptr( + new ScreenshotCapturedCallback(callback, user_data)))); +} + void RWHVAuraOffscreenHelperEfl::HandleGesture(blink::WebGestureEvent& event) { SelectionControllerEfl* controller = GetSelectionController(); if (controller) diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.h b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.h index e195e6b..d462660 100644 --- a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.h +++ b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.h @@ -165,6 +165,11 @@ class CONTENT_EXPORT RWHVAuraOffscreenHelperEfl { void MoveCaret(const gfx::Point& point); void SelectClosestWord(const gfx::Point& touch_point); bool HasSelectableText(); + void set_magnifier(bool status); + void RequestMagnifierSnapshotAsync(const Eina_Rectangle rect, + Screenshot_Captured_Callback callback, + void* user_data, + float scale_factor = 1.0f); private: static void OnParentViewResize(void* data, Evas*, Evas_Object*, void*); @@ -191,6 +196,9 @@ class CONTENT_EXPORT RWHVAuraOffscreenHelperEfl { void RunGetSnapshotOnMainThread(const gfx::Rect snapshot_area, int request_id, float scale_factor); + void GetMagnifierSnapshot(gfx::Rect snapshot_area, + float scale_factor, + std::unique_ptr cb); ui::EflEventHandler* GetEventHandler(); ui::IMContextEfl* GetIMContextEfl(); @@ -245,11 +253,17 @@ class CONTENT_EXPORT RWHVAuraOffscreenHelperEfl { bool horizontal_panning_hold_ = false; bool vertical_panning_hold_ = false; + bool magnifier_ = false; + OnFocusCallback on_focus_in_callback_; OnFocusCallback on_focus_out_callback_; bool is_content_editable_ = false; std::unique_ptr edge_effect_; + // Magnifier snapshot requests are not added to snapshot_task_list_, because + // we only care about the last one if they piled up - we can only display + // one anyway. + SnapshotTask magnifier_snapshot_request_; }; } // namespace content diff --git a/tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.cc b/tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.cc index ae22b6f..d6e172f 100644 --- a/tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.cc +++ b/tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.cc @@ -518,17 +518,6 @@ void SelectionControllerEfl::HandleDragBeginNotification( handle_being_dragged_ = true; - Evas_Coord x, y; - evas_object_geometry_get(rwhva_->offscreen_helper()->content_image(), &x, &y, - 0, 0); - gfx::Point magnifier_point( - handle->GetBasePosition().x() + x, - handle->GetBasePosition().y() + y); - - magnifier_->UpdateLocation(magnifier_point); - magnifier_->Move(magnifier_point); - magnifier_->Show(); - if (handle == input_handle_.get()) return; @@ -572,12 +561,6 @@ void SelectionControllerEfl::HandleDragUpdateNotification(SelectionHandleEfl* ha gfx::Rect view_bounds = rwhva_->offscreen_helper()->GetViewBoundsInPix(); selection_change_reason_ = Reason::HandleDragged; - gfx::Point magnifier_point; - magnifier_point.set_x(handle->GetBasePosition().x() + view_bounds.x()); - magnifier_point.set_y(handle->GetBasePosition().y() + view_bounds.y()); - magnifier_->UpdateLocation(magnifier_point); - magnifier_->Move(magnifier_point); - switch (handle->Type()) { case SelectionHandleEfl::HANDLE_TYPE_INPUT: { rwhva_->offscreen_helper()->MoveCaret(handle->GetBasePosition()); @@ -611,7 +594,6 @@ void SelectionControllerEfl::HandleDragEndNotification() { ecore_events_filter_ = nullptr; selection_change_reason_ = Reason::Irrelevant; - magnifier_->Hide(); start_handle_->SetBasePosition(selection_data_->GetLeftRect().bottom_left()); end_handle_->SetBasePosition(selection_data_->GetRightRect().bottom_right()); handle_being_dragged_ = false; @@ -750,7 +732,8 @@ void SelectionControllerEfl::HandleLongPressEventPrivate( gfx::Rect view_bounds = rwhva_->offscreen_helper()->GetViewBoundsInPix(); magnifier_->HandleLongPress(gfx::Point(touch_point.x() + view_bounds.x(), - touch_point.y() + view_bounds.y())); + touch_point.y() + view_bounds.y()), + selection_data_->IsInEditField()); } void SelectionControllerEfl::HandleLongPressMoveEvent(const gfx::Point& touch_point) { diff --git a/tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.h b/tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.h index fcf9eff..8247b16 100644 --- a/tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.h +++ b/tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.h @@ -49,6 +49,7 @@ class CONTENT_EXPORT SelectionControllerEfl { const content::ContextMenuParams& params); void HandleLongPressMoveEvent(const gfx::Point& touch_point); void HandleLongPressEndEvent(); + bool HandleBeingDragged() const { return handle_being_dragged_; } void PostHandleTapGesture(bool is_content_editable); diff --git a/tizen_src/chromium_impl/content/browser/selection/selection_magnifier_efl.cc b/tizen_src/chromium_impl/content/browser/selection/selection_magnifier_efl.cc index 388e19c..3e863e6 100644 --- a/tizen_src/chromium_impl/content/browser/selection/selection_magnifier_efl.cc +++ b/tizen_src/chromium_impl/content/browser/selection/selection_magnifier_efl.cc @@ -45,7 +45,8 @@ SelectionMagnifierEfl::~SelectionMagnifierEfl() { evas_object_del(container_); } -void SelectionMagnifierEfl::HandleLongPress(const gfx::Point& touch_point) { +void SelectionMagnifierEfl::HandleLongPress(const gfx::Point& touch_point, + bool is_in_edit_field) { evas_object_event_callback_add( controller_->rwhva()->offscreen_helper()->content_image(), EVAS_CALLBACK_MOUSE_MOVE, OnAnimatorMove, this); @@ -55,8 +56,10 @@ void SelectionMagnifierEfl::HandleLongPress(const gfx::Point& touch_point) { // Call OnAnimatorMove here, so that the magnifier widget // gets properly placed. Other calls to it are expected to // happen as a react to finger/mouse movements. - OnAnimatorMove(); - Show(); + if (!is_in_edit_field && !controller_->HandleBeingDragged()) { + OnAnimatorMove(); + Show(); + } } void SelectionMagnifierEfl::DisconnectCallbacks() { @@ -68,8 +71,11 @@ void SelectionMagnifierEfl::DisconnectCallbacks() { EVAS_CALLBACK_MOUSE_UP, OnAnimatorUp); } -void SelectionMagnifierEfl::OnAnimatorMove(void* data, Evas*, Evas_Object*, void*) { - SelectionMagnifierEfl* magnifier_data = static_cast(data); +void SelectionMagnifierEfl::OnAnimatorMove(void* data, + Evas*, + Evas_Object*, + void*) { + auto* magnifier_data = static_cast(data); DCHECK(magnifier_data); if (magnifier_data) @@ -84,12 +90,18 @@ void SelectionMagnifierEfl::OnAnimatorMove() { &point.x, &point.y); gfx::Point display_point(point.x, point.y); controller_->HandleLongPressMoveEvent(display_point); - UpdateLocation(display_point); - Move(display_point); + + if (controller_->GetVisibleViewportRect().Contains(display_point)) { + UpdateLocation(display_point); + Move(display_point); + } } -void SelectionMagnifierEfl::OnAnimatorUp(void* data, Evas*, Evas_Object*, void*) { - SelectionMagnifierEfl* magnifier_data = static_cast(data); +void SelectionMagnifierEfl::OnAnimatorUp(void* data, + Evas*, + Evas_Object*, + void*) { + auto* magnifier_data = static_cast(data); DCHECK(magnifier_data); if (magnifier_data) @@ -103,10 +115,8 @@ void SelectionMagnifierEfl::OnAnimatorUp() { } void SelectionMagnifierEfl::MagnifierGetSnapshotCb(Evas_Object* image, - void* user_data) -{ - SelectionMagnifierEfl* selection_magnifier = - static_cast(user_data); + void* user_data) { + auto* selection_magnifier = static_cast(user_data); if (selection_magnifier->content_image_) { evas_object_del(selection_magnifier->content_image_); @@ -116,8 +126,8 @@ void SelectionMagnifierEfl::MagnifierGetSnapshotCb(Evas_Object* image, selection_magnifier->content_image_ = image; evas_object_show(selection_magnifier->content_image_); - elm_object_part_content_set(selection_magnifier->container_, - "swallow", selection_magnifier->content_image_); + elm_object_part_content_set(selection_magnifier->container_, "swallow", + selection_magnifier->content_image_); evas_object_pass_events_set(selection_magnifier->content_image_, EINA_TRUE); evas_object_clip_set(selection_magnifier->content_image_, selection_magnifier->container_); @@ -127,65 +137,78 @@ void SelectionMagnifierEfl::MagnifierGetSnapshotCb(Evas_Object* image, } void SelectionMagnifierEfl::UpdateLocation(const gfx::Point& location) { - int device_x, device_y, device_width, device_height; - evas_object_geometry_get( - controller_->rwhva()->offscreen_helper()->content_image(), &device_x, - &device_y, &device_width, &device_height); + auto visible_viewport_rect = controller_->GetVisibleViewportRect(); + int visible_viewport_x = visible_viewport_rect.x(); + int visible_viewport_y = visible_viewport_rect.y(); + int visible_viewport_width = visible_viewport_rect.width(); + int visible_viewport_height = visible_viewport_rect.height(); int zoomedWidth = width_ * kZoomScale; int zoomedHeight = height_ * kZoomScale; - if (zoomedWidth > device_width) - zoomedWidth = device_width; + if (zoomedWidth > visible_viewport_width) + zoomedWidth = visible_viewport_width; - if (zoomedHeight > device_height) - zoomedHeight = device_height; + if (zoomedHeight > visible_viewport_height) + zoomedHeight = visible_viewport_height; - gfx::Rect content_rect(location.x() - zoomedWidth/2, - location.y() - zoomedHeight/2, zoomedWidth, zoomedHeight); + // Place screenshot area center on touch point + gfx::Rect content_rect(location.x() - zoomedWidth / 2, + location.y() - zoomedHeight / 2, zoomedWidth, + zoomedHeight); - // Adjustments for boundry conditions - if (content_rect.x() < device_x) - content_rect.set_x(device_x); - else if ((content_rect.x() + zoomedWidth) > device_x + device_width) - content_rect.set_x(device_x + device_width - zoomedWidth); + // Move magnifier rect so it stays inside webview area + if (content_rect.x() < visible_viewport_x) { + content_rect.set_x(visible_viewport_x); + } else if ((content_rect.x() + zoomedWidth) >= + visible_viewport_x + visible_viewport_width) { + content_rect.set_x(visible_viewport_x + visible_viewport_width - + zoomedWidth - 1); + } - if (content_rect.y() < device_y) // Do not let location to be less then magnifier y value - content_rect.set_y(device_y); - else if (content_rect.y() > device_y + device_height - zoomedHeight) - content_rect.set_y(device_y + device_height - zoomedHeight); + if (content_rect.y() < visible_viewport_y) { + content_rect.set_y(visible_viewport_y); + } else if ((content_rect.y() + zoomedHeight) >= + visible_viewport_y + visible_viewport_height) { + content_rect.set_y(visible_viewport_y + visible_viewport_height - + zoomedHeight - 1); + } + // Convert to webview parameter space Eina_Rectangle rect; - rect.x = content_rect.x(); - rect.y = content_rect.y(); + rect.x = content_rect.x() - visible_viewport_x; + rect.y = content_rect.y() - visible_viewport_y; rect.w = content_rect.width(); rect.h = content_rect.height(); -#if !defined(USE_AURA) - RenderWidgetHostViewEfl* rwhv = - static_cast(web_contents_.GetRenderWidgetHostView()); - if (rwhv) - rwhv->RequestSnapshotAsync(rect, MagnifierGetSnapshotCb, this); -#endif + + controller_->rwhva()->offscreen_helper()->RequestMagnifierSnapshotAsync( + rect, MagnifierGetSnapshotCb, this); } void SelectionMagnifierEfl::Move(const gfx::Point& location) { - int device_x, device_y, device_width, device_height; - evas_object_geometry_get( - controller_->rwhva()->offscreen_helper()->content_image(), &device_x, - &device_y, &device_width, &device_height); + auto visible_viewport_rect = controller_->GetVisibleViewportRect(); + int visible_viewport_x = visible_viewport_rect.x(); + int visible_viewport_y = visible_viewport_rect.y(); + int visible_viewport_width = visible_viewport_rect.width(); + int visible_viewport_height = visible_viewport_rect.height(); int magnifier_x = location.x(); int magnifier_y = location.y() - height_ - kHeightOffset; - if (magnifier_y < device_y) // Do not let location to be out of screen - magnifier_y = device_y; - else if (magnifier_y > device_height + device_y - height_) - magnifier_y = device_height + device_y - height_; - - if (magnifier_x < device_x + width_/2) // Do not let location to be out of screen - magnifier_x = device_x + width_/2; - else if (magnifier_x > device_width + device_x - width_/2) - magnifier_x = device_width + device_x - width_/2; + // Do not let location to be out of screen + if (magnifier_y < visible_viewport_y) { + magnifier_y = visible_viewport_y; + } else if (magnifier_y > + visible_viewport_height + visible_viewport_y - height_) { + magnifier_y = visible_viewport_height + visible_viewport_y - height_; + } + // Do not let location to be out of screen + if (magnifier_x < visible_viewport_x + width_ / 2) { + magnifier_x = visible_viewport_x + width_ / 2; + } else if (magnifier_x > + visible_viewport_width + visible_viewport_x - width_ / 2) { + magnifier_x = visible_viewport_width + visible_viewport_x - width_ / 2; + } evas_object_move(container_, magnifier_x, magnifier_y); } @@ -200,12 +223,7 @@ void SelectionMagnifierEfl::Show() { shown_ = true; evas_object_show(container_); -#if !defined(USE_AURA) - RenderWidgetHostViewEfl* rwhv = - static_cast(web_contents_.GetRenderWidgetHostView()); - if (rwhv) - rwhv->set_magnifier(true); -#endif + controller_->rwhva()->offscreen_helper()->set_magnifier(true); if (controller_->rwhva()->offscreen_helper()->ewk_view()) { evas_object_smart_callback_call( controller_->rwhva()->offscreen_helper()->ewk_view(), "magnifier,show", @@ -214,15 +232,13 @@ void SelectionMagnifierEfl::Show() { } void SelectionMagnifierEfl::Hide() { + if (!shown_) + return; + shown_ = false; evas_object_hide(content_image_); evas_object_hide(container_); -#if !defined(USE_AURA) - RenderWidgetHostViewEfl* rwhv = - static_cast(web_contents_.GetRenderWidgetHostView()); - if (rwhv) - rwhv->set_magnifier(false); -#endif + controller_->rwhva()->offscreen_helper()->set_magnifier(false); if (controller_->rwhva()->offscreen_helper()->ewk_view()) { evas_object_smart_callback_call( controller_->rwhva()->offscreen_helper()->ewk_view(), "magnifier,hide", diff --git a/tizen_src/chromium_impl/content/browser/selection/selection_magnifier_efl.h b/tizen_src/chromium_impl/content/browser/selection/selection_magnifier_efl.h index 53cf98e..a693783 100644 --- a/tizen_src/chromium_impl/content/browser/selection/selection_magnifier_efl.h +++ b/tizen_src/chromium_impl/content/browser/selection/selection_magnifier_efl.h @@ -22,7 +22,7 @@ class SelectionMagnifierEfl { SelectionMagnifierEfl(content::SelectionControllerEfl* controller); ~SelectionMagnifierEfl(); - void HandleLongPress(const gfx::Point& touch_point); + void HandleLongPress(const gfx::Point& touch_point, bool is_in_edit_field); void UpdateLocation(const gfx::Point& location); void Move(const gfx::Point& location); void Show(); -- 2.7.4 From 8a9f1476e67548fb103b51b30d4f0753554285d2 Mon Sep 17 00:00:00 2001 From: Gajendra N Date: Wed, 22 Feb 2023 11:11:09 +0530 Subject: [PATCH 09/16] Fix multiwindow event handling issue ParentWindowWithContext is used to maintain hierarchy of aura windows, however it is not suitable for offscreen rendering mode where Native Window is not yet available at the ozone layer during child aura window creation in case of 'CreateNewWindow'. Enabling ParentWindowWithContext causes event handling issue during multiple windows (tabs) scenario, hence it disabling for offscreen case. Change-Id: Iae0f471768b498b1dc1eff5e1e1d15b80f356834 Signed-off-by: Gajendra N --- .../browser/web_contents/web_contents_view_aura.cc | 35 ++++++++++++++-------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc index fb2b9db..f371758 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc @@ -1017,19 +1017,30 @@ void WebContentsViewAura::CreateAuraWindow(aura::Window* context) { window_->set_owned_by_parent(false); window_->SetName("WebContentsViewAura"); window_->Init(ui::LAYER_NOT_DRAWN); - aura::Window* root_window = context ? context->GetRootWindow() : nullptr; - if (root_window) { - // There are places where there is no context currently because object - // hierarchies are built before they're attached to a Widget. (See - // views::WebView as an example; GetWidget() returns NULL at the point - // where we are created.) - // - // It should be OK to not set a default parent since such users will - // explicitly add this WebContentsViewAura to their tree after they create - // us. - aura::client::ParentWindowWithContext(window_.get(), root_window, - root_window->GetBoundsInScreen()); +#if BUILDFLAG(IS_EFL) + // ParentWindowWithContext is not suitable for offscreen rendering mode where + // Native Window is not yet available at the ozone layer during child aura + // window creation in case of 'CreateNewWindow'. Enabling below code causes + // event handling issue during multiple windows (tabs) scenario, hence + // disabling it for offscreen case. + if (!base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableOffscreenRendering)) { + aura::Window* root_window = context ? context->GetRootWindow() : nullptr; + if (root_window) { + // There are places where there is no context currently because object + // hierarchies are built before they're attached to a Widget. (See + // views::WebView as an example; GetWidget() returns NULL at the point + // where we are created.) + // + // It should be OK to not set a default parent since such users will + // explicitly add this WebContentsViewAura to their tree after they create + // us. + aura::client::ParentWindowWithContext(window_.get(), root_window, + root_window->GetBoundsInScreen()); + } } +#endif + window_->layer()->SetMasksToBounds(true); window_->TrackOcclusionState(); -- 2.7.4 From cd97a838b15c5bbfe2f3714aaffa5cfe2d5a4ae3 Mon Sep 17 00:00:00 2001 From: lizhifan Date: Tue, 21 Feb 2023 10:38:15 +0800 Subject: [PATCH 10/16] [M108 Migration][VD] Avoid pending frame counter becoming negative There should be only one frame rendering at one time, this counter help scheduler accomplish this task. But sometimes this counter could be notified to decrease more times than it should be, so it becomes negative, then scheduler is not working properly, the FPS will go sky high. From: https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/262951/ Change-Id: Icb7ef4ae0c206a8764581cccb078bb57bbc0c432 Signed-off-by: lizhifan --- cc/scheduler/scheduler_state_machine.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc index 35692af..6a1dd9f 100644 --- a/cc/scheduler/scheduler_state_machine.cc +++ b/cc/scheduler/scheduler_state_machine.cc @@ -1465,7 +1465,8 @@ void SchedulerStateMachine::DidReceiveCompositorFrameAck() { TRACE_EVENT_NESTABLE_ASYNC_END1("cc", "Scheduler:pending_submit_frames", TRACE_ID_LOCAL(this), "pending_frames", pending_submit_frames_); - pending_submit_frames_--; + if (pending_submit_frames_ > 0) + pending_submit_frames_--; } void SchedulerStateMachine::SetTreePrioritiesAndScrollState( -- 2.7.4 From dfeeefc6f3364ef28e076c2ec9b10686d615f72a Mon Sep 17 00:00:00 2001 From: Chandan Padhi Date: Thu, 16 Feb 2023 21:03:24 +0530 Subject: [PATCH 11/16] Shorten NotifySwap path for offscreen rendering This commit shortens NotifySwap path by removing some of the changes in upstream code. w/o patch: SkiaOutputSurfaceImpl->Display(OutputSurfaceClient)-> RootCompositorFrameSinkImpl(DisplayClient)->FrameSinkManagerImpl-> HostFrameSinkManager(FrameSinkManagerClient)-> DelegatedFrameHost(HostFrameSinkClient)-> DelegatedFrameHostClientAura(DelegatedFrameHostClient)-> RenderWidgetHostViewAura->RWHVAuraOffscreenHelperEfl with patch: SkiaOutputSurfaceImpl->Display(OutputSurfaceClient)-> RootCompositorFrameSinkImpl(DisplayClient)-> HostDisplayClient(mojom::DisplayClient)->Compositor-> CompositorObserverEfl(CompositorObserver)-> RWHVAuraOffscreenHelperEfl Reference: https://review.tizen.org/gerrit/287806/ Change-Id: I5dbfad3a6bb8460804045c6a8b66bae1f74130ac Signed-off-by: Chandan Padhi --- components/viz/host/host_frame_sink_client.h | 3 -- components/viz/host/host_frame_sink_manager.cc | 12 ------- components/viz/host/host_frame_sink_manager.h | 5 --- .../service/frame_sinks/frame_sink_manager_impl.cc | 8 ----- .../service/frame_sinks/frame_sink_manager_impl.h | 4 --- .../frame_sinks/root_compositor_frame_sink_impl.cc | 4 +-- .../compositor/viz_process_transport_factory.cc | 6 ++++ .../browser/renderer_host/delegated_frame_host.cc | 6 ---- .../browser/renderer_host/delegated_frame_host.h | 7 ---- .../delegated_frame_host_client_aura.cc | 6 ---- .../delegated_frame_host_client_aura.h | 3 -- .../renderer_host/render_widget_host_view_aura.cc | 5 --- .../renderer_host/render_widget_host_view_aura.h | 1 - services/viz/privileged/mojom/compositing/BUILD.gn | 2 +- .../mojom/compositing/display_private.mojom | 3 ++ .../mojom/compositing/frame_sink_manager.mojom | 3 -- .../rwhv_aura_offscreen_helper_efl.cc | 1 + .../renderer_host/rwhv_aura_offscreen_helper_efl.h | 1 - .../ui/compositor/compositor_observer_efl.cc | 39 ++++++++++++++++++++ .../ui/compositor/compositor_observer_efl.h | 42 ++++++++++++++++++++++ tizen_src/chromium_impl/ui/ui_efl.gni | 7 +++- tizen_src/ewk/efl_integration/eweb_view.cc | 5 +++ tizen_src/ewk/efl_integration/eweb_view.h | 1 + ui/compositor/BUILD.gn | 8 +++++ ui/compositor/compositor.cc | 7 ++++ ui/compositor/compositor.h | 4 +++ ui/compositor/compositor_observer.h | 4 +++ 27 files changed, 129 insertions(+), 68 deletions(-) create mode 100644 tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.cc create mode 100644 tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.h diff --git a/components/viz/host/host_frame_sink_client.h b/components/viz/host/host_frame_sink_client.h index 9e04e64..288cf89 100644 --- a/components/viz/host/host_frame_sink_client.h +++ b/components/viz/host/host_frame_sink_client.h @@ -22,9 +22,6 @@ class HostFrameSinkClient { // Called when a CompositorFrame with a new frame token is provided. virtual void OnFrameTokenChanged(uint32_t frame_token, base::TimeTicks activation_time) = 0; -#if BUILDFLAG(IS_EFL) - virtual void NotifySwap(const uint32_t texture_id) {} -#endif protected: virtual ~HostFrameSinkClient() {} diff --git a/components/viz/host/host_frame_sink_manager.cc b/components/viz/host/host_frame_sink_manager.cc index 2e759a3..8d724ed 100644 --- a/components/viz/host/host_frame_sink_manager.cc +++ b/components/viz/host/host_frame_sink_manager.cc @@ -441,16 +441,4 @@ HostFrameSinkManager::FrameSinkData::~FrameSinkData() = default; HostFrameSinkManager::FrameSinkData& HostFrameSinkManager::FrameSinkData:: operator=(FrameSinkData&& other) = default; -#if BUILDFLAG(IS_EFL) -void HostFrameSinkManager::NotifySwap(const uint32_t texture_id, - const FrameSinkId& frame_sink_id) { - auto iter = frame_sink_data_map_.find(frame_sink_id); - if (iter != frame_sink_data_map_.end()) { - const FrameSinkData& data = iter->second; - if (data.client) - data.client->NotifySwap(texture_id); - } -} -#endif - } // namespace viz diff --git a/components/viz/host/host_frame_sink_manager.h b/components/viz/host/host_frame_sink_manager.h index b0cada9..0c8c1a6 100644 --- a/components/viz/host/host_frame_sink_manager.h +++ b/components/viz/host/host_frame_sink_manager.h @@ -295,11 +295,6 @@ class VIZ_HOST_EXPORT HostFrameSinkManager const bool enable_sync_window_destruction_; -#if BUILDFLAG(IS_EFL) - void NotifySwap(const uint32_t texture_id, - const FrameSinkId& frame_sink_id) override; -#endif - // Connections to/from FrameSinkManagerImpl. mojo::Remote frame_sink_manager_remote_; // This will point to |frame_sink_manager_remote_| if using mojo or it may diff --git a/components/viz/service/frame_sinks/frame_sink_manager_impl.cc b/components/viz/service/frame_sinks/frame_sink_manager_impl.cc index b95e558..7c25edc 100644 --- a/components/viz/service/frame_sinks/frame_sink_manager_impl.cc +++ b/components/viz/service/frame_sinks/frame_sink_manager_impl.cc @@ -808,12 +808,4 @@ void FrameSinkManagerImpl::ClearThrottling(const FrameSinkId& id) { UpdateThrottlingRecursively(id, base::TimeDelta()); } -#if BUILDFLAG(IS_EFL) -void FrameSinkManagerImpl::NotifySwap(const uint32_t texture_id, - const FrameSinkId& id) { - for (auto child : GetChildrenByParent(id)) - client_->NotifySwap(texture_id, child); -} -#endif - } // namespace viz diff --git a/components/viz/service/frame_sinks/frame_sink_manager_impl.h b/components/viz/service/frame_sinks/frame_sink_manager_impl.h index 418747b..aae01af 100644 --- a/components/viz/service/frame_sinks/frame_sink_manager_impl.h +++ b/components/viz/service/frame_sinks/frame_sink_manager_impl.h @@ -257,10 +257,6 @@ class VIZ_SERVICE_EXPORT FrameSinkManagerImpl bool VerifySandboxedThreadIds( base::flat_set thread_ids); -#if BUILDFLAG(IS_EFL) - void NotifySwap(const uint32_t texture_id, const FrameSinkId& id); -#endif - private: friend class FrameSinkManagerTest; diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc index 0b6f3f8..821d45b 100644 --- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc +++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc @@ -625,8 +625,8 @@ BeginFrameSource* RootCompositorFrameSinkImpl::begin_frame_source() { #if BUILDFLAG(IS_EFL) void RootCompositorFrameSinkImpl::NotifySwap(const uint32_t texture_id) { - support_->frame_sink_manager()->NotifySwap(texture_id, - support_->frame_sink_id()); + if (display_client_) + display_client_->NotifySwap(texture_id); } #endif diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc index 4c5bf12..5855d1e 100644 --- a/content/browser/compositor/viz_process_transport_factory.cc +++ b/content/browser/compositor/viz_process_transport_factory.cc @@ -124,6 +124,12 @@ class HostDisplayClient : public viz::HostDisplayClient { } #endif +#if BUILDFLAG(IS_EFL) + void NotifySwap(const uint32_t texture_id) override { + compositor_->NotifySwap(texture_id); + } +#endif + private: [[maybe_unused]] const raw_ptr compositor_; }; diff --git a/content/browser/renderer_host/delegated_frame_host.cc b/content/browser/renderer_host/delegated_frame_host.cc index 2f07bdb..b089659 100644 --- a/content/browser/renderer_host/delegated_frame_host.cc +++ b/content/browser/renderer_host/delegated_frame_host.cc @@ -329,12 +329,6 @@ void DelegatedFrameHost::OnFrameTokenChanged(uint32_t frame_token, client_->OnFrameTokenChanged(frame_token, activation_time); } -#if BUILDFLAG(IS_EFL) -void DelegatedFrameHost::NotifySwap(const uint32_t texture_id) { - client_->NotifySwap(texture_id); -} -#endif - // CommitPending without a target for TakeFallbackContentFrom. Since we cannot // guarantee that Navigation will complete, evict our surfaces which are from // a previous Navigation. diff --git a/content/browser/renderer_host/delegated_frame_host.h b/content/browser/renderer_host/delegated_frame_host.h index 85e3aa2..7d55757 100644 --- a/content/browser/renderer_host/delegated_frame_host.h +++ b/content/browser/renderer_host/delegated_frame_host.h @@ -54,9 +54,6 @@ class CONTENT_EXPORT DelegatedFrameHostClient { virtual void InvalidateLocalSurfaceIdOnEviction() = 0; virtual std::vector CollectSurfaceIdsForEviction() = 0; virtual bool ShouldShowStaleContentOnEviction() = 0; -#if BUILDFLAG(IS_EFL) - virtual void NotifySwap(const uint32_t texture_id) {} -#endif }; // The DelegatedFrameHost is used to host all of the RenderWidgetHostView state @@ -108,10 +105,6 @@ class CONTENT_EXPORT DelegatedFrameHost void OnFrameTokenChanged(uint32_t frame_token, base::TimeTicks activation_time) override; -#if BUILDFLAG(IS_EFL) - void NotifySwap(const uint32_t texture_id) override; -#endif - // Public interface exposed to RenderWidgetHostView. // kOccluded means the native window for the host was diff --git a/content/browser/renderer_host/delegated_frame_host_client_aura.cc b/content/browser/renderer_host/delegated_frame_host_client_aura.cc index d667785..6e1b082 100644 --- a/content/browser/renderer_host/delegated_frame_host_client_aura.cc +++ b/content/browser/renderer_host/delegated_frame_host_client_aura.cc @@ -64,10 +64,4 @@ bool DelegatedFrameHostClientAura::ShouldShowStaleContentOnEviction() { return render_widget_host_view_->ShouldShowStaleContentOnEviction(); } -#if BUILDFLAG(IS_EFL) -void DelegatedFrameHostClientAura::NotifySwap(const uint32_t texture_id) { - render_widget_host_view_->NotifySwap(texture_id); -} -#endif - } // namespace content diff --git a/content/browser/renderer_host/delegated_frame_host_client_aura.h b/content/browser/renderer_host/delegated_frame_host_client_aura.h index 074e6e2..87a23e8 100644 --- a/content/browser/renderer_host/delegated_frame_host_client_aura.h +++ b/content/browser/renderer_host/delegated_frame_host_client_aura.h @@ -42,9 +42,6 @@ class CONTENT_EXPORT DelegatedFrameHostClientAura void InvalidateLocalSurfaceIdOnEviction() override; std::vector CollectSurfaceIdsForEviction() override; bool ShouldShowStaleContentOnEviction() override; -#if BUILDFLAG(IS_EFL) - void NotifySwap(const uint32_t texture_id) override; -#endif private: raw_ptr render_widget_host_view_; diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index 133558d..21d097e 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -564,11 +564,6 @@ void RenderWidgetHostViewAura::BackgroundColorReceived(int callback_id, offscreen_helper_->BackgroundColorReceived(callback_id, bg_color); } -void RenderWidgetHostViewAura::NotifySwap(const uint32_t texture_id) { - if (offscreen_helper_) - offscreen_helper_->NotifySwap(texture_id); -} - void RenderWidgetHostViewAura::DidGetContentSnapshot(const SkBitmap& bitmap, int request_id) { if (offscreen_helper_) diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h index 014d829..701f9a2 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.h +++ b/content/browser/renderer_host/render_widget_host_view_aura.h @@ -422,7 +422,6 @@ class CONTENT_EXPORT RenderWidgetHostViewAura RWHVAuraOffscreenHelperEfl* offscreen_helper() { return offscreen_helper_.get(); } - void NotifySwap(const uint32_t texture_id); void DidGetContentSnapshot(const SkBitmap& bitmap, int request_id) override; void DidHandleKeyEvent(blink::WebInputEvent::Type input_event, bool processed) override; diff --git a/services/viz/privileged/mojom/compositing/BUILD.gn b/services/viz/privileged/mojom/compositing/BUILD.gn index 8a28eee..a7fe718 100644 --- a/services/viz/privileged/mojom/compositing/BUILD.gn +++ b/services/viz/privileged/mojom/compositing/BUILD.gn @@ -44,7 +44,7 @@ mojom("compositing") { enabled_features += [ "enable_cast_overlay_strategy" ] } if (use_efl) { - enabled_features += [ "use_efl" ] + enabled_features += [ "is_efl" ] } cpp_typemaps = [ diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom index 44e7dde..116905f 100644 --- a/services/viz/privileged/mojom/compositing/display_private.mojom +++ b/services/viz/privileged/mojom/compositing/display_private.mojom @@ -125,4 +125,7 @@ interface DisplayClient { [EnableIf=is_android] SetPreferredRefreshRate(float refresh_rate); + + [EnableIf=is_efl] + NotifySwap(uint32 texture_id); }; diff --git a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom index 2ac593f..5776b0b 100644 --- a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom +++ b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom @@ -192,7 +192,4 @@ interface FrameSinkManagerClient { // when a surface of the provided |frame_sink_id| activates. OnFrameTokenChanged(FrameSinkId frame_sink_id, uint32 frame_token, mojo_base.mojom.TimeTicks activation_time); - - [EnableIf=use_efl] - NotifySwap(uint32 texture_id, FrameSinkId frame_sink_id); }; diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc index cf06dce..ee3e3f8 100644 --- a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc +++ b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc @@ -14,6 +14,7 @@ #include "content/browser/web_contents/web_contents_view_aura.h" #include "content/public/browser/render_widget_host_helper.h" #include "content/public/browser/web_contents_delegate.h" +#include "ecore_x_wayland_wrapper.h" #include "gpu/command_buffer/service/texture_base.h" #include "skia/ext/image_operations.h" #include "tizen/system_info.h" diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.h b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.h index d462660..42ad061 100644 --- a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.h +++ b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.h @@ -14,7 +14,6 @@ #include #include #include -#include "ecore_x_wayland_wrapper.h" #include "base/callback.h" #include "base/containers/id_map.h" diff --git a/tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.cc b/tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.cc new file mode 100644 index 0000000..52dcb89 --- /dev/null +++ b/tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.cc @@ -0,0 +1,39 @@ +// Copyright 2023 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 "ui/compositor/compositor_observer_efl.h" + +#include "content/browser/renderer_host/render_widget_host_view_aura.h" +#include "content/public/browser/web_contents.h" +#include "ui/compositor/compositor.h" + +namespace ui { + +CompositorObserverEfl::CompositorObserverEfl(ui::Compositor* compositor, + content::WebContents* web_contents) + : compositor_(compositor), web_contents_(web_contents) { + compositor_->AddObserver(this); +} + +CompositorObserverEfl::~CompositorObserverEfl() { + if (compositor_) + compositor_->RemoveObserver(this); +} + +void CompositorObserverEfl::NotifySwap(const uint32_t texture_id) { + auto* rwhva = static_cast( + web_contents_->GetRenderWidgetHostView()); + if (!rwhva || !rwhva->offscreen_helper()) + return; + + rwhva->offscreen_helper()->NotifySwap(texture_id); +} + +void CompositorObserverEfl::OnCompositingShuttingDown( + ui::Compositor* compositor) { + DCHECK_EQ(compositor, compositor_); + compositor_->RemoveObserver(this); + compositor_ = nullptr; +} +} // namespace ui diff --git a/tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.h b/tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.h new file mode 100644 index 0000000..2bf46b7 --- /dev/null +++ b/tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.h @@ -0,0 +1,42 @@ +// Copyright 2023 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 UI_COMPOSITOR_COMPOSITOR_OBSERVER_EFL_H_ +#define UI_COMPOSITOR_COMPOSITOR_OBSERVER_EFL_H_ + +#include "ui/compositor/compositor_export.h" +#include "ui/compositor/compositor_observer.h" + +namespace content { +class WebContents; +} // namespace content + +namespace ui { + +class Compositor; + +class COMPOSITOR_EXPORT CompositorObserverEfl : public CompositorObserver { + public: + CompositorObserverEfl(Compositor* compositor, + content::WebContents* web_contents); + + CompositorObserverEfl(const CompositorObserverEfl&) = delete; + CompositorObserverEfl& operator=(const CompositorObserverEfl&) = delete; + + ~CompositorObserverEfl() override; + + ui::Compositor* compositor() { return compositor_; } + + private: + // ui::CompositorObserver implementation: + void NotifySwap(const uint32_t texture_id) override; + void OnCompositingShuttingDown(Compositor* compositor) override; + + Compositor* compositor_; + content::WebContents* web_contents_; +}; + +} // namespace ui + +#endif // UI_COMPOSITOR_COMPOSITOR_OBSERVER_EFL_H_ diff --git a/tizen_src/chromium_impl/ui/ui_efl.gni b/tizen_src/chromium_impl/ui/ui_efl.gni index 1a0117f..7e08db0 100644 --- a/tizen_src/chromium_impl/ui/ui_efl.gni +++ b/tizen_src/chromium_impl/ui/ui_efl.gni @@ -134,4 +134,9 @@ if (!use_aura) { external_ui_accessiblility_platform_sources = [ "//tizen_src/chromium_impl/ui/accessibility/platform/ax_platform_node_efl.cc", "//tizen_src/chromium_impl/ui/accessibility/platform/ax_platform_node_efl.h", -] \ No newline at end of file +] + +external_ui_compositor_sources = [ + "//tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.cc", + "//tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.h", +] diff --git a/tizen_src/ewk/efl_integration/eweb_view.cc b/tizen_src/ewk/efl_integration/eweb_view.cc index 5d6f3a4..76e4b48 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.cc +++ b/tizen_src/ewk/efl_integration/eweb_view.cc @@ -77,6 +77,7 @@ #include "ui/aura/window.h" #include "ui/base/clipboard/clipboard_helper_efl.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/compositor/compositor_observer_efl.h" #include "ui/display/screen.h" #include "ui/events/event_switches.h" #include "ui/gfx/geometry/dip_util.h" @@ -435,6 +436,8 @@ EWebView::~EWebView() { context_menu_.reset(); mhtml_callback_map_.Clear(); + compositor_observer_.reset(); + // Release manually those scoped pointers to // make sure they are released in correct order web_contents_.reset(); @@ -2498,6 +2501,8 @@ void EWebView::InitializeWindowTreeHost() { std::make_unique(host_->window()); window_parenting_client_ = std::make_unique(host_->window()); + compositor_observer_ = std::make_unique( + host_->compositor(), web_contents_.get()); aura::Window* content = web_contents_->GetNativeView(); aura::Window* parent = host_->window(); diff --git a/tizen_src/ewk/efl_integration/eweb_view.h b/tizen_src/ewk/efl_integration/eweb_view.h index 17cb0c3..571af8c 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.h +++ b/tizen_src/ewk/efl_integration/eweb_view.h @@ -864,6 +864,7 @@ class EWebView { std::unique_ptr host_; std::unique_ptr focus_client_; std::unique_ptr window_parenting_client_; + std::unique_ptr compositor_observer_; content::DateTimeChooserEfl* date_time_chooser_ = nullptr; #if defined(TIZEN_ATK_SUPPORT) diff --git a/ui/compositor/BUILD.gn b/ui/compositor/BUILD.gn index d42dd37..cdf5544 100644 --- a/ui/compositor/BUILD.gn +++ b/ui/compositor/BUILD.gn @@ -5,6 +5,10 @@ import("//build/config/ui.gni") import("//testing/test.gni") +if (use_efl) { + import("//tizen_src/chromium_impl/ui/ui_efl.gni") +} + component("compositor") { sources = [ "animation_throughput_reporter.cc", @@ -87,6 +91,10 @@ component("compositor") { ] } + if (use_efl) { + sources += external_ui_compositor_sources + } + defines = [ "COMPOSITOR_IMPLEMENTATION" ] public_deps = [ "//cc" ] diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc index ea97a5f..16177cf 100644 --- a/ui/compositor/compositor.cc +++ b/ui/compositor/compositor.cc @@ -875,6 +875,13 @@ void Compositor::OnCompleteSwapWithNewSize(const gfx::Size& size) { } #endif +#if BUILDFLAG(IS_EFL) +void Compositor::NotifySwap(const uint32_t texture_id) { + for (auto& observer : observer_list_) + observer.NotifySwap(texture_id); +} +#endif + void Compositor::SetOutputIsSecure(bool output_is_secure) { output_is_secure_ = output_is_secure; if (display_private_) diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h index ad691e7..1fedaa1 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h @@ -424,6 +424,10 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, void OnCompleteSwapWithNewSize(const gfx::Size& size); #endif +#if BUILDFLAG(IS_EFL) + void NotifySwap(const uint32_t texture_id); +#endif + bool IsLocked() { return lock_manager_.IsLocked(); } void SetOutputIsSecure(bool output_is_secure); diff --git a/ui/compositor/compositor_observer.h b/ui/compositor/compositor_observer.h index 8e00a18..1814689 100644 --- a/ui/compositor/compositor_observer.h +++ b/ui/compositor/compositor_observer.h @@ -54,6 +54,10 @@ class COMPOSITOR_EXPORT CompositorObserver { const gfx::Size& size) {} #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_EFL) + virtual void NotifySwap(const uint32_t texture_id) {} +#endif + // Called at the top of the compositor's destructor, to give observers a // chance to remove themselves. virtual void OnCompositingShuttingDown(Compositor* compositor) {} -- 2.7.4 From 0d0b696d2e76bca0989dbae216e55cee71565f7d Mon Sep 17 00:00:00 2001 From: "yh106.jung" Date: Wed, 22 Feb 2023 19:29:13 -0800 Subject: [PATCH 12/16] Do not include chromium internal headers in ewk header This patch does not include build_config.h to ewk headers, but to ewk sources in order to resolve build breaks that occur in modules that reference chromium-efl. Change-Id: Ic683dfce4c3e516a00121e005bdf1bb34516171f Signed-off-by: yh106.jung --- .../ewk/efl_integration/public/ewk_context_menu.cc | 13 +++++++++++-- .../public/ewk_context_menu_product.h | 4 ---- .../public/ewk_media_playback_info.cc | 19 +++++++++++++++++-- .../public/ewk_media_playback_info_product.h | 4 ---- .../public/ewk_media_subtitle_info.cc | 22 ++++++++++++++++++++-- .../public/ewk_media_subtitle_info_product.h | 4 ---- 6 files changed, 48 insertions(+), 18 deletions(-) diff --git a/tizen_src/ewk/efl_integration/public/ewk_context_menu.cc b/tizen_src/ewk/efl_integration/public/ewk_context_menu.cc index 6347a38..3b8e6ae 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_context_menu.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_context_menu.cc @@ -5,6 +5,7 @@ #include "ewk_context_menu_product.h" #include +#include "build/build_config.h" #include "private/ewk_private.h" #include "private/ewk_context_menu_private.h" #include "context_menu_controller_efl.h" @@ -144,16 +145,24 @@ Eina_Bool ewk_context_menu_hide(Ewk_Context_Menu* menu) return false; } -#if BUILDFLAG(IS_TIZEN_TV) int ewk_context_menu_pos_x_get(Ewk_Context_Menu* menu) { +#if BUILDFLAG(IS_TIZEN_TV) LOG_EWK_API_MOCKUP(); return 0; +#else + LOG_EWK_API_MOCKUP("Only for Tizen TV."); + return 0; +#endif } int ewk_context_menu_pos_y_get(Ewk_Context_Menu* menu) { +#if BUILDFLAG(IS_TIZEN_TV) LOG_EWK_API_MOCKUP(); return 0; +#else + LOG_EWK_API_MOCKUP("Only for Tizen TV."); + return 0; +#endif } -#endif // IS_TIZEN_TV diff --git a/tizen_src/ewk/efl_integration/public/ewk_context_menu_product.h b/tizen_src/ewk/efl_integration/public/ewk_context_menu_product.h index 4d5ba0a..dd7fdc4 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_context_menu_product.h +++ b/tizen_src/ewk/efl_integration/public/ewk_context_menu_product.h @@ -33,8 +33,6 @@ #include "ewk_context_menu_internal.h" -#include "build/build_config.h" - #ifdef __cplusplus extern "C" { #endif @@ -111,7 +109,6 @@ EXPORT_API Eina_Bool ewk_context_menu_item_select(Ewk_Context_Menu *menu, Ewk_Co */ EXPORT_API Eina_Bool ewk_context_menu_hide(Ewk_Context_Menu *menu); -#if BUILDFLAG(IS_TIZEN_TV) /** * Gets the x_position of context menu. * @@ -127,7 +124,6 @@ EXPORT_API int ewk_context_menu_pos_x_get(Ewk_Context_Menu* menu); * @return the y_position of context menu on success or @c 0 on failure */ EXPORT_API int ewk_context_menu_pos_y_get(Ewk_Context_Menu* menu); -#endif // IS_TIZEN_TV #ifdef __cplusplus } diff --git a/tizen_src/ewk/efl_integration/public/ewk_media_playback_info.cc b/tizen_src/ewk/efl_integration/public/ewk_media_playback_info.cc index 980cc50..b7baf7e 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_media_playback_info.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_media_playback_info.cc @@ -24,6 +24,8 @@ */ #include "ewk_media_playback_info_product.h" + +#include "build/build_config.h" #include "private/ewk_private.h" const char* ewk_media_playback_info_media_url_get( @@ -71,24 +73,37 @@ const int ewk_media_playback_info_video_id_get(Ewk_Media_Playback_Info* data) LOG_EWK_API_MOCKUP(); } -#if BUILDFLAG(IS_TIZEN_TV) Ewk_Media_Playback_Info* ewkMediaPlaybackInfoCreate(const int player_id, const char* url, const char* mime_type) { +#if BUILDFLAG(IS_TIZEN_TV) LOG_EWK_API_MOCKUP(); return NULL; +#else + LOG_EWK_API_MOCKUP("Only for Tizen TV."); + return NULL; +#endif + } Eina_Bool ewk_media_playback_info_media_resource_acquired_get( Ewk_Media_Playback_Info* data) { +#if BUILDFLAG(IS_TIZEN_TV) LOG_EWK_API_MOCKUP(); return EINA_FALSE; +#else + LOG_EWK_API_MOCKUP("Only for Tizen TV."); + return EINA_FALSE; +#endif } void ewkMediaPlaybackInfoDelete(Ewk_Media_Playback_Info* data) { +#if BUILDFLAG(IS_TIZEN_TV) LOG_EWK_API_MOCKUP(); -} +#else + LOG_EWK_API_MOCKUP("Only for Tizen TV."); #endif +} diff --git a/tizen_src/ewk/efl_integration/public/ewk_media_playback_info_product.h b/tizen_src/ewk/efl_integration/public/ewk_media_playback_info_product.h index 895c9e0..a7689d5 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_media_playback_info_product.h +++ b/tizen_src/ewk/efl_integration/public/ewk_media_playback_info_product.h @@ -35,8 +35,6 @@ #include #include -#include "build/build_config.h" - #ifdef __cplusplus extern "C" { #endif @@ -120,14 +118,12 @@ EXPORT_API void ewk_media_playback_info_drm_info_set( Ewk_Media_Playback_Info* data, const char* drm_info); -#if BUILDFLAG(IS_TIZEN_TV) Ewk_Media_Playback_Info* ewkMediaPlaybackInfoCreate(const int player_id, const char* url, const char* mime_type); Eina_Bool ewk_media_playback_info_media_resource_acquired_get( Ewk_Media_Playback_Info* data); void ewkMediaPlaybackInfoDelete(Ewk_Media_Playback_Info* data); -#endif #ifdef __cplusplus } diff --git a/tizen_src/ewk/efl_integration/public/ewk_media_subtitle_info.cc b/tizen_src/ewk/efl_integration/public/ewk_media_subtitle_info.cc index 3a681da..7c0cb73 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_media_subtitle_info.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_media_subtitle_info.cc @@ -3,6 +3,8 @@ // found in the LICENSE file. #include "ewk_media_subtitle_info_product.h" + +#include "build/build_config.h" #include "private/ewk_private.h" int ewk_media_subtitle_info_id_get(Ewk_Media_Subtitle_Info *data) @@ -53,26 +55,42 @@ const void* ewk_media_subtitle_data_get(Ewk_Media_Subtitle_Data *data) return NULL; } -#if BUILDFLAG(IS_TIZEN_TV) Ewk_Media_Subtitle_Info* ewkMediaSubtitleInfoCreate(int id, const char* url, const char* lang, const char* label) { +#if BUILDFLAG(IS_TIZEN_TV) LOG_EWK_API_MOCKUP(); return NULL; +#else + LOG_EWK_API_MOCKUP("Only for Tizen TV."); + return NULL; +#endif } void ewkMediaSubtitleInfoDelete(Ewk_Media_Subtitle_Info* data) { +#if BUILDFLAG(IS_TIZEN_TV) LOG_EWK_API_MOCKUP(); +#else + LOG_EWK_API_MOCKUP("Only for Tizen TV."); +#endif } Ewk_Media_Subtitle_Data* ewkMediaSubtitleDataCreate(int id, double timestamp, const void* data, unsigned size) { +#if BUILDFLAG(IS_TIZEN_TV) LOG_EWK_API_MOCKUP(); return NULL; +#else + LOG_EWK_API_MOCKUP("Only for Tizen TV."); + return NULL; +#endif } void ewkMediaSubtitleDataDelete(Ewk_Media_Subtitle_Data* data) { +#if BUILDFLAG(IS_TIZEN_TV) LOG_EWK_API_MOCKUP(); -} +#else + LOG_EWK_API_MOCKUP("Only for Tizen TV."); #endif +} diff --git a/tizen_src/ewk/efl_integration/public/ewk_media_subtitle_info_product.h b/tizen_src/ewk/efl_integration/public/ewk_media_subtitle_info_product.h index 678eb2d..6036ad8 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_media_subtitle_info_product.h +++ b/tizen_src/ewk/efl_integration/public/ewk_media_subtitle_info_product.h @@ -35,8 +35,6 @@ #include #include -#include "build/build_config.h" - #ifdef __cplusplus extern "C" { #endif @@ -117,7 +115,6 @@ EXPORT_API unsigned ewk_media_subtitle_data_size_get(Ewk_Media_Subtitle_Data *da */ EXPORT_API const void* ewk_media_subtitle_data_get(Ewk_Media_Subtitle_Data *data); -#if BUILDFLAG(IS_TIZEN_TV) Ewk_Media_Subtitle_Info* ewkMediaSubtitleInfoCreate(int id, const char* url, const char* lang, const char* label); @@ -127,7 +124,6 @@ Ewk_Media_Subtitle_Data* ewkMediaSubtitleDataCreate(int id, double timestamp, const void* data, unsigned size); void ewkMediaSubtitleDataDelete(Ewk_Media_Subtitle_Data* data); -#endif #ifdef __cplusplus } -- 2.7.4 From f8847dea5cdadcb4eefe5202cd811d74abb26a6c Mon Sep 17 00:00:00 2001 From: "fr.fang" Date: Wed, 22 Feb 2023 09:24:18 +0800 Subject: [PATCH 13/16] [M108 Migration][HBBTV] Implement new ewk context api Support incognito mode in Injected bundle, implement the api of ewk_context_new_with_injected_bundle_path_in_incognito_mode for the request from hbbtv. Reference: https://review.tizen.org/gerrit/#/c/281230 Change-Id: I4f5153f0a88b2fbd655f8a597ba8d78955b122d4 Signed-off-by: fr.fang --- tizen_src/ewk/efl_integration/eweb_context.cc | 6 ------ tizen_src/ewk/efl_integration/eweb_context.h | 2 -- .../ewk/efl_integration/private/ewk_context_private.cc | 17 +++++++++-------- .../ewk/efl_integration/private/ewk_context_private.h | 5 +++-- tizen_src/ewk/efl_integration/public/ewk_context.cc | 7 ++++--- 5 files changed, 16 insertions(+), 21 deletions(-) diff --git a/tizen_src/ewk/efl_integration/eweb_context.cc b/tizen_src/ewk/efl_integration/eweb_context.cc index 47e9c4c..b2c3b7d 100644 --- a/tizen_src/ewk/efl_integration/eweb_context.cc +++ b/tizen_src/ewk/efl_integration/eweb_context.cc @@ -305,12 +305,6 @@ bool EWebContext::OverrideMimeForURL(const std::string& url_spec, return false; } -EWebContext::EWebContext(bool incognito) - : EWebContext(incognito, std::string()) {} - -EWebContext::EWebContext(const std::string& injectedBundlePath) - : EWebContext(false, injectedBundlePath) {} - EWebContext::EWebContext(bool incognito, const std::string& injectedBundlePath) : injected_bundle_path_(injectedBundlePath), #if BUILDFLAG(IS_TIZEN) diff --git a/tizen_src/ewk/efl_integration/eweb_context.h b/tizen_src/ewk/efl_integration/eweb_context.h index 3e6cdf0..bb51d19 100644 --- a/tizen_src/ewk/efl_integration/eweb_context.h +++ b/tizen_src/ewk/efl_integration/eweb_context.h @@ -206,8 +206,6 @@ class EWebContext { void SetMaxRefreshRate(int max_refresh_rate); private: - EWebContext(bool incognito); - EWebContext(const std::string& injectedBundlePath); EWebContext(bool incognito, const std::string& injectedBundlePath); ~EWebContext(); friend class Ewk_Context; diff --git a/tizen_src/ewk/efl_integration/private/ewk_context_private.cc b/tizen_src/ewk/efl_integration/private/ewk_context_private.cc index 9cc1f2d..be871bd 100644 --- a/tizen_src/ewk/efl_integration/private/ewk_context_private.cc +++ b/tizen_src/ewk/efl_integration/private/ewk_context_private.cc @@ -60,8 +60,9 @@ Ewk_Context* Ewk_Context::Create(bool incognito) { } // static -Ewk_Context* Ewk_Context::Create(const std::string& injectedBundlePath) { - Ewk_Context* context = new Ewk_Context(injectedBundlePath); +Ewk_Context* Ewk_Context::Create(bool incognito, + const std::string& injected_bundle_path) { + Ewk_Context* context = new Ewk_Context(incognito, injected_bundle_path); context->AddRef(); return context; } @@ -80,12 +81,12 @@ void Ewk_Context::Delete(Ewk_Context* context) { } } -Ewk_Context::Ewk_Context(bool incognito) : impl(new EWebContext(incognito)) { -} +Ewk_Context::Ewk_Context(bool incognito) + : impl(new EWebContext(incognito, std::string())) {} -Ewk_Context::Ewk_Context(const std::string& injectedBundlePath) - : impl(new EWebContext(injectedBundlePath)) { -} +Ewk_Context::Ewk_Context(bool incognito, + const std::string& injected_bundle_path) + : impl(new EWebContext(incognito, injected_bundle_path)) {} Ewk_Context::~Ewk_Context() { if (this == default_context_) @@ -341,4 +342,4 @@ Ewk_Application_Type Ewk_Context::GetApplicationType() const { void Ewk_Context::SetMaxRefreshRate(int max_refresh_rate) { impl->SetMaxRefreshRate(max_refresh_rate); -} \ No newline at end of file +} diff --git a/tizen_src/ewk/efl_integration/private/ewk_context_private.h b/tizen_src/ewk/efl_integration/private/ewk_context_private.h index a7af91a..fc39ea3 100644 --- a/tizen_src/ewk/efl_integration/private/ewk_context_private.h +++ b/tizen_src/ewk/efl_integration/private/ewk_context_private.h @@ -28,7 +28,8 @@ struct Ewk_Context : public base::RefCounted { static Ewk_Context* IncognitoContext(); static void DefaultContextRelease(); static Ewk_Context* Create(bool incognito = false); - static Ewk_Context* Create(const std::string& injectedBundlePath); + static Ewk_Context* Create(bool incognito, + const std::string& injected_bundle_path); static void Delete(Ewk_Context*); // Get related class @@ -169,7 +170,7 @@ struct Ewk_Context : public base::RefCounted { EWebContext* impl; Ewk_Context(bool incognito); - Ewk_Context(const std::string& injectedBundlePath); + Ewk_Context(bool incognito, const std::string& injected_bundle_path); ~Ewk_Context(); Ewk_Context(const Ewk_Context&) = delete; diff --git a/tizen_src/ewk/efl_integration/public/ewk_context.cc b/tizen_src/ewk/efl_integration/public/ewk_context.cc index caa783f..95dd572 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_context.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_context.cc @@ -100,7 +100,8 @@ Ewk_Context* ewk_context_new() Ewk_Context *ewk_context_new_with_injected_bundle_path(const char *path) { EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL); - return Ewk_Context::Create(std::string(path)); + // To create new Ewk_Context with default incognito = false. + return Ewk_Context::Create(false,std::string(path)); } void ewk_context_delete(Ewk_Context* context) @@ -742,8 +743,8 @@ void ewk_context_compression_proxy_data_size_reset(Ewk_Context* context) Ewk_Context *ewk_context_new_with_injected_bundle_path_in_incognito_mode(const char *path) { - LOG_EWK_API_MOCKUP(); - return NULL; + EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL); + return Ewk_Context::Create(true, std::string(path)); } Eina_Bool ewk_context_audio_latency_mode_set(Ewk_Context* context, Ewk_Audio_Latency_Mode latency_mode) -- 2.7.4 From 3f2a40a8e27c70187d9a766ee6239f802256d4a8 Mon Sep 17 00:00:00 2001 From: uzair Date: Thu, 23 Feb 2023 09:28:56 +0530 Subject: [PATCH 14/16] Compiler error fixes for supporting VD QB Below change fixes compiler errors by partially migrating [1] and [2] for supporting VD QB. [1] https://review.tizen.org/gerrit/c/271760 [2] https://review.tizen.org/gerrit/c/271757 Change-Id: Iabea727eefc8c7e03fa01a6f529f9b1ed613b931 Signed-off-by: uzair --- tizen_src/ewk/efl_integration/public/ewk_view.cc | 31 ++++++++++- tizen_src/ewk/efl_integration/public/ewk_view.h | 2 +- .../ewk/efl_integration/public/ewk_view_internal.h | 65 ++++++++++++++++++++++ .../ewk/efl_integration/public/ewk_view_product.h | 5 +- 4 files changed, 100 insertions(+), 3 deletions(-) diff --git a/tizen_src/ewk/efl_integration/public/ewk_view.cc b/tizen_src/ewk/efl_integration/public/ewk_view.cc index c3407d8..dc263e2 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_view.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_view.cc @@ -1425,7 +1425,10 @@ void ewk_view_clear_all_tiles_resources(Evas_Object* ewkView) { LOG_EWK_API_MOCKUP(); } -Eina_Bool ewk_view_set_support_video_hole(Evas_Object* ewkView, Evas_Object* window, Eina_Bool enable, Eina_Bool isVideoWindow) { +Eina_Bool ewk_view_set_support_video_hole(Evas_Object* ewkView, + void* window, + Eina_Bool enable, + Eina_Bool isVideoWindow) { LOG_EWK_API_MOCKUP(); #if defined(TIZEN_VIDEO_HOLE) EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE); @@ -1570,6 +1573,32 @@ void ewk_view_floating_window_state_changed(const Evas_Object *o, Eina_Bool stat LOG_EWK_API_MOCKUP(); } +void ewk_view_feed_mouse_down(Evas_Object* view, + Ewk_Mouse_Button_Type button, + int x, + int y) { + LOG_EWK_API_MOCKUP("NUI feature is not enabled"); +} + +void ewk_view_feed_mouse_up(Evas_Object* view, + Ewk_Mouse_Button_Type button, + int x, + int y) { + LOG_EWK_API_MOCKUP("NUI feature is not enabled"); +} + +void ewk_view_feed_mouse_move(Evas_Object* view, int x, int y) { + LOG_EWK_API_MOCKUP("NUI feature is not enabled"); +} + +void ewk_view_feed_mouse_wheel(Evas_Object* view, + Eina_Bool y_direction, + int step, + int x, + int y) { + LOG_EWK_API_MOCKUP("NUI feature is not enabled"); +} + void ewk_view_auto_login(Evas_Object *view, const char* user_name, const char* password) { LOG_EWK_API_MOCKUP(); diff --git a/tizen_src/ewk/efl_integration/public/ewk_view.h b/tizen_src/ewk/efl_integration/public/ewk_view.h index 77e8c36..91ec416 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_view.h +++ b/tizen_src/ewk/efl_integration/public/ewk_view.h @@ -769,7 +769,7 @@ EXPORT_API void ewk_view_request_manifest(Evas_Object* o, Ewk_View_Request_Manif * @return return @c EINA_TRUE on success or @c EINA_FALSE on failure */ EXPORT_API Eina_Bool ewk_view_set_support_video_hole(Evas_Object* ewkView, - Evas_Object* window, + void* window, Eina_Bool enable, Eina_Bool isVideoWindow); #endif diff --git a/tizen_src/ewk/efl_integration/public/ewk_view_internal.h b/tizen_src/ewk/efl_integration/public/ewk_view_internal.h index f7a8de7842..986e3ef 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_view_internal.h +++ b/tizen_src/ewk/efl_integration/public/ewk_view_internal.h @@ -150,6 +150,13 @@ enum Ewk_Top_Control_State { }; typedef enum Ewk_Top_Control_State Ewk_Top_Control_State; +enum Ewk_Mouse_Button_Type { + EWK_Mouse_Button_Left = 1, + EWK_Mouse_Button_Middle = 2, + EWK_Mouse_Button_Right = 3 +}; +typedef enum Ewk_Mouse_Button_Type Ewk_Mouse_Button_Type; + /// Ewk view's class, to be overridden by sub-classes. struct Ewk_View_Smart_Class { Evas_Smart_Class sc; /**< all but 'data' is free to be changed. */ @@ -1422,6 +1429,64 @@ EXPORT_API void ewk_view_offscreen_rendering_enabled_set(Evas_Object* o, Eina_Bo */ EXPORT_API void ewk_view_ime_window_set(Evas_Object* o, void* window); +/** + * Sends mouse down event. + * + * @since_tizen 6.0 + * + * @param[in] o view object + * @param[in] button button type + * @param[in] x horizontal position of mouse event + * @param[in] y vertical position of mouse event + */ +EXPORT_API void ewk_view_feed_mouse_down(Evas_Object* o, + Ewk_Mouse_Button_Type button, + int x, + int y); + +/** + * Sends mouse up event. + * + * @since_tizen 6.0 + * + * @param[in] o view object + * @param[in] button button type + * @param[in] x horizontal position of mouse event + * @param[in] y vertical position of mouse event + */ +EXPORT_API void ewk_view_feed_mouse_up(Evas_Object* o, + Ewk_Mouse_Button_Type button, + int x, + int y); + +/** + * Sends mouse move event. + * + * @since_tizen 6.0 + * + * @param[in] o view object + * @param[in] x horizontal position of mouse event + * @param[in] y vertical position of mouse event + */ +EXPORT_API void ewk_view_feed_mouse_move(Evas_Object* o, int x, int y); + +/** + * Sends mouse wheel event. + * + * @since_tizen 6.0 + * + * @param[in] o view object + * @param[in] y_direction wheel mouse direction + * @param[in] step how much mouse wheel was scrolled up or down + * @param[in] x horizontal position of mouse event + * @param[in] y vertical position of mouse event + */ +EXPORT_API void ewk_view_feed_mouse_wheel(Evas_Object* o, + Eina_Bool y_direction, + int step, + int x, + int y); + #ifdef __cplusplus } #endif diff --git a/tizen_src/ewk/efl_integration/public/ewk_view_product.h b/tizen_src/ewk/efl_integration/public/ewk_view_product.h index cd9ceae..18b8752 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_view_product.h +++ b/tizen_src/ewk/efl_integration/public/ewk_view_product.h @@ -628,7 +628,10 @@ EXPORT_API Eina_Bool ewk_view_stop_video(Evas_Object* o, Ewk_Stop_Video_Callback * * @return return @c EINA_TRUE on success or @c EINA_FALSE on failure */ -EXPORT_API Eina_Bool ewk_view_set_support_video_hole(Evas_Object* ewkView, Evas_Object* window, Eina_Bool enable, Eina_Bool isVideoWindow); +EXPORT_API Eina_Bool ewk_view_set_support_video_hole(Evas_Object* ewkView, + void* window, + Eina_Bool enable, + Eina_Bool isVideoWindow); /** * @brief Sets the support of canvas hole, Use H/W overlay for video quality of WebGL 360 degree. -- 2.7.4 From 54f93930479e5cad88a19ee820a547e58c404614 Mon Sep 17 00:00:00 2001 From: "ayush.k123" Date: Wed, 22 Feb 2023 08:38:59 +0530 Subject: [PATCH 15/16] [M108 Migration] Support encoding property for WRT config.xml ewk_settings_default_text_encoding_name_set() was not affected due to |usesEncodingDetector| in TextResourceDecoder. If |defaultTextEncodingName| is changed by ewk_settings API, |usesEncodingDetector| will be disabled. References: https://review.tizen.org/gerrit/280599/ Change-Id: Ib1295cd52b07cdf5fa6284e706d46a70d10448c8 Signed-off-by: Ayush Kumar --- .../web_preferences_mojom_traits.cc | 5 ++-- .../common/web_preferences/web_preferences.h | 1 + .../web_preferences/web_preferences_mojom_traits.h | 4 ++++ .../mojom/webpreferences/web_preferences.mojom | 3 +++ third_party/blink/public/web/web_settings.h | 5 ++-- .../renderer/core/exported/web_settings_impl.cc | 8 +++++++ .../renderer/core/exported/web_settings_impl.h | 2 ++ .../blink/renderer/core/exported/web_view_impl.cc | 1 + .../blink/renderer/core/frame/settings.json5 | 5 ++++ .../html/parser/text_resource_decoder_builder.cc | 27 +++++++++++++++------- .../private/ewk_settings_private.cc | 1 + wrt/src/browser/wrt_browser_client.cc | 2 +- 12 files changed, 49 insertions(+), 15 deletions(-) diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc index acbc8b2..7bb384f 100644 --- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc +++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc @@ -180,13 +180,12 @@ bool StructTraitsforce_enable_zoom = data.force_enable_zoom(); out->link_effect_enabled = data.link_effect_enabled(); + out->uses_encoding_detector = data.uses_encoding_detector(); + out->atk_enabled = data.atk_enabled(); #endif #if BUILDFLAG(IS_TIZEN) out->max_refresh_rate = data.max_refresh_rate(); #endif -#if BUILDFLAG(IS_EFL) - out->atk_enabled = data.atk_enabled(); -#endif #if BUILDFLAG(IS_ANDROID) out->font_scale_factor = data.font_scale_factor(); out->device_scale_adjustment = data.device_scale_adjustment(); 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 b8115fb..0b1b1e8 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences.h +++ b/third_party/blink/public/common/web_preferences/web_preferences.h @@ -238,6 +238,7 @@ struct BLINK_COMMON_EXPORT WebPreferences { bool text_zoom_enabled = false; bool selection_magnifier_enabled = false; bool long_press_enabled = false; + bool uses_encoding_detector = true; #endif bool double_tap_to_zoom_enabled; 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 b004407..f63111c 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 @@ -595,6 +595,10 @@ struct BLINK_COMMON_EXPORT StructTraitsTizenCompatibilityModeEnabled(); } + +void WebSettingsImpl::SetUsesEncodingDetector(bool uses_encoding_detector) { + settings_->SetUsesEncodingDetector(uses_encoding_detector); +} + +bool WebSettingsImpl::UsesEncodingDetector() const { + return settings_->GetUsesEncodingDetector(); +} #endif #if defined(TIZEN_ATK_SUPPORT) diff --git a/third_party/blink/renderer/core/exported/web_settings_impl.h b/third_party/blink/renderer/core/exported/web_settings_impl.h index f316fa7..3d896b7 100644 --- a/third_party/blink/renderer/core/exported/web_settings_impl.h +++ b/third_party/blink/renderer/core/exported/web_settings_impl.h @@ -230,6 +230,8 @@ class CORE_EXPORT WebSettingsImpl final : public WebSettings { void SetLinkEffectEnabled(bool) override; bool LinkEffectEnabled() const override; bool TizenCompatibilityModeEnabled() const override; + void SetUsesEncodingDetector(bool) override; + bool UsesEncodingDetector() const override; #endif #if defined(TIZEN_ATK_SUPPORT) diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc index b2d3d6c..06b1fac 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc @@ -1709,6 +1709,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, prefs.tizen_version_release); web_view_impl->SetIgnoreViewportTagScaleLimits(prefs.force_enable_zoom); settings->SetLoadWithOverviewMode(prefs.shrinks_viewport_contents_to_fit); + settings->SetUsesEncodingDetector(prefs.uses_encoding_detector); #endif #if BUILDFLAG(IS_TIZEN) diff --git a/third_party/blink/renderer/core/frame/settings.json5 b/third_party/blink/renderer/core/frame/settings.json5 index 0025005..5331ed9 100644 --- a/third_party/blink/renderer/core/frame/settings.json5 +++ b/third_party/blink/renderer/core/frame/settings.json5 @@ -223,6 +223,11 @@ }, { + name: "usesEncodingDetector", + initial: false, + }, + + { name: "presentationRequiresUserGesture", initial: true, }, diff --git a/third_party/blink/renderer/core/html/parser/text_resource_decoder_builder.cc b/third_party/blink/renderer/core/html/parser/text_resource_decoder_builder.cc index 006d0cb..d789152 100644 --- a/third_party/blink/renderer/core/html/parser/text_resource_decoder_builder.cc +++ b/third_party/blink/renderer/core/html/parser/text_resource_decoder_builder.cc @@ -142,14 +142,25 @@ std::unique_ptr BuildTextResourceDecoder( TextResourceDecoderOptions::kJSONContent, default_encoding)); use_hint_encoding = false; } else { - WTF::TextEncoding hint_encoding; - if (use_hint_encoding && - parent_frame->GetDocument()->EncodingWasDetectedHeuristically()) - hint_encoding = parent_frame->GetDocument()->Encoding(); - decoder = std::make_unique( - TextResourceDecoderOptions::CreateWithAutoDetection( - DetermineContentType(mime_type), default_encoding, hint_encoding, - url)); +#if BUILDFLAG(IS_EFL) + if (!encoding_from_domain.IsValid() && + !frame->GetSettings()->GetUsesEncodingDetector()) { + decoder = + std::make_unique(TextResourceDecoderOptions( + DetermineContentType(mime_type), default_encoding)); + } else { +#endif + WTF::TextEncoding hint_encoding; + if (use_hint_encoding && + parent_frame->GetDocument()->EncodingWasDetectedHeuristically()) + hint_encoding = parent_frame->GetDocument()->Encoding(); + decoder = std::make_unique( + TextResourceDecoderOptions::CreateWithAutoDetection( + DetermineContentType(mime_type), default_encoding, hint_encoding, + url)); +#if BUILDFLAG(IS_EFL) + } +#endif } } else { decoder = std::make_unique(TextResourceDecoderOptions( diff --git a/tizen_src/ewk/efl_integration/private/ewk_settings_private.cc b/tizen_src/ewk/efl_integration/private/ewk_settings_private.cc index 6112948..607544f 100644 --- a/tizen_src/ewk/efl_integration/private/ewk_settings_private.cc +++ b/tizen_src/ewk/efl_integration/private/ewk_settings_private.cc @@ -18,6 +18,7 @@ void Ewk_Settings::setCurrentLegacyFontSizeMode(Ewk_Legacy_Font_Size_Mode mode) } void Ewk_Settings::setDefaultTextEncoding(const char* encoding) { + m_preferences.uses_encoding_detector = !(encoding && *encoding); if (encoding) m_preferences.default_encoding = encoding; } diff --git a/wrt/src/browser/wrt_browser_client.cc b/wrt/src/browser/wrt_browser_client.cc index 0bdee4c..0cf861c 100755 --- a/wrt/src/browser/wrt_browser_client.cc +++ b/wrt/src/browser/wrt_browser_client.cc @@ -236,9 +236,9 @@ void WRTBrowserClient::OverrideWebkitPrefs( auto& runtime = NativeWebRuntime::GetInstance(); prefs->default_encoding = runtime.GetEncodingType(); -#if !defined(WRT_JS_BRINGUP) prefs->uses_encoding_detector = false; +#if !defined(WRT_JS_BRINGUP) if (IsWearableProfile() && WRTNativeWindow::GetWindowShape() == WRTNativeWindow::Shape::SQUARE) { prefs->mirror_blur_enabled = true; -- 2.7.4 From 58a4432927bffadb30177dd0da32bc762d190c52 Mon Sep 17 00:00:00 2001 From: "ayush.k123" Date: Tue, 21 Feb 2023 14:40:32 +0530 Subject: [PATCH 16/16] [M108 Migration] Remove EWK_BRINGUP from ewk_settings.cc This patch removes EWK_BRINGUP and unused code from ewk_settings.cc. References: https://review.tizen.org/gerrit/280785/ Change-Id: I7950338a8fb06b8d07e82f991d81f72185227cec Signed-off-by: Ayush Kumar --- .../ewk/efl_integration/public/ewk_settings.cc | 112 ++------------------- 1 file changed, 9 insertions(+), 103 deletions(-) diff --git a/tizen_src/ewk/efl_integration/public/ewk_settings.cc b/tizen_src/ewk/efl_integration/public/ewk_settings.cc index ea62255..d406e3fd 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_settings.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_settings.cc @@ -40,18 +40,6 @@ void ewkUpdateWebkitPreferences(Evas_Object *ewkView) EWebView* impl = EWebView::FromEvasObject(ewkView); assert(impl); - bool autoSelectWord = ewk_settings_select_word_automatically_get(impl->GetSettings()); - // TODO(sns.park) : remove dependency to chromium internals - if(autoSelectWord){ -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup - ui::GestureConfiguration::set_double_tap_to_zoom_enabled(false); -#endif - } - else{ -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup - ui::GestureConfiguration::set_double_tap_to_zoom_enabled(true); -#endif - } impl->UpdateWebKitPreferences(); } @@ -59,26 +47,14 @@ void ewkUpdateWebkitPreferences(Evas_Object *ewkView) Eina_Bool ewk_settings_fullscreen_enabled_set(Ewk_Settings* settings, Eina_Bool enable) { -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup -#pragma message "[M38] fullscreen_enabled flag has been deleted from webpreference.h" - EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false); - settings->getPreferences().fullscreen_enabled = enable; - ewkUpdateWebkitPreferences(settings->getEvasObject()); - return EINA_TRUE; -#else + LOG_EWK_API_MOCKUP("Not Supported by chromium"); return EINA_FALSE; -#endif } Eina_Bool ewk_settings_fullscreen_enabled_get(const Ewk_Settings* settings) { -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup -#pragma message "[M38] fullscreen_enabled flag has been deleted from webpreference.h" - EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false); - return settings->getPreferences().fullscreen_enabled; -#else + LOG_EWK_API_MOCKUP("Not Supported by chromium"); return EINA_FALSE; -#endif } Eina_Bool ewk_settings_javascript_enabled_set(Ewk_Settings* settings, Eina_Bool enable) @@ -242,12 +218,8 @@ Eina_Bool ewk_settings_private_browsing_enabled_get(const Ewk_Settings* settings Eina_Bool ewk_settings_editable_link_behavior_set(Ewk_Settings* settings, Ewk_Editable_Link_Behavior behavior) { - EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false); -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup - settings->getPreferences().editable_link_behavior = static_cast(behavior); -#endif - ewkUpdateWebkitPreferences(settings->getEvasObject()); - return EINA_TRUE; + LOG_EWK_API_MOCKUP("Not Supported by chromium"); + return EINA_FALSE; } Eina_Bool ewk_settings_load_remote_images_set(Ewk_Settings* settings, Eina_Bool loadRemoteImages) @@ -335,9 +307,7 @@ Eina_Bool ewk_settings_link_effect_enabled_get(const Ewk_Settings* settings) Eina_Bool ewk_settings_uses_encoding_detector_set(Ewk_Settings* settings, Eina_Bool use) { EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false); -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup settings->getPreferences().uses_encoding_detector = use; -#endif ewkUpdateWebkitPreferences(settings->getEvasObject()); return EINA_TRUE; } @@ -345,11 +315,7 @@ Eina_Bool ewk_settings_uses_encoding_detector_set(Ewk_Settings* settings, Eina_B Eina_Bool ewk_settings_uses_encoding_detector_get(const Ewk_Settings* settings) { EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false); -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup return settings->getPreferences().uses_encoding_detector; -#else - return EINA_FALSE; -#endif } Eina_Bool ewk_settings_default_keypad_enabled_set(Ewk_Settings* settings, Eina_Bool enable) @@ -566,22 +532,14 @@ Eina_Bool ewk_settings_select_word_automatically_get(const Ewk_Settings* setting Ewk_List_Style_Position ewk_settings_initial_list_style_position_get(const Ewk_Settings* settings) { -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup - EINA_SAFETY_ON_NULL_RETURN_VAL(settings, EWK_LIST_STYLE_POSITION_OUTSIDE); - return static_cast(settings->getPreferences().initial_list_style_position); -#else + LOG_EWK_API_MOCKUP("Not Supported by chromium"); return EWK_LIST_STYLE_POSITION_OUTSIDE; -#endif } Eina_Bool ewk_settings_initial_list_style_position_set(Ewk_Settings* settings, Ewk_List_Style_Position style) { - EINA_SAFETY_ON_NULL_RETURN_VAL(settings, EINA_FALSE); -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup - settings->getPreferences().initial_list_style_position = static_cast(style); -#endif - ewkUpdateWebkitPreferences(settings->getEvasObject()); - return EINA_TRUE; + LOG_EWK_API_MOCKUP("Not Supported by chromium"); + return EINA_FALSE; } Eina_Bool ewk_settings_webkit_text_size_adjust_enabled_set(Ewk_Settings* settings, Eina_Bool enabled) @@ -596,20 +554,13 @@ Eina_Bool ewk_settings_webkit_text_size_adjust_enabled_set(Ewk_Settings* setting // TODO: this API is gone in newer versions of webkit-efl void ewk_settings_detect_contents_automatically_set(Ewk_Settings* settings, Eina_Bool enable) { - EINA_SAFETY_ON_NULL_RETURN(settings); -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup - settings->setDetectContentsEnabled(enable); -#endif + LOG_EWK_API_MOCKUP("Not Supported by chromium"); } Eina_Bool ewk_settings_detect_contents_automatically_get(const Ewk_Settings* settings) { - EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false); -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup - return settings->getDetectContentsEnabled(); -#else + LOG_EWK_API_MOCKUP("Not Supported by chromium"); return EINA_FALSE; -#endif } void ewk_settings_cache_builder_enabled_set(Ewk_Settings *settings, Eina_Bool enabled) @@ -671,51 +622,6 @@ Eina_Bool ewk_settings_encoding_detector_enabled_set(Ewk_Settings* settings, Ein return EINA_FALSE; } -namespace { -#define EXTRA_FEATURE_FUNCTIONS(VALNAME) \ - void Ewk_Extra_Feature_Set_ ## VALNAME(Ewk_Settings* settings, Eina_Bool value) \ - { \ - EINA_SAFETY_ON_NULL_RETURN(settings); \ - settings->set ## VALNAME ## Enabled(value == EINA_TRUE); \ - } \ - Eina_Bool Ewk_Extra_Feature_Get_ ## VALNAME(const Ewk_Settings* settings) \ - { \ - EINA_SAFETY_ON_NULL_RETURN_VAL(settings, EINA_FALSE); \ - return settings->get ## VALNAME ## Enabled() ? EINA_TRUE : EINA_FALSE; \ - } - -#define EWK_EXTRA_FEATURE(NAME, VALNAME) {NAME, Ewk_Extra_Feature_Set_## VALNAME, Ewk_Extra_Feature_Get_ ## VALNAME} - - EXTRA_FEATURE_FUNCTIONS(LongPress) - EXTRA_FEATURE_FUNCTIONS(LinkMagnifier) - EXTRA_FEATURE_FUNCTIONS(DetectContents) - EXTRA_FEATURE_FUNCTIONS(WebLogin) - EXTRA_FEATURE_FUNCTIONS(DoubleTap) - EXTRA_FEATURE_FUNCTIONS(Zoom) - EXTRA_FEATURE_FUNCTIONS(OpenPanel) - EXTRA_FEATURE_FUNCTIONS(AllowRestrictedURL) - EXTRA_FEATURE_FUNCTIONS(URLBarHide) - - void Ewk_Extra_Feature_Set_ViewportQuirk(Ewk_Settings* settings, Eina_Bool value) - { - EINA_SAFETY_ON_NULL_RETURN(settings); -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup - settings->getPreferences().viewport_meta_non_user_scalable_quirk = value; -#endif - ewkUpdateWebkitPreferences(settings->getEvasObject()); - } - - Eina_Bool Ewk_Extra_Feature_Get_ViewportQuirk(const Ewk_Settings* settings) - { -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup - EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false); - return settings->getPreferences().viewport_meta_non_user_scalable_quirk; -#else - return EINA_FALSE; -#endif - } -} - Eina_Bool ewk_settings_extra_feature_get(const Ewk_Settings* settings, const char* feature) { EINA_SAFETY_ON_NULL_RETURN_VAL(settings, EINA_FALSE); -- 2.7.4