+void WebView::UpdateDisplayArea( Dali::PropertyNotification& /*source*/ )
+{
+ if( !mWebEngine )
+ return;
+
+ Actor self( Self() );
+
+ bool positionUsesAnchorPoint = self.GetProperty< bool >( Actor::Property::POSITION_USES_ANCHOR_POINT );
+ Vector3 actorSize = self.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) * self.GetCurrentProperty< Vector3 >( Actor::Property::SCALE );
+ 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;
+ displayArea.x = screenPosition.x - anchorPointOffSet.x;
+ displayArea.y = screenPosition.y - anchorPointOffSet.y;
+ displayArea.width = actorSize.x;
+ displayArea.height = actorSize.y;
+
+ Size displaySize = Size( displayArea.width, displayArea.height );
+ if ( mWebViewSize != displaySize )
+ {
+ mWebViewSize = displaySize;
+ }
+
+ if (mWebViewArea != displayArea )
+ {
+ mWebViewArea = displayArea;
+ mWebEngine.UpdateDisplayArea( mWebViewArea );
+ }
+}
+
+void WebView::EnableVideoHole( bool enabled )
+{
+ mVideoHoleEnabled = enabled;
+
+ EnableBlendMode( !mVideoHoleEnabled );
+
+ if( mWebEngine )
+ {
+ mWebEngine.EnableVideoHole( mVideoHoleEnabled );
+ }
+}
+
+void WebView::EnableBlendMode( bool blendEnabled )
+{
+ Actor self = Self();
+ for (uint32_t i = 0; i < self.GetRendererCount(); i++)
+ {
+ Dali::Renderer render = self.GetRendererAt( i );
+ render.SetProperty( Renderer::Property::BLEND_MODE, blendEnabled ? BlendMode::ON : BlendMode::OFF );
+ }
+}
+