Merge "[Tizen] Use c-style string when webview loads contents." into tizen_7.0 accepted/tizen/7.0/unified/20230407.155832
authordongsug song <dongsug.song@samsung.com>
Thu, 6 Apr 2023 11:42:33 +0000 (11:42 +0000)
committerGerrit Code Review <gerrit@review>
Thu, 6 Apr 2023 11:42:33 +0000 (11:42 +0000)
13 files changed:
dali/devel-api/adaptor-framework/accessibility.cpp
dali/devel-api/adaptor-framework/accessibility.h
dali/devel-api/atspi-interfaces/accessible.h
dali/internal/accessibility/bridge/accessible.cpp
dali/internal/accessibility/bridge/bridge-accessible.cpp
dali/internal/accessibility/bridge/bridge-accessible.h
dali/internal/accessibility/bridge/bridge-object.cpp
dali/internal/accessibility/bridge/dummy/dummy-atspi.cpp
dali/internal/text/text-abstraction/font-client-impl.cpp
dali/internal/text/text-abstraction/plugin/harfbuzz-proxy-font.cpp
dali/internal/window-system/common/window-impl.cpp
dali/internal/window-system/common/window-impl.h
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp

index b058328..3d143bf 100644 (file)
@@ -338,6 +338,9 @@ namespace
 {
 class AdaptorAccessible : public ActorAccessible
 {
+private:
+  std::unique_ptr<TriggerEventInterface> mRenderNotification = nullptr;
+
 protected:
   bool mRoot = false;
 
@@ -474,6 +477,39 @@ public:
   {
     return {};
   }
+
+  void SetListenPostRender(bool enabled) override
+  {
+    if (!mRoot)
+    {
+      return;
+    }
+
+    auto window                                 = Dali::DevelWindow::Get(Self());
+    Dali::Internal::Adaptor::Window& windowImpl = Dali::GetImplementation(window);
+
+    if(!mRenderNotification)
+    {
+      mRenderNotification = std::unique_ptr<TriggerEventInterface>(
+                                           TriggerEventFactory::CreateTriggerEvent(MakeCallback(this, &AdaptorAccessible::OnPostRender),
+                                           TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER));
+    }
+
+    if (enabled)
+    {
+      windowImpl.SetRenderNotification(mRenderNotification.get());
+    }
+    else
+    {
+      windowImpl.SetRenderNotification(nullptr);
+    }
+  }
+
+  void OnPostRender()
+  {
+    Accessibility::Bridge::GetCurrentBridge()->Emit(Accessibility::Accessible::Get(Self()), Accessibility::WindowEvent::POST_RENDER);
+  }
+
 }; // AdaptorAccessible
 
 using AdaptorAccessiblesType = std::unordered_map<const Dali::RefObject*, std::unique_ptr<AdaptorAccessible> >;
index 77c7257..20f8d69 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_ATSPI_ACCESSIBILITY_H\r
 #define DALI_ATSPI_ACCESSIBILITY_H\r
 /*\r
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.\r
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.\r
  *\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
@@ -341,6 +341,7 @@ enum class WindowEvent
   SHADE,\r
   UU_SHADE,\r
   RESTYLE,\r
+  POST_RENDER,\r
 };\r
 \r
 /**\r
index edac6d9..554fb73 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_ADAPTOR_ATSPI_ACCESSIBLE_H
 
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -316,6 +316,13 @@ public:
   virtual Dali::Actor GetInternalActor() = 0;
 
   /**
+   * @brief Sets whether to listen for post render callback.
+   *
+   * @param[in] enabled If ture, registration post render callback, false otherwise
+   */
+  virtual void SetListenPostRender(bool enabled);
+
+  /**
    * @brief Gets all implemented interfaces.
    *
    * Override DoGetInterfaces() to customize the return value of this method.
index c2a62b3..bc3557b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -191,6 +191,10 @@ bool Accessible::IsHidden() const
   return false;
 }
 
+void Accessible::SetListenPostRender(bool enabled)
+{
+}
+
 bool Accessible::IsProxy() const
 {
   return false;
index 31443ff..db9a2aa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -393,6 +393,7 @@ void BridgeAccessible::RegisterInterfaces()
   AddFunctionToInterface(desc, "DoGesture", &BridgeAccessible::DoGesture);
   AddFunctionToInterface(desc, "GetReadingMaterial", &BridgeAccessible::GetReadingMaterial);
   AddFunctionToInterface(desc, "GetRelationSet", &BridgeAccessible::GetRelationSet);
+  AddFunctionToInterface(desc, "SetListenPostRender", &BridgeAccessible::SetListenPostRender);
   mDbusServer.addInterface("/", desc, true);
 }
 
@@ -1010,3 +1011,9 @@ DBus::ValueOrError<std::vector<BridgeAccessible::Relation>> BridgeAccessible::Ge
 
   return ret;
 }
+
+DBus::ValueOrError<void> BridgeAccessible::SetListenPostRender(bool enabled)
+{
+  FindSelf()->SetListenPostRender(enabled);
+  return {};
+}
index 0a3299c..cf67cac 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_ACCESSIBILITY_BRIDGE_ACCESSIBLE_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -207,6 +207,11 @@ public:
    */
   DBus::ValueOrError<std::vector<Relation>> GetRelationSet();
 
+  /**
+   * @copydoc Dali::Accessibility::Accessible::SetListenPostRender()
+   */
+  DBus::ValueOrError<void> SetListenPostRender(bool enabled);
+
 private:
   /**
    * @brief Calculates Neighbor candidate object in root node.
index 26b697c..78684b0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -119,6 +119,7 @@ void BridgeObject::Emit(Accessible* obj, WindowEvent event, unsigned int detail)
     {WindowEvent::SHADE, "Shade"},
     {WindowEvent::UU_SHADE, "uUshade"},
     {WindowEvent::RESTYLE, "Restyle"},
+    {WindowEvent::POST_RENDER, "PostRender"},
   };
 
   if(!IsUp() || obj->IsHidden() || obj->GetSuppressedEvents()[AtspiEvent::WINDOW_CHANGED])
index 713dd3c..c13506f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -61,6 +61,10 @@ bool Accessibility::Component::IsScrollable() const
   return false;
 }
 
+void Accessibility::Accessible::SetListenPostRender(bool enabled)
+{
+}
+
 bool Accessibility::Component::IsAccessibleContainingPoint(Point point, CoordinateType type) const
 {
   return false;
index af1257a..35d951c 100644 (file)
@@ -110,6 +110,10 @@ Dali::TextAbstraction::FontClient FontClient::Get()
       else
       {
         fontClientHandle = Dali::TextAbstraction::FontClient(new FontClient);
+
+        // Make DefaultFontDescription cached
+        Dali::TextAbstraction::FontDescription defaultFontDescription;
+        fontClientHandle.GetDefaultPlatformFontDescription(defaultFontDescription);
       }
 
       gFontPreCacheAvailable = false;
index 53d3d0f..02b9691 100644 (file)
@@ -344,7 +344,7 @@ static hb_bool_t GlyphExtentsFunc(hb_font_t* font, void* font_data, hb_codepoint
 {
   // Output data stored here.
   GlyphCacheManager::GlyphCacheData glyphData;
-  if(!GetGlyphCacheData(font_data, static_cast<GlyphIndex>(glyphIndex), glyphData))
+  if(GetGlyphCacheData(font_data, static_cast<GlyphIndex>(glyphIndex), glyphData))
   {
     extents->x_bearing = glyphData.mGlyphMetrics.horiBearingX;
     extents->y_bearing = glyphData.mGlyphMetrics.horiBearingY;
index f34d740..515aee9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -195,6 +195,16 @@ void Window::Initialize(Any surface, const PositionSize& positionSize, const std
   mNativeWindowId = mWindowBase->GetNativeWindowId();
 }
 
+void Window::SetRenderNotification(TriggerEventInterface *renderNotification)
+{
+  if(!mWindowSurface)
+  {
+    return;
+  }
+
+  mWindowSurface->SetRenderNotification(renderNotification);
+}
+
 void Window::OnAdaptorSet(Dali::Adaptor& adaptor)
 {
   mEventHandler = EventHandlerPtr(new EventHandler(mWindowSurface->GetWindowBase(), *mAdaptor));
index c0258f2..9f3663e 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_IMPL_H
 
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -421,6 +421,13 @@ public:
    */
   void EmitAccessibilityHighlightSignal(bool highlight);
 
+  /**
+   * @brief Sets the render notification trigger to call when render thread is completed a frame
+   *
+   * @param[in] renderNotification to use
+   */
+  void SetRenderNotification(TriggerEventInterface *renderNotification);
+
 public: // Dali::Internal::Adaptor::SceneHolder
   /**
    * @copydoc Dali::Internal::Adaptor::SceneHolder::GetNativeHandle
index dc903ee..d535ed5 100644 (file)
@@ -1139,6 +1139,8 @@ void WindowBaseEcoreWl2::OnMouseButtonDown(void* data, int type, void* event)
 
   if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
   {
+    DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_DOWN");
+
     Device::Class::Type    deviceClass;
     Device::Subclass::Type deviceSubclass;
 
@@ -1179,6 +1181,8 @@ void WindowBaseEcoreWl2::OnMouseButtonUp(void* data, int type, void* event)
 
   if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
   {
+    DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_UP");
+
     Device::Class::Type    deviceClass;
     Device::Subclass::Type deviceSubclass;
 
@@ -1206,6 +1210,8 @@ void WindowBaseEcoreWl2::OnMouseButtonMove(void* data, int type, void* event)
 
   if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
   {
+    DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_MOVE");
+
     Device::Class::Type    deviceClass;
     Device::Subclass::Type deviceSubclass;
 
@@ -1232,6 +1238,8 @@ void WindowBaseEcoreWl2::OnMouseButtonCancel(void* data, int type, void* event)
 
   if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
   {
+    DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_CANCEL");
+
     Integration::Point point;
     point.SetDeviceId(touchEvent->multi.device);
     point.SetState(PointState::INTERRUPTED);
@@ -1249,6 +1257,8 @@ void WindowBaseEcoreWl2::OnMouseWheel(void* data, int type, void* event)
 
   if(mouseWheelEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
   {
+    DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_WHEEL");
+
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::OnMouseWheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent->direction, mouseWheelEvent->modifiers, mouseWheelEvent->x, mouseWheelEvent->y, mouseWheelEvent->z);
 
     Integration::WheelEvent wheelEvent(Integration::WheelEvent::MOUSE_WHEEL, mouseWheelEvent->direction, mouseWheelEvent->modifiers, Vector2(mouseWheelEvent->x, mouseWheelEvent->y), mouseWheelEvent->z, mouseWheelEvent->timestamp);
@@ -2070,7 +2080,6 @@ unsigned int WindowBaseEcoreWl2::GetAuxiliaryHintId(const std::string& hint) con
   return 0;
 }
 
-
 Rect<int> WindowBaseEcoreWl2::RecalculateInputRect(const Rect<int>& rect)
 {
   Rect<int> newRect;
@@ -2925,7 +2934,7 @@ bool WindowBaseEcoreWl2::IsFloatingModeEnabled() const
 
 void WindowBaseEcoreWl2::IncludeInputRegion(const Rect<int>& inputRegion)
 {
-  Rect<int> convertRegion = RecalculateInputRect(inputRegion);
+  Rect<int>      convertRegion = RecalculateInputRect(inputRegion);
   Eina_Rectangle rect;
 
   rect.x = convertRegion.x;
@@ -2940,7 +2949,7 @@ void WindowBaseEcoreWl2::IncludeInputRegion(const Rect<int>& inputRegion)
 
 void WindowBaseEcoreWl2::ExcludeInputRegion(const Rect<int>& inputRegion)
 {
-  Rect<int> convertRegion = RecalculateInputRect(inputRegion);
+  Rect<int>      convertRegion = RecalculateInputRect(inputRegion);
   Eina_Rectangle rect;
 
   rect.x = convertRegion.x;