[M120 Migration] Fix SVACE major issues. 60/305760/5
authorManjeet <manjeet.1@partner.samsung.com>
Wed, 7 Feb 2024 09:10:19 +0000 (14:40 +0530)
committerManjeet <manjeet.1@partner.samsung.com>
Tue, 20 Feb 2024 07:11:09 +0000 (12:41 +0530)
Reference: https://review.tizen.org/gerrit/#/c/290723/

Change-Id: Ic39fb19057f0dd8d44bfcd104991e9b59b3aa1c4
Signed-off-by: Manjeet <manjeet.1@partner.samsung.com>
tizen_src/ewk/efl_integration/eweb_context.cc
tizen_src/ewk/efl_integration/public/ewk_view.cc
tizen_src/ewk/efl_integration/renderer/plugins/plugin_placeholder_hole.cc
tizen_src/ewk/efl_integration/web_contents_delegate_efl.cc

index 5cbfee1..9da8a8c 100644 (file)
@@ -416,7 +416,8 @@ EWebContext::~EWebContext() {
   auto cbce = static_cast<content::ContentBrowserClientEfl*>(cbc);
   cbce->SetBrowserContext(browser_context_.release());
 #endif
-  cookieManager()->EWebContextShutDown();
+  if (cookieManager())
+    cookieManager()->EWebContextShutDown();
 }
 
 void EWebContext::ClearNetworkCache() {
index e8e9f23..5b1d807 100644 (file)
@@ -600,21 +600,36 @@ Eina_Bool ewk_view_web_application_capable_get(Evas_Object* ewkView, Ewk_Web_App
 {
   EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
   EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
+#if !defined(EWK_BRINGUP)  // FIXME::M94 Bringup IPC to MOJO conversion in
+                           // WebAppCapableGet
   return impl->WebAppCapableGet(callback, userData) ? EINA_TRUE : EINA_FALSE;
+#else
+  return EINA_FALSE;
+#endif
 }
 
 Eina_Bool ewk_view_web_application_icon_url_get(Evas_Object* ewkView, Ewk_Web_App_Icon_URL_Get_Callback callback, void* userData)
 {
   EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
   EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
+#if !defined(EWK_BRINGUP)  // FIXME::M94 Bringup IPC to MOJO conversion in
+                           // WebAppIconUrlGet
   return impl->WebAppIconUrlGet(callback, userData) ? EINA_TRUE : EINA_FALSE;
+#else
+  return EINA_FALSE;
+#endif
 }
 
 Eina_Bool ewk_view_web_application_icon_urls_get(Evas_Object* ewkView, Ewk_Web_App_Icon_URLs_Get_Callback callback, void* userData)
 {
   EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
   EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
+#if !defined(EWK_BRINGUP)  // FIXME::M94 Bringup IPC to MOJO conversion in
+                           // WebAppIconUrlsGet
   return impl->WebAppIconUrlsGet(callback, userData) ? EINA_TRUE : EINA_FALSE;
+#else
+  return EINA_FALSE;
+#endif
 }
 
 Eina_Bool ewk_view_command_execute(Evas_Object* view, const char* command, const char* value)
index 2dfc07e..a13d00e 100644 (file)
@@ -322,15 +322,17 @@ void PluginPlaceholderHole::OnUnobscuredRectUpdate(
     should_notify = true;
   }
 
-  gfx::Point position_in_root_frame =
-      plugin()->Container()->LocalToRootFramePoint(unobscured_rect.origin());
-
-  if (local_position_in_root_frame_ != position_in_root_frame) {
-    LOG(INFO) << "PluginPlaceholderHole: position changed!!!  before:"
-              << local_position_in_root_frame_.ToString()
-              << " after:" << position_in_root_frame.ToString();
-    local_position_in_root_frame_ = position_in_root_frame;
-    should_notify = true;
+  if (plugin() && plugin()->Container()) {
+    gfx::Point position_in_root_frame =
+        plugin()->Container()->LocalToRootFramePoint(unobscured_rect.origin());
+
+    if (local_position_in_root_frame_ != position_in_root_frame) {
+      LOG(INFO) << "PluginPlaceholderHole: position changed!!!  before:"
+                << local_position_in_root_frame_.ToString()
+                << " after:" << position_in_root_frame.ToString();
+      local_position_in_root_frame_ = position_in_root_frame;
+      should_notify = true;
+    }
   }
 
   if (!should_notify)
index 7dc345e..24af37f 100644 (file)
@@ -230,11 +230,11 @@ void WebContentsDelegateEfl::NavigationStateChanged(
     web_view_->ResetContextMenuController();
     auto rwhva = static_cast<RenderWidgetHostViewAura*>(
         web_contents_.GetRenderWidgetHostView());
-    if (rwhva && rwhva->offscreen_helper() &&
-        rwhva->offscreen_helper()->GetSelectionController()) {
-      auto selection_controller =
-          rwhva->offscreen_helper()->GetSelectionController();
-      selection_controller->ClearSelection();
+    if (rwhva && rwhva->offscreen_helper()) {
+      if (auto selection_controller =
+              rwhva->offscreen_helper()->GetSelectionController()) {
+        selection_controller->ClearSelection();
+      }
     }
   }
 }