Update position & size of web engine. 71/247971/11
authorhuayong.xu <huayong.xu@samsung.com>
Mon, 9 Nov 2020 10:06:59 +0000 (18:06 +0800)
committerhuayong.xu <huayong.xu@samsung.com>
Wed, 27 Jan 2021 06:12:25 +0000 (14:12 +0800)
Originally position of web engine is not updated when position of
web view is changed.
This patch is to update position & size of web engine.

Change-Id: I7ec0a70a12a4ce19c3d4ddec54f127415f13c40e

dali/devel-api/adaptor-framework/web-engine-plugin.h
dali/devel-api/adaptor-framework/web-engine.cpp
dali/devel-api/adaptor-framework/web-engine.h
dali/internal/web-engine/common/web-engine-impl.cpp
dali/internal/web-engine/common/web-engine-impl.h

index 118446d..f74c41a 100755 (executable)
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/images/native-image-interface.h>
+#include <dali/public-api/math/rect.h>
 #include <dali/public-api/signals/dali-signal.h>
 #include <functional>
 
@@ -294,6 +295,18 @@ public:
   virtual void SetFocus( bool focused ) = 0;
 
   /**
+   * @brief Update display area.
+   * @param[in] displayArea The display area need be updated.
+   */
+  virtual void UpdateDisplayArea( Dali::Rect< int > displayArea ) = 0;
+
+  /**
+   * @brief Enable video hole.
+   * @param[in] enabled True if enabled, false othewise.
+   */
+  virtual void EnableVideoHole( bool enabled ) = 0;
+
+  /**
    * @brief Connects to this signal to be notified when page loading is started.
    *
    * @return A signal object to connect with.
index e454f0d..17318de 100755 (executable)
@@ -249,6 +249,16 @@ void WebEngine::SetFocus( bool focused )
   GetImplementation( *this ).SetFocus( focused );
 }
 
+void WebEngine::UpdateDisplayArea( Dali::Rect< int > displayArea )
+{
+  GetImplementation( *this ).UpdateDisplayArea( displayArea );
+}
+
+void WebEngine::EnableVideoHole( bool enabled )
+{
+  GetImplementation( *this ).EnableVideoHole( enabled );
+}
+
 Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadStartedSignal()
 {
   return GetImplementation(*this).PageLoadStartedSignal();
index 040a521..102ea8c 100755 (executable)
@@ -295,10 +295,23 @@ public:
 
   /**
    * @brief Set focus.
+   * @param[in] focused True if web view is focused, false otherwise
    */
   void SetFocus( bool focused );
 
   /**
+   * @brief Update display area.
+   * @param[in] displayArea The area to display web page.
+   */
+  void UpdateDisplayArea( Dali::Rect< int > displayArea );
+
+  /**
+   * @brief Enable video hole.
+   * @param[in] enabled True if video hole is enabled, false otherwise
+   */
+  void EnableVideoHole( bool enabled );
+
+  /**
    * @brief Connects to this signal to be notified when page loading is started.
    *
    * @return A signal object to connect with.
index 0a6ecf0..c9df245 100755 (executable)
@@ -348,6 +348,16 @@ void WebEngine::SetFocus( bool focused )
   mPlugin->SetFocus( focused );
 }
 
+void WebEngine::UpdateDisplayArea( Dali::Rect< int > displayArea )
+{
+  mPlugin->UpdateDisplayArea( displayArea );
+}
+
+void WebEngine::EnableVideoHole( bool enabled )
+{
+  mPlugin->EnableVideoHole( enabled );
+}
+
 Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadStartedSignal()
 {
   return mPlugin->PageLoadStartedSignal();
index dea65ba..c4bac08 100755 (executable)
@@ -239,6 +239,16 @@ public:
   void SetFocus( bool focused );
 
   /**
+   * @copydoc Dali::WebEngine::UpdateDisplayArea()
+   */
+  void UpdateDisplayArea( Dali::Rect< int > displayArea );
+
+  /**
+   * @copydoc Dali::WebEngine::EnableVideoHole()
+   */
+  void EnableVideoHole( bool enabled );
+
+  /**
    * @copydoc Dali::WebEngine::PageLoadStartedSignal()
    */
   Dali::WebEnginePlugin::WebEnginePageLoadSignalType& PageLoadStartedSignal();