Add APIs for hit test in web view. 57/254357/9
authorhuayong.xu <huayong.xu@samsung.com>
Mon, 1 Mar 2021 10:20:45 +0000 (18:20 +0800)
committerhuayong.xu <huayong.xu@samsung.com>
Fri, 9 Apr 2021 06:06:51 +0000 (14:06 +0800)
This patch is to add some APIs for hit test into web view.
Meanwhile WebFormRepostDecision is removed.

Change-Id: I54fbb798f36ea6eaab197d993b2691ddfdc20a32

automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-web-engine.cpp
automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp
dali-toolkit/devel-api/controls/web-view/web-form-repost-decision.cpp [deleted file]
dali-toolkit/devel-api/controls/web-view/web-form-repost-decision.h [deleted file]
dali-toolkit/devel-api/controls/web-view/web-view.cpp
dali-toolkit/devel-api/controls/web-view/web-view.h
dali-toolkit/devel-api/file.list
dali-toolkit/internal/controls/web-view/web-view-impl.cpp
dali-toolkit/internal/controls/web-view/web-view-impl.h

index 0b8a473..0b0c203 100755 (executable)
@@ -28,6 +28,7 @@
 #include <dali/devel-api/adaptor-framework/web-engine-cookie-manager.h>
 #include <dali/devel-api/adaptor-framework/web-engine-form-repost-decision.h>
 #include <dali/devel-api/adaptor-framework/web-engine-frame.h>
+#include <dali/devel-api/adaptor-framework/web-engine-hit-test.h>
 #include <dali/devel-api/adaptor-framework/web-engine-http-auth-handler.h>
 #include <dali/devel-api/adaptor-framework/web-engine-load-error.h>
 #include <dali/devel-api/adaptor-framework/web-engine-policy-decision.h>
@@ -38,6 +39,7 @@
 #include <dali/public-api/images/pixel-data.h>
 #include <dali/public-api/object/any.h>
 #include <dali/public-api/object/base-object.h>
+#include <dali/public-api/object/property-map.h>
 #include <memory>
 #include <string.h>
 #include <toolkit-application.h>
@@ -70,6 +72,7 @@ bool OnEvaluteJavaScript();
 bool OnJavaScriptAlert();
 bool OnJavaScriptConfirm();
 bool OnJavaScriptPrompt();
+bool OnHitTestCreated();
 bool OnScrollEdge();
 bool OnScreenshotCaptured();
 bool OnVideoPlaying();
@@ -227,30 +230,6 @@ private:
   Dali::WebEngineContext::CacheModel mockModel;
 };
 
-class MockWebEngineSecurityOrigin : public Dali::WebEngineSecurityOrigin
-{
-public:
-  MockWebEngineSecurityOrigin()
-    : mockUrl("https://test.html")
-    , mockPotocol("https")
-  {
-  }
-
-  std::string GetHost() const
-  {
-    return mockUrl;
-  }
-
-  std::string GetProtocol() const
-  {
-    return mockPotocol;
-  }
-
-private:
-  std::string mockUrl;
-  std::string mockPotocol;
-};
-
 class MockWebEngineCookieManager : public Dali::WebEngineCookieManager
 {
 public:
@@ -701,6 +680,100 @@ public:
   }
 };
 
+class MockWebEngineHitTest : public Dali::WebEngineHitTest
+{
+public:
+  MockWebEngineHitTest()
+  {
+  }
+
+  ResultContext GetResultContext() const override
+  {
+    return ResultContext::DOCUMENT;
+  }
+
+  std::string GetLinkUri() const override
+  {
+    return "http://test.html";
+  }
+
+  std::string GetLinkTitle() const override
+  {
+    return "test";
+  }
+
+  std::string GetLinkLabel() const override
+  {
+    return "label";
+  }
+
+  std::string GetImageUri() const override
+  {
+    return "http://test.jpg";
+  }
+
+  std::string GetMediaUri() const override
+  {
+    return "http://test.mp4";
+  }
+
+  std::string GetTagName() const override
+  {
+    return "img";
+  }
+
+  std::string GetNodeValue() const override
+  {
+    return "test";
+  }
+
+  Dali::Property::Map& GetAttributes() const override
+  {
+    return mockAttributesMap;
+  }
+
+  std::string GetImageFileNameExtension() const override
+  {
+    return "jpg";
+  }
+
+  Dali::PixelData GetImageBuffer() override
+  {
+    uint8_t* faviconData = new uint8_t[ 16 ];
+    memset(faviconData, 0xff, 16);
+    return Dali::PixelData::New( faviconData, 16, 2, 2,
+                                 Dali::Pixel::Format::RGBA8888,
+                                 Dali::PixelData::ReleaseFunction::DELETE_ARRAY );
+  }
+
+private:
+  mutable Dali::Property::Map mockAttributesMap;
+};
+
+class MockWebEngineSecurityOrigin : public Dali::WebEngineSecurityOrigin
+{
+public:
+  MockWebEngineSecurityOrigin()
+    : mockUrl("https://test.html")
+    , mockPotocol("https")
+  {
+  }
+
+  std::string GetHost() const
+  {
+    return mockUrl;
+  }
+
+  std::string GetProtocol() const
+  {
+    return mockPotocol;
+  }
+
+private:
+  std::string mockUrl;
+  std::string mockPotocol;
+};
+
 class MockWebEngineSettings : public WebEngineSettings
 {
 public:
@@ -1103,6 +1176,22 @@ public:
     }
   }
 
+  std::unique_ptr<Dali::WebEngineHitTest> CreateHitTest(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode)
+  {
+    std::unique_ptr<Dali::WebEngineHitTest> hitTest(new MockWebEngineHitTest());
+    return hitTest;
+  }
+
+  bool CreateHitTestAsynchronously(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode, Dali::WebEnginePlugin::WebEngineHitTestCreatedCallback callback)
+  {
+    if (callback)
+    {
+      ConnectToGlobalSignal( &OnHitTestCreated );
+      mHitTestCreatedCallback = callback;
+    }
+    return true;
+  }
+
   void ClearHistory()
   {
     ConnectToGlobalSignal( &OnClearHistory );
@@ -1118,7 +1207,7 @@ public:
     mUserAgent = userAgent;
   }
 
-  void ScrollBy( int dx, int dy )
+  void ScrollBy( int32_t dx, int32_t dy )
   {
     mScrollPosition += Dali::Vector2( dx, dy );
     if ( mScrollPosition.y + mScrollSize.height > mContentSize.height )
@@ -1127,7 +1216,7 @@ public:
     }
   }
 
-  bool ScrollEdgeBy( int dx, int dy )
+  bool ScrollEdgeBy( int32_t dx, int32_t dy )
   {
     mScrollPosition += Dali::Vector2( dx, dy );
     if ( mScrollPosition.y + mScrollSize.height > mContentSize.height )
@@ -1137,7 +1226,7 @@ public:
     return true;
   }
 
-  void SetScrollPosition( int x, int y )
+  void SetScrollPosition( int32_t x, int32_t y )
   {
     mScrollPosition.x = x;
     mScrollPosition.y = y;
@@ -1193,7 +1282,7 @@ public:
     return mScaleFactor;
   }
 
-  Dali::PixelData GetScreenshot(Dali::Rect<int> viewArea, float scaleFactor)
+  Dali::PixelData GetScreenshot(Dali::Rect<int32_t> viewArea, float scaleFactor)
   {
     uint32_t bufferSize = viewArea.width * viewArea.height * 4 ;
     uint8_t* pixel = new uint8_t[ bufferSize ];
@@ -1203,7 +1292,7 @@ public:
                                  Dali::PixelData::ReleaseFunction::DELETE_ARRAY );
   }
 
-  bool GetScreenshotAsynchronously(Dali::Rect<int> viewArea, float scaleFactor, Dali::WebEnginePlugin::ScreenshotCapturedCallback callback)
+  bool GetScreenshotAsynchronously(Dali::Rect<int32_t> viewArea, float scaleFactor, Dali::WebEnginePlugin::ScreenshotCapturedCallback callback)
   {
     if ( callback )
     {
@@ -1347,13 +1436,14 @@ public:
   WebEngineCookieManager*   mockWebEngineCookieManager;
   WebEngineSettings*        mockWebEngineSettings;
 
-  std::vector<JavaScriptEvaluatedResultCallback>       mResultCallbacks;
-  Dali::WebEnginePlugin::JavaScriptAlertCallback       mJavaScriptAlertCallback;
-  Dali::WebEnginePlugin::JavaScriptConfirmCallback     mJavaScriptConfirmCallback;
-  Dali::WebEnginePlugin::JavaScriptPromptCallback      mJavaScriptPromptCallback;
-  Dali::WebEnginePlugin::ScreenshotCapturedCallback    mScreenshotCapturedCallback;
-  Dali::WebEnginePlugin::VideoPlayingCallback          mVideoPlayingCallback;
-  Dali::WebEnginePlugin::GeolocationPermissionCallback mGeolocationPermissionCallback;
+  std::vector<JavaScriptEvaluatedResultCallback>         mResultCallbacks;
+  Dali::WebEnginePlugin::JavaScriptAlertCallback         mJavaScriptAlertCallback;
+  Dali::WebEnginePlugin::JavaScriptConfirmCallback       mJavaScriptConfirmCallback;
+  Dali::WebEnginePlugin::JavaScriptPromptCallback        mJavaScriptPromptCallback;
+  Dali::WebEnginePlugin::ScreenshotCapturedCallback      mScreenshotCapturedCallback;
+  Dali::WebEnginePlugin::VideoPlayingCallback            mVideoPlayingCallback;
+  Dali::WebEnginePlugin::GeolocationPermissionCallback   mGeolocationPermissionCallback;
+  Dali::WebEnginePlugin::WebEngineHitTestCreatedCallback mHitTestCreatedCallback;
 };
 
 
@@ -1519,6 +1609,17 @@ bool OnGeolocationPermission()
   return false;
 }
 
+bool OnHitTestCreated()
+{
+  DisconnectFromGlobalSignal(&OnHitTestCreated);
+  if (gInstance)
+  {
+    std::unique_ptr<Dali::WebEngineHitTest> test(new MockWebEngineHitTest());
+    gInstance->mHitTestCreatedCallback(std::move(test));
+  }
+  return false;
+}
+
 bool OnClearHistory()
 {
   DisconnectFromGlobalSignal( &OnClearHistory );
@@ -1649,11 +1750,11 @@ WebEngine WebEngine::DownCast( BaseHandle handle )
   return WebEngine( dynamic_cast< Internal::Adaptor::WebEngine* >( handle.GetObjectPtr() ) );
 }
 
-void WebEngine::Create( int width, int height, const std::string& locale, const std::string& timezoneId )
+void WebEngine::Create( uint32_t width, uint32_t height, const std::string& locale, const std::string& timezoneId )
 {
 }
 
-void WebEngine::Create( int width, int height, int argc, char** argv )
+void WebEngine::Create( uint32_t width, uint32_t height, uint32_t argc, char** argv )
 {
 }
 
@@ -1827,6 +1928,16 @@ void WebEngine::JavaScriptPromptReply( const std::string& result )
 {
 }
 
+std::unique_ptr<Dali::WebEngineHitTest> WebEngine::CreateHitTest(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode)
+{
+  return Internal::Adaptor::GetImplementation(*this).CreateHitTest(x, y, mode);
+}
+
+bool WebEngine::CreateHitTestAsynchronously(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode, Dali::WebEnginePlugin::WebEngineHitTestCreatedCallback callback)
+{
+  return Internal::Adaptor::GetImplementation(*this).CreateHitTestAsynchronously(x, y, mode, callback);
+}
+
 void WebEngine::ClearAllTilesResources()
 {
 }
@@ -1859,12 +1970,12 @@ void WebEngine::AddDynamicCertificatePath(const std::string& host, const std::st
 {
 }
 
-Dali::PixelData WebEngine::GetScreenshot(Dali::Rect<int> viewArea, float scaleFactor)
+Dali::PixelData WebEngine::GetScreenshot(Dali::Rect<int32_t> viewArea, float scaleFactor)
 {
   return Internal::Adaptor::GetImplementation( *this ).GetScreenshot(viewArea, scaleFactor);
 }
 
-bool WebEngine::GetScreenshotAsynchronously(Dali::Rect<int> viewArea, float scaleFactor, Dali::WebEnginePlugin::ScreenshotCapturedCallback callback)
+bool WebEngine::GetScreenshotAsynchronously(Dali::Rect<int32_t> viewArea, float scaleFactor, Dali::WebEnginePlugin::ScreenshotCapturedCallback callback)
 {
   return Internal::Adaptor::GetImplementation( *this ).GetScreenshotAsynchronously(viewArea, scaleFactor, callback);
 }
@@ -1889,17 +2000,17 @@ void WebEngine::SetUserAgent( const std::string& userAgent )
   Internal::Adaptor::GetImplementation( *this ).SetUserAgent( userAgent );
 }
 
-void WebEngine::ScrollBy( int dx, int dy )
+void WebEngine::ScrollBy( int32_t dx, int32_t dy )
 {
   Internal::Adaptor::GetImplementation( *this ).ScrollBy( dx, dy );
 }
 
-bool WebEngine::ScrollEdgeBy( int dx, int dy )
+bool WebEngine::ScrollEdgeBy( int32_t dx, int32_t dy )
 {
   return Internal::Adaptor::GetImplementation( *this ).ScrollEdgeBy( dx, dy );
 }
 
-void WebEngine::SetScrollPosition( int x, int y )
+void WebEngine::SetScrollPosition( int32_t x, int32_t y )
 {
   Internal::Adaptor::GetImplementation( *this ).SetScrollPosition( x, y );
 }
@@ -1919,7 +2030,7 @@ Dali::Vector2 WebEngine::GetContentSize() const
   return Internal::Adaptor::GetImplementation( *this ).GetContentSize();
 }
 
-void WebEngine::SetSize( int width, int height )
+void WebEngine::SetSize( uint32_t width, uint32_t height )
 {
 }
 
@@ -1993,7 +2104,7 @@ float WebEngine::GetLoadProgressPercentage() const
   return Internal::Adaptor::GetImplementation( *this ).GetLoadProgressPercentage();
 }
 
-void WebEngine::UpdateDisplayArea( Dali::Rect< int > displayArea )
+void WebEngine::UpdateDisplayArea( Dali::Rect< int32_t > displayArea )
 {
 }
 
index 6cacfbf..cf649ce 100755 (executable)
@@ -26,7 +26,9 @@
 #include <dali/devel-api/adaptor-framework/web-engine-console-message.h>
 #include <dali/devel-api/adaptor-framework/web-engine-context-menu.h>
 #include <dali/devel-api/adaptor-framework/web-engine-context-menu-item.h>
+#include <dali/devel-api/adaptor-framework/web-engine-form-repost-decision.h>
 #include <dali/devel-api/adaptor-framework/web-engine-frame.h>
+#include <dali/devel-api/adaptor-framework/web-engine-hit-test.h>
 #include <dali/devel-api/adaptor-framework/web-engine-http-auth-handler.h>
 #include <dali/devel-api/adaptor-framework/web-engine-load-error.h>
 #include <dali/devel-api/adaptor-framework/web-engine-policy-decision.h>
@@ -43,7 +45,6 @@
 #include <dali-toolkit/devel-api/controls/web-view/web-back-forward-list.h>
 #include <dali-toolkit/devel-api/controls/web-view/web-context.h>
 #include <dali-toolkit/devel-api/controls/web-view/web-cookie-manager.h>
-#include <dali-toolkit/devel-api/controls/web-view/web-form-repost-decision.h>
 #include <dali-toolkit/devel-api/controls/web-view/web-settings.h>
 #include <dali-toolkit/devel-api/controls/web-view/web-view.h>
 
@@ -74,7 +75,7 @@ static bool gTouched = false;
 static bool gHovered = false;
 static bool gWheelEventHandled = false;
 static int gFormRepostDecisionCallbackCalled = 0;
-static std::shared_ptr<Dali::Toolkit::WebFormRepostDecision> gFormRepostDecisionInstance = nullptr;
+static std::shared_ptr<Dali::WebEngineFormRepostDecision> gFormRepostDecisionInstance = nullptr;
 static int gFrameRenderedCallbackCalled = 0;
 static int gRequestInterceptorCallbackCalled = 0;
 static std::shared_ptr<Dali::WebEngineRequestInterceptor> gRequestInterceptorInstance = nullptr;
@@ -96,9 +97,10 @@ static int gMimeOverriddenCallbackCalled = 0;
 static std::vector<std::unique_ptr<Dali::WebEngineSecurityOrigin>> gSecurityOriginList;
 static std::vector<std::unique_ptr<Dali::WebEngineContext::PasswordData>> gPasswordDataList;
 static int gContextMenuCustomizedCallbackCalled = 0;
-static std::shared_ptr<Dali::WebEngineContextMenu> gContextMenuInstance = 0;
+static std::shared_ptr<Dali::WebEngineContextMenu> gContextMenuInstance = nullptr;
 static int gContextMenuItemSelectedCallbackCalled = 0;
-static std::shared_ptr<Dali::WebEngineContextMenuItem> gContextMenuItemInstance = 0;
+static std::shared_ptr<Dali::WebEngineContextMenuItem> gContextMenuItemInstance = nullptr;
+static int gHitTestCreatedCallbackCalled = 0;
 
 struct CallbackFunctor
 {
@@ -145,6 +147,12 @@ static void OnUrlChanged( WebView view, const std::string& url )
   gUrlChangedCallbackCalled++;
 }
 
+static bool OnHitTestCreated(std::unique_ptr<Dali::WebEngineHitTest> test)
+{
+  gHitTestCreatedCallbackCalled++;
+  return true;
+}
+
 static void OnPageLoadError(WebView view, std::shared_ptr<Dali::WebEngineLoadError> error)
 {
   gPageLoadErrorCallbackCalled++;
@@ -208,7 +216,7 @@ static bool OnWheelEvent( Actor actor, const Dali::WheelEvent& wheel )
   return true;
 }
 
-static void OnFormRepostDecision(WebView, std::shared_ptr<Dali::Toolkit::WebFormRepostDecision> decision)
+static void OnFormRepostDecision(WebView, std::shared_ptr<Dali::WebEngineFormRepostDecision> decision)
 {
   gFormRepostDecisionCallbackCalled++;
   gFormRepostDecisionInstance = std::move(decision);
@@ -1335,6 +1343,50 @@ int UtcDaliWebViewPolicyDecisionRequest(void)
   END_TEST;
 }
 
+int UtcDaliWebViewHitTest(void)
+{
+  ToolkitTestApplication application;
+
+  WebView view = WebView::New();
+  DALI_TEST_CHECK( view );
+
+  // load url.
+  view.LoadUrl( TEST_URL1 );
+
+  // sync hit test.
+  std::unique_ptr<Dali::WebEngineHitTest> hitTest = view.CreateHitTest(100, 100, Dali::WebEngineHitTest::HitTestMode::DEFAULT);
+  DALI_TEST_CHECK(hitTest != 0);
+  DALI_TEST_EQUALS(hitTest->GetResultContext(), Dali::WebEngineHitTest::ResultContext::DOCUMENT, TEST_LOCATION);
+  std::string testLinkUri("http://test.html");
+  DALI_TEST_EQUALS(hitTest->GetLinkUri(), testLinkUri, TEST_LOCATION);
+  std::string testLinkTitle("test");
+  DALI_TEST_EQUALS(hitTest->GetLinkTitle(), testLinkTitle, TEST_LOCATION);
+  std::string testLinkLabel("label");
+  DALI_TEST_EQUALS(hitTest->GetLinkLabel(), testLinkLabel, TEST_LOCATION);
+  std::string testImageUri("http://test.jpg");
+  DALI_TEST_EQUALS(hitTest->GetImageUri(), testImageUri, TEST_LOCATION);
+  std::string testMediaUri("http://test.mp4");
+  DALI_TEST_EQUALS(hitTest->GetMediaUri(), testMediaUri, TEST_LOCATION);
+  std::string testTagName("img");
+  DALI_TEST_EQUALS(hitTest->GetTagName(), testTagName, TEST_LOCATION);
+  std::string testNodeValue("test");
+  DALI_TEST_EQUALS(hitTest->GetNodeValue(), testNodeValue, TEST_LOCATION);
+  Dali::Property::Map* testMap = &hitTest->GetAttributes();
+  DALI_TEST_CHECK(testMap);
+  std::string testImageFileNameExtension("jpg");
+  DALI_TEST_EQUALS(hitTest->GetImageFileNameExtension(), testImageFileNameExtension, TEST_LOCATION);
+  Dali::PixelData testImageBuffer = hitTest->GetImageBuffer();
+  DALI_TEST_CHECK((int)testImageBuffer.GetWidth() == 2 && (int)testImageBuffer.GetHeight() == 2);
+
+  // async...
+  bool result = view.CreateHitTestAsynchronously(100, 100, Dali::WebEngineHitTest::HitTestMode::DEFAULT, &OnHitTestCreated);
+  DALI_TEST_CHECK(result);
+  Test::EmitGlobalTimerSignal();
+  DALI_TEST_EQUALS( gHitTestCreatedCallbackCalled, 1, TEST_LOCATION );
+
+  END_TEST;
+}
+
 int UtcDaliWebViewEvaluteJavaScript(void)
 {
   ToolkitTestApplication application;
diff --git a/dali-toolkit/devel-api/controls/web-view/web-form-repost-decision.cpp b/dali-toolkit/devel-api/controls/web-view/web-form-repost-decision.cpp
deleted file mode 100644 (file)
index 219d2ca..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2021 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// CLASS HEADER
-#include <dali-toolkit/devel-api/controls/web-view/web-form-repost-decision.h>
-
-// EXTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/web-engine-form-repost-decision.h>
-
-namespace Dali
-{
-namespace Toolkit
-{
-WebFormRepostDecision::WebFormRepostDecision(std::shared_ptr<Dali::WebEngineFormRepostDecision> decision)
-: mFormRepostDecision(std::move(decision))
-{
-}
-
-WebFormRepostDecision::~WebFormRepostDecision()
-{
-}
-
-void WebFormRepostDecision::Reply(bool allowed)
-{
-  if(mFormRepostDecision)
-  {
-    mFormRepostDecision->Reply(allowed);
-  }
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
diff --git a/dali-toolkit/devel-api/controls/web-view/web-form-repost-decision.h b/dali-toolkit/devel-api/controls/web-view/web-form-repost-decision.h
deleted file mode 100755 (executable)
index 755fe57..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-#ifndef DALI_TOOLKIT_WEB_FORM_REPOST_DECISION_H
-#define DALI_TOOLKIT_WEB_FORM_REPOST_DECISION_H
-
-/*
- * Copyright (c) 2021 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <memory>
-#include <string>
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/dali-toolkit-common.h>
-
-namespace Dali
-{
-class WebEngineFormRepostDecision;
-
-namespace Toolkit
-{
-/**
- * @addtogroup dali_toolkit_controls_web_view
- * @{
- */
-
-/**
- * @brief WebFormRepostDecision is a class for form repost decision of WebView.
- *
- *
- * For working WebFormRepostDecision, a Dali::WebEngineFormRepostDecision should be provided.
- *
- */
-class DALI_TOOLKIT_API WebFormRepostDecision
-{
-public:
-  /**
-   * @brief Creates a WebFormRepostDecision.
-   */
-  WebFormRepostDecision(std::shared_ptr<Dali::WebEngineFormRepostDecision> decision);
-
-  /**
-   * @brief Destructor.
-   */
-  virtual ~WebFormRepostDecision() final;
-
-  /**
-   * @brief Reply the result about form repost decision.
-   *
-   * @param[in] allowed Whether allow form repost decision request or not
-   */
-  void Reply(bool allowed);
-
-private:
-  std::shared_ptr<Dali::WebEngineFormRepostDecision> mFormRepostDecision;
-};
-
-/**
- * @}
- */
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // DALI_TOOLKIT_WEB_FORM_REPOST_DECISION_H
index f73e9dc..d3c201a 100755 (executable)
@@ -59,7 +59,7 @@ WebView WebView::New(const std::string& locale, const std::string& timezoneId)
   return Internal::WebView::New(locale, timezoneId);
 }
 
-WebView WebView::New(int argc, char** argv)
+WebView WebView::New(uint32_t argc, char** argv)
 {
   return Internal::WebView::New(argc, argv);
 }
@@ -169,12 +169,12 @@ bool WebView::StopInspectorServer()
   return Dali::Toolkit::GetImpl(*this).StopInspectorServer();
 }
 
-void WebView::ScrollBy(int deltaX, int deltaY)
+void WebView::ScrollBy(int32_t deltaX, int32_t deltaY)
 {
   Dali::Toolkit::GetImpl(*this).ScrollBy(deltaX, deltaY);
 }
 
-bool WebView::ScrollEdgeBy(int deltaX, int deltaY)
+bool WebView::ScrollEdgeBy(int32_t deltaX, int32_t deltaY)
 {
   return Dali::Toolkit::GetImpl(*this).ScrollEdgeBy(deltaX, deltaY);
 }
@@ -244,6 +244,16 @@ void WebView::JavaScriptPromptReply(const std::string& result)
   Dali::Toolkit::GetImpl(*this).JavaScriptPromptReply(result);
 }
 
+std::unique_ptr<Dali::WebEngineHitTest> WebView::CreateHitTest(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode)
+{
+  return Dali::Toolkit::GetImpl(*this).CreateHitTest(x, y, mode);
+}
+
+bool WebView::CreateHitTestAsynchronously(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode, Dali::WebEnginePlugin::WebEngineHitTestCreatedCallback callback)
+{
+  return Dali::Toolkit::GetImpl(*this).CreateHitTestAsynchronously(x, y, mode, callback);
+}
+
 void WebView::ClearHistory()
 {
   Dali::Toolkit::GetImpl(*this).ClearHistory();
@@ -279,12 +289,12 @@ void WebView::AddDynamicCertificatePath(const std::string& host, const std::stri
   Dali::Toolkit::GetImpl(*this).AddDynamicCertificatePath(host, certPath);
 }
 
-Dali::Toolkit::ImageView WebView::GetScreenshot(Dali::Rect<int> viewArea, float scaleFactor)
+Dali::Toolkit::ImageView WebView::GetScreenshot(Dali::Rect<int32_t> viewArea, float scaleFactor)
 {
   return Dali::Toolkit::GetImpl(*this).GetScreenshot(viewArea, scaleFactor);
 }
 
-bool WebView::GetScreenshotAsynchronously(Dali::Rect<int> viewArea, float scaleFactor, Dali::Toolkit::WebView::WebViewScreenshotCapturedCallback callback)
+bool WebView::GetScreenshotAsynchronously(Dali::Rect<int32_t> viewArea, float scaleFactor, Dali::Toolkit::WebView::WebViewScreenshotCapturedCallback callback)
 {
   return Dali::Toolkit::GetImpl(*this).GetScreenshotAsynchronously(viewArea, scaleFactor, callback);
 }
index 6d8d3b9..4f9159d 100755 (executable)
@@ -216,7 +216,7 @@ public:
   /**
    * @brief WebView signal type related with form repost decision.
    */
-  using WebViewFormRepostDecisionSignalType = Signal<void(WebView, std::shared_ptr<Dali::Toolkit::WebFormRepostDecision>)>;
+  using WebViewFormRepostDecisionSignalType = Signal<void(WebView, std::shared_ptr<Dali::WebEngineFormRepostDecision>)>;
 
   /**
    * @brief WebView signal type related with frame rendered.
@@ -260,7 +260,7 @@ public:
 
 public:
   /**
-   * @brief Creates an initialized WebView.
+   * @brief Create an initialized WebView.
    * @return A handle to a newly allocated Dali WebView
    *
    * @note WebView will not display anything
@@ -268,7 +268,7 @@ public:
   static WebView New();
 
   /**
-   * @brief Creates an initialized WebView.
+   * @brief Create an initialized WebView.
    *
    * @param [in] locale The locale of Web
    * @param [in] timezoneId The timezoneId of Web
@@ -276,15 +276,15 @@ public:
   static WebView New(const std::string& locale, const std::string& timezoneId);
 
   /**
-   * @brief Creates an initialized WebView.
+   * @brief Create an initialized WebView.
    *
    * @param [in] argc The count of arguments of Applications
    * @param [in] argv The string array of arguments of Applications
    */
-  static WebView New(int argc, char** argv);
+  static WebView New(uint32_t argc, char** argv);
 
   /**
-   * @brief Creates an uninitialized WebView.
+   * @brief Create an uninitialized WebView.
    */
   WebView();
 
@@ -311,7 +311,7 @@ public:
   WebView& operator=(const WebView& WebView);
 
   /**
-   * @brief Downcasts a handle to WebView handle.
+   * @brief Downcast a handle to WebView handle.
    *
    * If handle points to a WebView, the downcast produces valid handle.
    * If not, the returned handle is left uninitialized.
@@ -349,14 +349,14 @@ public:
   Dali::Toolkit::ImageView& GetFavicon();
 
   /**
-   * @brief Loads a web page based on a given URL.
+   * @brief Load a web page based on a given URL.
    *
    * @param [in] url The URL of the resource to load
    */
   void LoadUrl(const std::string& url);
 
   /**
-   * @brief Loads a given string as web contents.
+   * @brief Load a given string as web contents.
    *
    * @param [in] htmlString The string to use as the contents of the web page
    */
@@ -374,7 +374,7 @@ public:
   bool LoadHtmlStringOverrideCurrentEntry(const std::string& html, const std::string& basicUri, const std::string& unreachableUrl);
 
   /**
-   * @brief Requests loading the given contents by MIME type into the view object
+   * @brief Request loading the given contents by MIME type into the view object
    *
    * @param[in] contents The content to load
    * @param[in] contentSize The size of contents (in bytes)
@@ -387,27 +387,27 @@ public:
   bool LoadContents(const std::string& contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri);
 
   /**
-   * @brief Reloads the Web.
+   * @brief Reload the Web.
    */
   void Reload();
 
   /**
-   * @brief Reloads the current page's document without cache
+   * @brief Reload the current page's document without cache
    */
   bool ReloadWithoutCache();
 
   /**
-   * @brief Stops loading web contents on the current page.
+   * @brief Stop loading web contents on the current page.
    */
   void StopLoading();
 
   /**
-   * @brief Suspends the operation associated with the view.
+   * @brief Suspend the operation associated with the view.
    */
   void Suspend();
 
   /**
-   * @brief Resumes the operation associated with the view object after calling Suspend().
+   * @brief Resume the operation associated with the view object after calling Suspend().
    */
   void Resume();
 
@@ -457,48 +457,48 @@ public:
   bool StopInspectorServer();
 
   /**
-   * @brief Scrolls web page of view by deltaX and deltaY.
+   * @brief Scroll web page of view by deltaX and deltaY.
    * @param[in] deltaX The delta x of scroll
    * @param[in] deltaY The delta y of scroll
    */
-  void ScrollBy(int deltaX, int deltaY);
+  void ScrollBy(int32_t deltaX, int32_t deltaY);
 
   /**
-   * @brief Scrolls edge of view by deltaX and deltaY.
+   * @brief Scroll edge of view by deltaX and deltaY.
    *
    * @param[in] deltaX horizontal offset to scroll
    * @param[in] deltaY vertical offset to scroll
    *
    * @return true if succeeded, false otherwise
    */
-  bool ScrollEdgeBy(int deltaX, int deltaY);
+  bool ScrollEdgeBy(int32_t deltaX, int32_t deltaY);
 
   /**
-   * @brief Returns whether forward is possible.
+   * @brief Return whether forward is possible.
    *
    * @return True if forward is possible, false otherwise
    */
   bool CanGoForward();
 
   /**
-   * @brief Goes forward in the navigation history.
+   * @brief Go forward in the navigation history.
    */
   void GoForward();
 
   /**
-   * @brief Returns whether backward is possible.
+   * @brief Return whether backward is possible.
    *
    * @return True if backward is possible, false otherwise
    */
   bool CanGoBack();
 
   /**
-   * @brief Goes back in the navigation history.
+   * @brief Go back in the navigation history.
    */
   void GoBack();
 
   /**
-   * @brief Evaluates JavaScript code represented as a string.
+   * @brief Evaluate JavaScript code represented as a string.
    *
    * @param[in] script The JavaScript code
    * @param[in] resultHandler The callback function to be called by the JavaScript runtime. This carries evaluation result
@@ -506,7 +506,7 @@ public:
   void EvaluateJavaScript(const std::string& script, std::function<void(const std::string&)> resultHandler);
 
   /**
-   * @brief Evaluates JavaScript code represented as a string.
+   * @brief Evaluate JavaScript code represented as a string.
    *
    * @param[in] script The JavaScript code
    */
@@ -577,24 +577,47 @@ public:
   void JavaScriptPromptReply(const std::string& result);
 
   /**
-   * @brief Clears the history of Web.
+   * @brief Create a new hit test.
+   *
+   * @param[in] x the horizontal position to query
+   * @param[in] y the vertical position to query
+   * @param[in] mode the mode of hit test
+   *
+   * @return a new hit test object.
+   */
+  std::unique_ptr<Dali::WebEngineHitTest> CreateHitTest(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode);
+
+  /**
+   * @brief Create a hit test asynchronously.
+   *
+   * @param[in] x the horizontal position to query
+   * @param[in] y the vertical position to query
+   * @param[in] mode the mode of hit test
+   * @param[in] callback The callback function
+   *
+   * @return true if succeeded, false otherwise.
+   */
+  bool CreateHitTestAsynchronously(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode, Dali::WebEnginePlugin::WebEngineHitTestCreatedCallback callback);
+
+  /**
+   * @brief Clear the history of Web.
    */
   void ClearHistory();
 
   /**
-   * @brief Clears all tiles resources of Web.
+   * @brief Clear all tiles resources of Web.
    */
   void ClearAllTilesResources();
 
   /**
-   * @brief Scales the current page, centered at the given point.
+   * @brief Scale the current page, centered at the given point.
    * @param[in] scaleFactor a new factor to be scaled.
    * @param[in] point a center coordinate.
    */
   void SetScaleFactor(float scaleFactor, Dali::Vector2 point);
 
   /**
-   * @brief Gets the current scale factor of the page.
+   * @brief Get the current scale factor of the page.
    * @return The current scale factor.
    */
   float GetScaleFactor() const;
@@ -606,7 +629,7 @@ public:
   void ActivateAccessibility(bool activated);
 
   /**
-   * @brief Searches and highlights the given string in the document.
+   * @brief Search and highlights the given string in the document.
    * @param[in] text The text to find
    * @param[in] options The options to find
    * @param[in] maxMatchCount The maximum match count to find
@@ -630,7 +653,7 @@ public:
    *
    * @return image view of screen shot
    */
-  Dali::Toolkit::ImageView GetScreenshot(Dali::Rect<int> viewArea, float scaleFactor);
+  Dali::Toolkit::ImageView GetScreenshot(Dali::Rect<int32_t> viewArea, float scaleFactor);
 
   /**
    * @brief Request to get snapshot of the specified viewArea of page asynchronously.
@@ -641,7 +664,7 @@ public:
    *
    * @return true if requested successfully, false otherwise
    */
-  bool GetScreenshotAsynchronously(Dali::Rect<int> viewArea, float scaleFactor, WebViewScreenshotCapturedCallback callback);
+  bool GetScreenshotAsynchronously(Dali::Rect<int32_t> viewArea, float scaleFactor, WebViewScreenshotCapturedCallback callback);
 
   /**
    * @brief Asynchronous request to check if there is a video playing in the given view.
@@ -774,14 +797,14 @@ public:
 public: // Not intended for application developers
   /// @cond internal
   /**
-   * @brief Creates a handle using the Toolkit::Internal implementation.
+   * @brief Create a handle using the Toolkit::Internal implementation.
    *
    * @param[in] implementation The WebView implementation
    */
   DALI_INTERNAL WebView(Internal::WebView& implementation);
 
   /**
-   * @brief Allows the creation of this WebView from an Internal::CustomActor pointer.
+   * @brief Allow the creation of this WebView from an Internal::CustomActor pointer.
    *
    * @param[in] internal A pointer to the internal CustomActor
    */
index 716c86c..f583d3c 100755 (executable)
@@ -42,7 +42,6 @@ SET( devel_api_src_files
   ${devel_api_src_dir}/controls/web-view/web-back-forward-list.cpp
   ${devel_api_src_dir}/controls/web-view/web-context.cpp
   ${devel_api_src_dir}/controls/web-view/web-cookie-manager.cpp
-  ${devel_api_src_dir}/controls/web-view/web-form-repost-decision.cpp
   ${devel_api_src_dir}/controls/web-view/web-settings.cpp
   ${devel_api_src_dir}/controls/web-view/web-view.cpp
   ${devel_api_src_dir}/focus-manager/keyinput-focus-manager.cpp
@@ -258,7 +257,6 @@ SET( devel_api_web_view_header_files
   ${devel_api_src_dir}/controls/web-view/web-back-forward-list.h
   ${devel_api_src_dir}/controls/web-view/web-context.h
   ${devel_api_src_dir}/controls/web-view/web-cookie-manager.h
-  ${devel_api_src_dir}/controls/web-view/web-form-repost-decision.h
   ${devel_api_src_dir}/controls/web-view/web-settings.h
   ${devel_api_src_dir}/controls/web-view/web-view.h
 )
index 0dd6834..6a3af8d 100644 (file)
@@ -27,6 +27,7 @@
 #include <dali/devel-api/adaptor-framework/web-engine-context.h>
 #include <dali/devel-api/adaptor-framework/web-engine-cookie-manager.h>
 #include <dali/devel-api/adaptor-framework/web-engine-form-repost-decision.h>
+#include <dali/devel-api/adaptor-framework/web-engine-hit-test.h>
 #include <dali/devel-api/adaptor-framework/web-engine-http-auth-handler.h>
 #include <dali/devel-api/adaptor-framework/web-engine-load-error.h>
 #include <dali/devel-api/adaptor-framework/web-engine-policy-decision.h>
@@ -46,7 +47,6 @@
 #include <dali-toolkit/devel-api/controls/web-view/web-back-forward-list.h>
 #include <dali-toolkit/devel-api/controls/web-view/web-context.h>
 #include <dali-toolkit/devel-api/controls/web-view/web-cookie-manager.h>
-#include <dali-toolkit/devel-api/controls/web-view/web-form-repost-decision.h>
 #include <dali-toolkit/devel-api/controls/web-view/web-settings.h>
 #include <dali-toolkit/devel-api/image-loader/texture-manager.h>
 #include <dali-toolkit/internal/visuals/visual-factory-impl.h>
@@ -141,7 +141,7 @@ WebView::WebView(const std::string& locale, const std::string& timezoneId)
   }
 }
 
-WebView::WebView(int argc, char** argv)
+WebView::WebView(uint32_t argc, char** argv)
 : Control(ControlBehaviour(ACTOR_BEHAVIOUR_DEFAULT | DISABLE_STYLE_CHANGE_SIGNALS)),
   mUrl(),
   mVisual(),
@@ -196,7 +196,7 @@ Toolkit::WebView WebView::New(const std::string& locale, const std::string& time
   return handle;
 }
 
-Toolkit::WebView WebView::New(int argc, char** argv)
+Toolkit::WebView WebView::New(uint32_t argc, char** argv)
 {
   WebView*         impl   = new WebView(argc, argv);
   Toolkit::WebView handle = Toolkit::WebView(*impl);
@@ -449,7 +449,7 @@ bool WebView::StopInspectorServer()
   return mWebEngine ? mWebEngine.StopInspectorServer() : false;
 }
 
-void WebView::ScrollBy(int deltaX, int deltaY)
+void WebView::ScrollBy(int32_t deltaX, int32_t deltaY)
 {
   if(mWebEngine)
   {
@@ -457,7 +457,7 @@ void WebView::ScrollBy(int deltaX, int deltaY)
   }
 }
 
-bool WebView::ScrollEdgeBy(int deltaX, int deltaY)
+bool WebView::ScrollEdgeBy(int32_t deltaX, int32_t deltaY)
 {
   return mWebEngine ? mWebEngine.ScrollEdgeBy(deltaX, deltaY) : false;
 }
@@ -552,6 +552,27 @@ void WebView::JavaScriptPromptReply(const std::string& result)
   }
 }
 
+std::unique_ptr<Dali::WebEngineHitTest> WebView::CreateHitTest(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode)
+{
+  std::unique_ptr<Dali::WebEngineHitTest> webHitTest;
+  if(!mWebEngine)
+  {
+    return webHitTest;
+  }
+
+  return mWebEngine.CreateHitTest(x, y, mode);
+}
+
+bool WebView::CreateHitTestAsynchronously(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode, Dali::WebEnginePlugin::WebEngineHitTestCreatedCallback callback)
+{
+  bool result = false;
+  if(mWebEngine)
+  {
+    result = mWebEngine.CreateHitTestAsynchronously(x, y, mode, callback);
+  }
+  return result;
+}
+
 void WebView::ClearHistory()
 {
   if(mWebEngine)
@@ -602,7 +623,7 @@ void WebView::AddDynamicCertificatePath(const std::string& host, const std::stri
   }
 }
 
-Dali::Toolkit::ImageView WebView::GetScreenshot(Dali::Rect<int> viewArea, float scaleFactor)
+Dali::Toolkit::ImageView WebView::GetScreenshot(Dali::Rect<int32_t> viewArea, float scaleFactor)
 {
   Dali::Toolkit::ImageView imageView;
   if(mWebEngine)
@@ -613,7 +634,7 @@ Dali::Toolkit::ImageView WebView::GetScreenshot(Dali::Rect<int> viewArea, float
   return imageView;
 }
 
-bool WebView::GetScreenshotAsynchronously(Dali::Rect<int> viewArea, float scaleFactor, Dali::Toolkit::WebView::WebViewScreenshotCapturedCallback callback)
+bool WebView::GetScreenshotAsynchronously(Dali::Rect<int32_t> viewArea, float scaleFactor, Dali::Toolkit::WebView::WebViewScreenshotCapturedCallback callback)
 {
   mScreenshotCapturedCallback = callback;
   return mWebEngine ? mWebEngine.GetScreenshotAsynchronously(viewArea, scaleFactor, std::bind(&WebView::OnScreenshotCaptured, this, std::placeholders::_1)) : false;
@@ -644,7 +665,7 @@ void WebView::UpdateDisplayArea(Dali::PropertyNotification& /*source*/)
   Vector3 anchorPointOffSet       = actorSize * (positionUsesAnchorPoint ? self.GetCurrentProperty<Vector3>(Actor::Property::ANCHOR_POINT) : AnchorPoint::TOP_LEFT);
   Vector2 screenPosition          = self.GetProperty<Vector2>(Actor::Property::SCREEN_POSITION);
 
-  Dali::Rect<int> displayArea;
+  Dali::Rect<int32_t> displayArea;
   displayArea.x      = screenPosition.x - anchorPointOffSet.x;
   displayArea.y      = screenPosition.y - anchorPointOffSet.y;
   displayArea.width  = actorSize.x;
@@ -831,9 +852,8 @@ void WebView::OnFormRepostDecision(std::shared_ptr<Dali::WebEngineFormRepostDeci
 {
   if(!mFormRepostDecisionSignal.Empty())
   {
-    Dali::Toolkit::WebView                                handle(GetOwner());
-    std::shared_ptr<Dali::Toolkit::WebFormRepostDecision> repostDecision(new Dali::Toolkit::WebFormRepostDecision(decision));
-    mFormRepostDecisionSignal.Emit(handle, std::move(repostDecision));
+    Dali::Toolkit::WebView handle(GetOwner());
+    mFormRepostDecisionSignal.Emit(handle, std::move(decision));
   }
 }
 
@@ -1277,7 +1297,7 @@ bool WebView::OnKeyEvent(const Dali::KeyEvent& event)
 bool WebView::OnHoverEvent(Actor actor, const Dali::HoverEvent& hover)
 {
   bool result = false;
-  if(mWebEngine)
+  if(mWebEngine && mMouseEventsEnabled)
   {
     result = mWebEngine.SendHoverEvent(hover);
   }
@@ -1287,7 +1307,7 @@ bool WebView::OnHoverEvent(Actor actor, const Dali::HoverEvent& hover)
 bool WebView::OnWheelEvent(Actor actor, const Dali::WheelEvent& wheel)
 {
   bool result = false;
-  if(mWebEngine)
+  if(mWebEngine && mMouseEventsEnabled)
   {
     result = mWebEngine.SendWheelEvent(wheel);
   }
@@ -1314,7 +1334,7 @@ void WebView::OnKeyInputFocusLost()
   EmitKeyInputFocusSignal(false); // Calls back into the Control hence done last.
 }
 
-void WebView::SetScrollPosition(int x, int y)
+void WebView::SetScrollPosition(int32_t x, int32_t y)
 {
   if(mWebEngine)
   {
index 99a964c..4031ee6 100755 (executable)
@@ -52,7 +52,7 @@ protected:
 
   WebView(const std::string& locale, const std::string& timezoneId);
 
-  WebView(int argc, char** argv);
+  WebView(uint32_t argc, char** argv);
 
   virtual ~WebView();
 
@@ -68,34 +68,32 @@ public:
   static Toolkit::WebView New(const std::string& locale, const std::string& timezoneId);
 
   /**
-   * @copydoc Dali::Toolkit::WebView::New( int, char** )
+   * @copydoc Dali::Toolkit::WebView::New( uint32_t, char** )
    */
-  static Toolkit::WebView New(int argc, char** argv);
+  static Toolkit::WebView New(uint32_t argc, char** argv);
 
   /**
-   * @brief Get settings of WebEngine.
+   * @copydoc Dali::Toolkit::WebView::GetSettings()
    */
   Dali::Toolkit::WebSettings* GetSettings() const;
 
   /**
-   * @brief Get context of WebEngine.
+   * @copydoc Dali::Toolkit::WebView::GetContext()
    */
   Dali::Toolkit::WebContext* GetContext() const;
 
   /**
-   * @brief Get cookie manager of WebEngine.
+   * @copydoc Dali::Toolkit::WebView::GetCookieManager()
    */
   Dali::Toolkit::WebCookieManager* GetCookieManager() const;
 
   /**
-   * @brief Get WebBackForwardList of WebEngine.
+   * @copydoc Dali::Toolkit::WebView::GetBackForwardList()
    */
   Dali::Toolkit::WebBackForwardList* GetBackForwardList() const;
 
   /**
-   * @brief Get Favicon of web page.
-   *
-   * @return Handle to a fav icon
+   * @copydoc Dali::Toolkit::WebView::GetFavicon()
    */
   Dali::Toolkit::ImageView& GetFavicon();
 
@@ -177,12 +175,12 @@ public:
   /**
    * @copydoc Dali::Toolkit::WebView::ScrollBy()
    */
-  void ScrollBy(int deltaX, int deltaY);
+  void ScrollBy(int32_t deltaX, int32_t deltaY);
 
   /**
    * @copydoc Dali::WebEngine::ScrollEdgeBy()
    */
-  bool ScrollEdgeBy(int deltaX, int deltaY);
+  bool ScrollEdgeBy(int32_t deltaX, int32_t deltaY);
 
   /**
    * @copydoc Dali::Toolkit::WebView::CanGoForward()
@@ -245,6 +243,16 @@ public:
   void JavaScriptPromptReply(const std::string& result);
 
   /**
+   * @copydoc Dali::Toolkit::WebView::CreateHitTest()
+   */
+  std::unique_ptr<Dali::WebEngineHitTest> CreateHitTest(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::CreateHitTestAsynchronously()
+   */
+  bool CreateHitTestAsynchronously(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode, Dali::WebEnginePlugin::WebEngineHitTestCreatedCallback callback);
+
+  /**
    * @copydoc Dali::Toolkit::WebView::ClearHistory()
    */
   void ClearHistory();
@@ -282,12 +290,12 @@ public:
   /**
    * @copydoc Dali::Toolkit::WebView::GetScreenshot()
    */
-  Dali::Toolkit::ImageView GetScreenshot(Dali::Rect<int> viewArea, float scaleFactor);
+  Dali::Toolkit::ImageView GetScreenshot(Dali::Rect<int32_t> viewArea, float scaleFactor);
 
   /**
    * @copydoc Dali::Toolkit::WebView::GetScreenshotAsynchronously()
    */
-  bool GetScreenshotAsynchronously(Dali::Rect<int> viewArea, float scaleFactor, Dali::Toolkit::WebView::WebViewScreenshotCapturedCallback callback);
+  bool GetScreenshotAsynchronously(Dali::Rect<int32_t> viewArea, float scaleFactor, Dali::Toolkit::WebView::WebViewScreenshotCapturedCallback callback);
 
   /**
    * @copydoc Dali::Toolkit::WebView::CheckVideoPlayingAsynchronously()
@@ -451,10 +459,10 @@ private:
    * @param[in] x The coordinate x of scroll
    * @param[in] y The coordinate y of scroll
    */
-  void SetScrollPosition(int x, int y);
+  void SetScrollPosition(int32_t x, int32_t y);
 
   /**
-   * @brief Gets the current scroll position of the given view.
+   * @brief Get the current scroll position of the given view.
    * @param[out] x The coordinate x of scroll
    * @param[out] y The coordinate y of scroll
    */
@@ -640,7 +648,7 @@ private:
   void OnUrlChanged(const std::string& url);
 
   /**
-   * Signal occurs when the Web View has been touched.
+   * @brief Signal occurs when the Web View has been touched.
    * @param[in] actor The Actor Touched
    * @param[in] touch The Touch Data.
    * @return Whether to consume event or not.
@@ -648,7 +656,7 @@ private:
   bool OnTouchEvent(Actor actor, const Dali::TouchEvent& touch);
 
   /**
-   * Signal occurs when the Web View has been hovered.
+   * @brief Signal occurs when the Web View has been hovered.
    * @param[in] actor The Actor Hovered
    * @param[in] hover The Hover Data.
    * @return Whether to consume event or not.
@@ -656,7 +664,7 @@ private:
   bool OnHoverEvent(Actor actor, const Dali::HoverEvent& hover);
 
   /**
-   * Signal occurs when the Web View receives wheel event.
+   * @brief Signal occurs when the Web View receives wheel event.
    * @param[in] actor The Actor that receives Wheel event.
    * @param[in] wheel The Wheel Data.
    * @return Whether to consume event or not.
@@ -769,7 +777,7 @@ private:
   Dali::PropertyNotification mPositionUpdateNotification;
   Dali::PropertyNotification mSizeUpdateNotification;
   Dali::PropertyNotification mScaleUpdateNotification;
-  Dali::Rect<int>            mWebViewArea;
+  Dali::Rect<int32_t>        mWebViewArea;
   bool                       mVideoHoleEnabled;
   bool                       mMouseEventsEnabled;
   bool                       mKeyEventsEnabled;