OSDN Git Service

Merge WebKit at r84325: Initial merge by git.
[android-x86/external-webkit.git] / Source / WebCore / platform / graphics / chromium / GraphicsLayerChromium.cpp
index 488230c..2301ca3 100644 (file)
@@ -111,8 +111,20 @@ GraphicsLayerChromium::~GraphicsLayerChromium()
 
 void GraphicsLayerChromium::setName(const String& inName)
 {
+    m_nameBase = inName;
     String name = String::format("GraphicsLayerChromium(%p) GraphicsLayer(%p) ", m_layer.get(), this) + inName;
     GraphicsLayer::setName(name);
+    updateNames();
+}
+
+void GraphicsLayerChromium::updateNames()
+{
+    if (m_layer)
+        m_layer->setName("Layer for " + m_nameBase);
+    if (m_transformLayer)
+        m_transformLayer->setName("TransformLayer for " + m_nameBase);
+    if (m_contentsLayer)
+        m_contentsLayer->setName("ContentsLayer for " + m_nameBase);
 }
 
 bool GraphicsLayerChromium::setChildren(const Vector<GraphicsLayer*>& children)
@@ -271,6 +283,8 @@ void GraphicsLayerChromium::setMaskLayer(GraphicsLayer* maskLayer)
     GraphicsLayer::setMaskLayer(maskLayer);
 
     LayerChromium* maskLayerChromium = m_maskLayer ? m_maskLayer->platformLayer() : 0;
+    if (maskLayerChromium)
+        maskLayerChromium->setIsMask(true);
     m_layer->setMaskLayer(maskLayerChromium);
 }
 
@@ -590,6 +604,7 @@ void GraphicsLayerChromium::updateLayerPreserves3D()
     }
 
     updateOpacityOnLayer();
+    updateNames();
 }
 
 void GraphicsLayerChromium::updateLayerDrawsContent()
@@ -653,6 +668,7 @@ void GraphicsLayerChromium::setupContentsLayer(LayerChromium* contentsLayer)
         }
     }
     updateDebugIndicators();
+    updateNames();
 }
 
 // This function simply mimics the operation of GraphicsLayerCA