Do not reset the ContentLayer and contentsOpaque for canvas and media elements
authorShanmuga Pandi M <shanmuga.m@samsung.com>
Thu, 11 Jul 2013 14:51:25 +0000 (20:21 +0530)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Fri, 4 Oct 2013 01:01:30 +0000 (01:01 +0000)
[Title] Do not reset the ContentLayer and contentsOpaque for canvas and media elements
[Issue#] N_SE-41346
[Problem] Canvas element disappers when tapping outside the canvas.
[Cause] ContentsLayer set to NULL and lost the original canvas content.
And ContentsOpaque is set to 1, because of that background color is not painted after that.
[Solution] Do not set ContentsLayer to NULL and donot change the contentsOpaque
           for canvas and media layers

Change-Id: I57afb45793ff087387dc315998493e2bb9992528

Source/WebKit2/UIProcess/tizen/WebLayerTreeRendererTizen.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 4c8091a..f10c34d
@@ -163,7 +163,10 @@ void WebLayerTreeRendererTizen::setLayerState(WebLayerID id, const WebLayerInfo&
     layer->setAnchorPoint(layerInfo.anchorPoint);
     layer->setChildrenTransform(layerInfo.childrenTransform);
     layer->setBackfaceVisibility(layerInfo.backfaceVisible);
-    layer->setContentsOpaque(layerInfo.contentsOpaque);
+
+    if (!(layerInfo.contentType == WebLayerInfo::Canvas3DContentType || layerInfo.contentType == WebLayerInfo::MediaContentType || layerInfo.contentType == WebLayerInfo::Canvas2DContentType))
+        layer->setContentsOpaque(layerInfo.contentsOpaque);
+
     layer->setContentsRect(layerInfo.contentsRect);
     layer->setContentsToBackgroundColor(layerInfo.backgroundColor);
     layer->setDrawsContent(layerInfo.drawsContent);
@@ -195,7 +198,8 @@ void WebLayerTreeRendererTizen::setLayerState(WebLayerID id, const WebLayerInfo&
     layer->setIsScrollbar(layerInfo.isScrollbar);
 #endif
 
-    assignImageToLayer(layer, layerInfo.imageBackingStoreID);
+    if (!(layerInfo.contentType == WebLayerInfo::Canvas3DContentType || layerInfo.contentType == WebLayerInfo::MediaContentType || layerInfo.contentType == WebLayerInfo::Canvas2DContentType))
+        assignImageToLayer(layer, layerInfo.imageBackingStoreID);
 
     // Never make the root layer clip.
     layer->setMasksToBounds(layerInfo.isRootLayer ? false : layerInfo.masksToBounds);