+std::unordered_map<Dali::WebEnginePlugin*, Dali::WeakHandle<Toolkit::WebView>>& GetPluginWebViewTable()
+{
+ static std::unordered_map<Dali::WebEnginePlugin*, Dali::WeakHandle<Toolkit::WebView>> pluginWebViewMap;
+ return pluginWebViewMap;
+}
+
+enum class DisplayAreaCalculateOption
+{
+ PROPERTY = 0, ///< Calculate display update area by property
+ CURRENT_PROPERTY = 1, ///< Calculate display update area by current property
+};
+
+/**
+ * @brief Helper function to calculate exact display area, offset and size.
+ * It will be useful when view size is not integer value, or view size is not matched with texture size.
+ *
+ * @param[in] self The view itself.
+ * @param[in] option Option of this calculation. Let we decide what kind of property will be used.
+ * @return DisplayArea for this view.
+ */
+Rect<int32_t> CalculateDisplayArea(Dali::Actor self, DisplayAreaCalculateOption option)
+{
+ bool positionUsesAnchorPoint = self.GetProperty<bool>(Actor::Property::POSITION_USES_ANCHOR_POINT);
+ Vector3 actorSize = (option == DisplayAreaCalculateOption::CURRENT_PROPERTY) ? self.GetCurrentProperty<Vector3>(Actor::Property::SIZE) * self.GetCurrentProperty<Vector3>(Actor::Property::SCALE)
+ : self.GetProperty<Vector3>(Actor::Property::SIZE) * self.GetProperty<Vector3>(Actor::Property::SCALE);
+ Vector3 anchorPointOffSet = actorSize * (positionUsesAnchorPoint ? self.GetCurrentProperty<Vector3>(Actor::Property::ANCHOR_POINT) : AnchorPoint::TOP_LEFT);
+ Vector2 screenPosition = (option == DisplayAreaCalculateOption::CURRENT_PROPERTY) ? self.GetProperty<Vector2>(Actor::Property::SCREEN_POSITION)
+ : Dali::DevelActor::CalculateScreenPosition(self);