void GraphicsLayer::addRepaintRect(const FloatRect& repaintRect) { if (m_client->isTrackingPaintInvalidations()) { RepaintMap::iterator repaintIt = repaintRectMap().find(this); if (repaintIt == repaintRectMap().end()) { Vector<FloatRect> repaintRects; repaintRects.append(repaintRect); repaintRectMap().set(this, repaintRects); } else { Vector<FloatRect>& repaintRects = repaintIt->value; repaintRects.append(repaintRect); } } }
void GraphicsLayer::addRepaintRect(const FloatRect& repaintRect) { if (m_client->isTrackingRepaints()) { FloatRect largestRepaintRect(FloatPoint(), m_size); largestRepaintRect.intersect(repaintRect); RepaintMap::iterator repaintIt = repaintRectMap().find(this); if (repaintIt == repaintRectMap().end()) { Vector<FloatRect> repaintRects; repaintRects.append(largestRepaintRect); repaintRectMap().set(this, repaintRects); } else { Vector<FloatRect>& repaintRects = repaintIt->value; repaintRects.append(largestRepaintRect); } } }
void GraphicsLayer::dumpProperties(TextStream& ts, int indent, LayerTreeAsTextBehavior behavior) const { if (m_position != FloatPoint()) { writeIndent(ts, indent + 1); ts << "(position " << m_position.x() << " " << m_position.y() << ")\n"; } if (m_boundsOrigin != FloatPoint()) { writeIndent(ts, indent + 1); ts << "(bounds origin " << m_boundsOrigin.x() << " " << m_boundsOrigin.y() << ")\n"; } if (m_anchorPoint != FloatPoint3D(0.5f, 0.5f, 0)) { writeIndent(ts, indent + 1); ts << "(anchor " << m_anchorPoint.x() << " " << m_anchorPoint.y() << ")\n"; } if (m_size != IntSize()) { writeIndent(ts, indent + 1); ts << "(bounds " << m_size.width() << " " << m_size.height() << ")\n"; } if (m_opacity != 1) { writeIndent(ts, indent + 1); ts << "(opacity " << m_opacity << ")\n"; } if (m_usingTiledLayer) { writeIndent(ts, indent + 1); ts << "(usingTiledLayer " << m_usingTiledLayer << ")\n"; } if (m_preserves3D) { writeIndent(ts, indent + 1); ts << "(preserves3D " << m_preserves3D << ")\n"; } if (m_drawsContent) { writeIndent(ts, indent + 1); ts << "(drawsContent " << m_drawsContent << ")\n"; } if (!m_contentsVisible) { writeIndent(ts, indent + 1); ts << "(contentsVisible " << m_contentsVisible << ")\n"; } if (!m_backfaceVisibility) { writeIndent(ts, indent + 1); ts << "(backfaceVisibility " << (m_backfaceVisibility ? "visible" : "hidden") << ")\n"; } if (behavior & LayerTreeAsTextDebug) { writeIndent(ts, indent + 1); ts << "("; if (m_client) ts << "client " << static_cast<void*>(m_client); else ts << "no client"; ts << ")\n"; } if (m_backgroundColorSet) { writeIndent(ts, indent + 1); ts << "(backgroundColor " << m_backgroundColor.nameForRenderTreeAsText() << ")\n"; } if (!m_transform.isIdentity()) { writeIndent(ts, indent + 1); ts << "(transform "; ts << "[" << m_transform.m11() << " " << m_transform.m12() << " " << m_transform.m13() << " " << m_transform.m14() << "] "; ts << "[" << m_transform.m21() << " " << m_transform.m22() << " " << m_transform.m23() << " " << m_transform.m24() << "] "; ts << "[" << m_transform.m31() << " " << m_transform.m32() << " " << m_transform.m33() << " " << m_transform.m34() << "] "; ts << "[" << m_transform.m41() << " " << m_transform.m42() << " " << m_transform.m43() << " " << m_transform.m44() << "])\n"; } // Avoid dumping the sublayer transform on the root layer, because it's used for geometry flipping, whose behavior // differs between platforms. if (parent() && !m_childrenTransform.isIdentity()) { writeIndent(ts, indent + 1); ts << "(childrenTransform "; ts << "[" << m_childrenTransform.m11() << " " << m_childrenTransform.m12() << " " << m_childrenTransform.m13() << " " << m_childrenTransform.m14() << "] "; ts << "[" << m_childrenTransform.m21() << " " << m_childrenTransform.m22() << " " << m_childrenTransform.m23() << " " << m_childrenTransform.m24() << "] "; ts << "[" << m_childrenTransform.m31() << " " << m_childrenTransform.m32() << " " << m_childrenTransform.m33() << " " << m_childrenTransform.m34() << "] "; ts << "[" << m_childrenTransform.m41() << " " << m_childrenTransform.m42() << " " << m_childrenTransform.m43() << " " << m_childrenTransform.m44() << "])\n"; } if (m_replicaLayer) { writeIndent(ts, indent + 1); ts << "(replica layer"; if (behavior & LayerTreeAsTextDebug) ts << " " << m_replicaLayer; ts << ")\n"; m_replicaLayer->dumpLayer(ts, indent + 2, behavior); } if (m_replicatedLayer) { writeIndent(ts, indent + 1); ts << "(replicated layer"; if (behavior & LayerTreeAsTextDebug) ts << " " << m_replicatedLayer; ts << ")\n"; } if (behavior & LayerTreeAsTextIncludeRepaintRects && repaintRectMap().contains(this) && !repaintRectMap().get(this).isEmpty()) { writeIndent(ts, indent + 1); ts << "(repaint rects\n"; for (size_t i = 0; i < repaintRectMap().get(this).size(); ++i) { if (repaintRectMap().get(this)[i].isEmpty()) continue; writeIndent(ts, indent + 2); ts << "(rect "; ts << repaintRectMap().get(this)[i].x() << " "; ts << repaintRectMap().get(this)[i].y() << " "; ts << repaintRectMap().get(this)[i].width() << " "; ts << repaintRectMap().get(this)[i].height(); ts << ")\n"; } writeIndent(ts, indent + 1); ts << ")\n"; } dumpAdditionalProperties(ts, indent, behavior); if (m_children.size()) { writeIndent(ts, indent + 1); ts << "(children " << m_children.size() << "\n"; unsigned i; for (i = 0; i < m_children.size(); i++) m_children[i]->dumpLayer(ts, indent + 2, behavior); writeIndent(ts, indent + 1); ts << ")\n"; } }
void GraphicsLayer::resetTrackedRepaints() { repaintRectMap().remove(this); }
void GraphicsLayer::dumpProperties(TextStream& ts, int indent, LayerTreeAsTextBehavior behavior) const { if (m_position != FloatPoint()) { writeIndent(ts, indent + 1); ts << "(position " << m_position.x() << " " << m_position.y() << ")\n"; } if (m_boundsOrigin != FloatPoint()) { writeIndent(ts, indent + 1); ts << "(bounds origin " << m_boundsOrigin.x() << " " << m_boundsOrigin.y() << ")\n"; } if (m_anchorPoint != FloatPoint3D(0.5f, 0.5f, 0)) { writeIndent(ts, indent + 1); ts << "(anchor " << m_anchorPoint.x() << " " << m_anchorPoint.y() << ")\n"; } if (m_size != IntSize()) { writeIndent(ts, indent + 1); ts << "(bounds " << m_size.width() << " " << m_size.height() << ")\n"; } if (m_opacity != 1) { writeIndent(ts, indent + 1); ts << "(opacity " << m_opacity << ")\n"; } #if ENABLE(CSS_COMPOSITING) if (m_blendMode != BlendModeNormal) { writeIndent(ts, indent + 1); ts << "(blendMode " << compositeOperatorName(CompositeSourceOver, m_blendMode) << ")\n"; } #endif if (m_usingTiledBacking) { writeIndent(ts, indent + 1); ts << "(usingTiledLayer " << m_usingTiledBacking << ")\n"; } bool needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack = m_client.needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack(*this); if (m_contentsOpaque || needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack) { writeIndent(ts, indent + 1); ts << "(contentsOpaque " << (m_contentsOpaque || needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack) << ")\n"; } if (m_preserves3D) { writeIndent(ts, indent + 1); ts << "(preserves3D " << m_preserves3D << ")\n"; } if (m_drawsContent && m_client.shouldDumpPropertyForLayer(this, "drawsContent")) { writeIndent(ts, indent + 1); ts << "(drawsContent " << m_drawsContent << ")\n"; } if (!m_contentsVisible) { writeIndent(ts, indent + 1); ts << "(contentsVisible " << m_contentsVisible << ")\n"; } if (!m_backfaceVisibility) { writeIndent(ts, indent + 1); ts << "(backfaceVisibility " << (m_backfaceVisibility ? "visible" : "hidden") << ")\n"; } if (behavior & LayerTreeAsTextDebug) { writeIndent(ts, indent + 1); ts << "(primary-layer-id " << primaryLayerID() << ")\n"; writeIndent(ts, indent + 1); ts << "(client " << static_cast<void*>(&m_client) << ")\n"; } if (m_backgroundColor.isValid() && m_client.shouldDumpPropertyForLayer(this, "backgroundColor")) { writeIndent(ts, indent + 1); ts << "(backgroundColor " << m_backgroundColor.nameForRenderTreeAsText() << ")\n"; } if (!m_transform.isIdentity()) { writeIndent(ts, indent + 1); ts << "(transform "; ts << "[" << m_transform.m11() << " " << m_transform.m12() << " " << m_transform.m13() << " " << m_transform.m14() << "] "; ts << "[" << m_transform.m21() << " " << m_transform.m22() << " " << m_transform.m23() << " " << m_transform.m24() << "] "; ts << "[" << m_transform.m31() << " " << m_transform.m32() << " " << m_transform.m33() << " " << m_transform.m34() << "] "; ts << "[" << m_transform.m41() << " " << m_transform.m42() << " " << m_transform.m43() << " " << m_transform.m44() << "])\n"; } // Avoid dumping the sublayer transform on the root layer, because it's used for geometry flipping, whose behavior // differs between platforms. if (parent() && !m_childrenTransform.isIdentity()) { writeIndent(ts, indent + 1); ts << "(childrenTransform "; ts << "[" << m_childrenTransform.m11() << " " << m_childrenTransform.m12() << " " << m_childrenTransform.m13() << " " << m_childrenTransform.m14() << "] "; ts << "[" << m_childrenTransform.m21() << " " << m_childrenTransform.m22() << " " << m_childrenTransform.m23() << " " << m_childrenTransform.m24() << "] "; ts << "[" << m_childrenTransform.m31() << " " << m_childrenTransform.m32() << " " << m_childrenTransform.m33() << " " << m_childrenTransform.m34() << "] "; ts << "[" << m_childrenTransform.m41() << " " << m_childrenTransform.m42() << " " << m_childrenTransform.m43() << " " << m_childrenTransform.m44() << "])\n"; } if (m_replicaLayer) { writeIndent(ts, indent + 1); ts << "(replica layer"; if (behavior & LayerTreeAsTextDebug) ts << " " << m_replicaLayer; ts << ")\n"; m_replicaLayer->dumpLayer(ts, indent + 2, behavior); } if (m_replicatedLayer) { writeIndent(ts, indent + 1); ts << "(replicated layer"; if (behavior & LayerTreeAsTextDebug) ts << " " << m_replicatedLayer; ts << ")\n"; } if (behavior & LayerTreeAsTextIncludeRepaintRects && repaintRectMap().contains(this) && !repaintRectMap().get(this).isEmpty() && m_client.shouldDumpPropertyForLayer(this, "repaintRects")) { writeIndent(ts, indent + 1); ts << "(repaint rects\n"; for (size_t i = 0; i < repaintRectMap().get(this).size(); ++i) { if (repaintRectMap().get(this)[i].isEmpty()) continue; writeIndent(ts, indent + 2); ts << "(rect "; ts << repaintRectMap().get(this)[i].x() << " "; ts << repaintRectMap().get(this)[i].y() << " "; ts << repaintRectMap().get(this)[i].width() << " "; ts << repaintRectMap().get(this)[i].height(); ts << ")\n"; } writeIndent(ts, indent + 1); ts << ")\n"; } if (behavior & LayerTreeAsTextIncludePaintingPhases && paintingPhase()) { writeIndent(ts, indent + 1); ts << "(paintingPhases\n"; if (paintingPhase() & GraphicsLayerPaintBackground) { writeIndent(ts, indent + 2); ts << "GraphicsLayerPaintBackground\n"; } if (paintingPhase() & GraphicsLayerPaintForeground) { writeIndent(ts, indent + 2); ts << "GraphicsLayerPaintForeground\n"; } if (paintingPhase() & GraphicsLayerPaintMask) { writeIndent(ts, indent + 2); ts << "GraphicsLayerPaintMask\n"; } if (paintingPhase() & GraphicsLayerPaintChildClippingMask) { writeIndent(ts, indent + 2); ts << "GraphicsLayerPaintChildClippingMask\n"; } if (paintingPhase() & GraphicsLayerPaintOverflowContents) { writeIndent(ts, indent + 2); ts << "GraphicsLayerPaintOverflowContents\n"; } if (paintingPhase() & GraphicsLayerPaintCompositedScroll) { writeIndent(ts, indent + 2); ts << "GraphicsLayerPaintCompositedScroll\n"; } writeIndent(ts, indent + 1); ts << ")\n"; } dumpAdditionalProperties(ts, indent, behavior); if (m_children.size()) { TextStream childrenStream; unsigned totalChildCount = 0; dumpChildren(childrenStream, m_children, totalChildCount, indent, behavior); writeIndent(childrenStream, indent + 1); childrenStream << ")\n"; if (totalChildCount) { writeIndent(ts, indent + 1); ts << "(children " << totalChildCount << "\n"; ts << childrenStream.release(); } } }
PassRefPtr<JSONObject> GraphicsLayer::layerTreeAsJSON(LayerTreeFlags flags, RenderingContextMap& renderingContextMap) const { RefPtr<JSONObject> json = adoptRef(new JSONObject); if (flags & LayerTreeIncludesDebugInfo) { json->setString("this", pointerAsString(this)); json->setString("debugName", m_client->debugName(this)); } if (m_position != FloatPoint()) json->setArray("position", pointAsJSONArray(m_position)); if (m_hasTransformOrigin && m_transformOrigin != FloatPoint3D(m_size.width() * 0.5f, m_size.height() * 0.5f, 0)) json->setArray("transformOrigin", pointAsJSONArray(m_transformOrigin)); if (m_size != IntSize()) json->setArray("bounds", sizeAsJSONArray(m_size)); if (m_opacity != 1) json->setNumber("opacity", m_opacity); if (m_blendMode != WebBlendModeNormal) json->setString("blendMode", compositeOperatorName(CompositeSourceOver, m_blendMode)); if (m_isRootForIsolatedGroup) json->setBoolean("isolate", m_isRootForIsolatedGroup); if (m_contentsOpaque) json->setBoolean("contentsOpaque", m_contentsOpaque); if (!m_shouldFlattenTransform) json->setBoolean("shouldFlattenTransform", m_shouldFlattenTransform); if (m_3dRenderingContext) { RenderingContextMap::const_iterator it = renderingContextMap.find(m_3dRenderingContext); int contextId = renderingContextMap.size() + 1; if (it == renderingContextMap.end()) renderingContextMap.set(m_3dRenderingContext, contextId); else contextId = it->value; json->setNumber("3dRenderingContext", contextId); } if (m_drawsContent) json->setBoolean("drawsContent", m_drawsContent); if (!m_contentsVisible) json->setBoolean("contentsVisible", m_contentsVisible); if (!m_backfaceVisibility) json->setString("backfaceVisibility", m_backfaceVisibility ? "visible" : "hidden"); if (flags & LayerTreeIncludesDebugInfo) json->setString("client", pointerAsString(m_client)); if (m_backgroundColor.alpha()) json->setString("backgroundColor", m_backgroundColor.nameForRenderTreeAsText()); if (!m_transform.isIdentity()) json->setArray("transform", transformAsJSONArray(m_transform)); if (m_replicaLayer) json->setObject("replicaLayer", m_replicaLayer->layerTreeAsJSON(flags, renderingContextMap)); if (m_replicatedLayer) json->setString("replicatedLayer", flags & LayerTreeIncludesDebugInfo ? pointerAsString(m_replicatedLayer) : ""); if ((flags & LayerTreeIncludesPaintInvalidationRects) && repaintRectMap().contains(this) && !repaintRectMap().get(this).isEmpty()) { Vector<FloatRect> repaintRectsCopy = repaintRectMap().get(this); std::sort(repaintRectsCopy.begin(), repaintRectsCopy.end(), &compareFloatRects); RefPtr<JSONArray> repaintRectsJSON = adoptRef(new JSONArray); for (size_t i = 0; i < repaintRectsCopy.size(); ++i) { if (repaintRectsCopy[i].isEmpty()) continue; repaintRectsJSON->pushArray(rectAsJSONArray(repaintRectsCopy[i])); } json->setArray("repaintRects", repaintRectsJSON); } if ((flags & LayerTreeIncludesPaintingPhases) && m_paintingPhase) { RefPtr<JSONArray> paintingPhasesJSON = adoptRef(new JSONArray); if (m_paintingPhase & GraphicsLayerPaintBackground) paintingPhasesJSON->pushString("GraphicsLayerPaintBackground"); if (m_paintingPhase & GraphicsLayerPaintForeground) paintingPhasesJSON->pushString("GraphicsLayerPaintForeground"); if (m_paintingPhase & GraphicsLayerPaintMask) paintingPhasesJSON->pushString("GraphicsLayerPaintMask"); if (m_paintingPhase & GraphicsLayerPaintChildClippingMask) paintingPhasesJSON->pushString("GraphicsLayerPaintChildClippingMask"); if (m_paintingPhase & GraphicsLayerPaintOverflowContents) paintingPhasesJSON->pushString("GraphicsLayerPaintOverflowContents"); if (m_paintingPhase & GraphicsLayerPaintCompositedScroll) paintingPhasesJSON->pushString("GraphicsLayerPaintCompositedScroll"); json->setArray("paintingPhases", paintingPhasesJSON); } if (flags & LayerTreeIncludesClipAndScrollParents) { if (m_hasScrollParent) json->setBoolean("hasScrollParent", true); if (m_hasClipParent) json->setBoolean("hasClipParent", true); } if (flags & LayerTreeIncludesDebugInfo) { RefPtr<JSONArray> compositingReasonsJSON = adoptRef(new JSONArray); for (size_t i = 0; i < kNumberOfCompositingReasons; ++i) { if (m_debugInfo.compositingReasons() & kCompositingReasonStringMap[i].reason) compositingReasonsJSON->pushString(kCompositingReasonStringMap[i].description); } json->setArray("compositingReasons", compositingReasonsJSON); } if (m_children.size()) { RefPtr<JSONArray> childrenJSON = adoptRef(new JSONArray); for (size_t i = 0; i < m_children.size(); i++) childrenJSON->pushObject(m_children[i]->layerTreeAsJSON(flags, renderingContextMap)); json->setArray("children", childrenJSON); } return json; }
void GraphicsLayer::resetTrackedPaintInvalidations() { repaintRectMap().remove(this); }
void GraphicsLayer::dumpProperties(TextStream& ts, int indent, LayerTreeAsTextBehavior behavior) const { if (m_position != FloatPoint()) { writeIndent(ts, indent + 1); ts << "(position " << m_position.x() << " " << m_position.y() << ")\n"; } if (m_boundsOrigin != FloatPoint()) { writeIndent(ts, indent + 1); ts << "(bounds origin " << m_boundsOrigin.x() << " " << m_boundsOrigin.y() << ")\n"; } if (m_anchorPoint != FloatPoint3D(0.5f, 0.5f, 0)) { writeIndent(ts, indent + 1); ts << "(anchor " << m_anchorPoint.x() << " " << m_anchorPoint.y() << ")\n"; } if (m_size != IntSize()) { writeIndent(ts, indent + 1); ts << "(bounds " << m_size.width() << " " << m_size.height() << ")\n"; } if (m_opacity != 1) { writeIndent(ts, indent + 1); ts << "(opacity " << m_opacity << ")\n"; } if (m_usingTiledBacking) { writeIndent(ts, indent + 1); ts << "(usingTiledLayer " << m_usingTiledBacking << ")\n"; } if (m_contentsOpaque) { writeIndent(ts, indent + 1); ts << "(contentsOpaque " << m_contentsOpaque << ")\n"; } if (m_preserves3D) { writeIndent(ts, indent + 1); ts << "(preserves3D " << m_preserves3D << ")\n"; } if (m_drawsContent && m_client->shouldDumpPropertyForLayer(this, "drawsContent")) { writeIndent(ts, indent + 1); ts << "(drawsContent " << m_drawsContent << ")\n"; } if (!m_contentsVisible) { writeIndent(ts, indent + 1); ts << "(contentsVisible " << m_contentsVisible << ")\n"; } if (!m_backfaceVisibility) { writeIndent(ts, indent + 1); ts << "(backfaceVisibility " << (m_backfaceVisibility ? "visible" : "hidden") << ")\n"; } if (behavior & LayerTreeAsTextDebug) { writeIndent(ts, indent + 1); ts << "("; if (m_client) ts << "client " << static_cast<void*>(m_client); else ts << "no client"; ts << ")\n"; } if (m_backgroundColor.isValid() && m_client->shouldDumpPropertyForLayer(this, "backgroundColor")) { writeIndent(ts, indent + 1); ts << "(backgroundColor " << m_backgroundColor.nameForRenderTreeAsText() << ")\n"; } if (!m_transform.isIdentity()) { writeIndent(ts, indent + 1); ts << "(transform "; ts << "[" << m_transform.m11() << " " << m_transform.m12() << " " << m_transform.m13() << " " << m_transform.m14() << "] "; ts << "[" << m_transform.m21() << " " << m_transform.m22() << " " << m_transform.m23() << " " << m_transform.m24() << "] "; ts << "[" << m_transform.m31() << " " << m_transform.m32() << " " << m_transform.m33() << " " << m_transform.m34() << "] "; ts << "[" << m_transform.m41() << " " << m_transform.m42() << " " << m_transform.m43() << " " << m_transform.m44() << "])\n"; } // Avoid dumping the sublayer transform on the root layer, because it's used for geometry flipping, whose behavior // differs between platforms. if (parent() && !m_childrenTransform.isIdentity()) { writeIndent(ts, indent + 1); ts << "(childrenTransform "; ts << "[" << m_childrenTransform.m11() << " " << m_childrenTransform.m12() << " " << m_childrenTransform.m13() << " " << m_childrenTransform.m14() << "] "; ts << "[" << m_childrenTransform.m21() << " " << m_childrenTransform.m22() << " " << m_childrenTransform.m23() << " " << m_childrenTransform.m24() << "] "; ts << "[" << m_childrenTransform.m31() << " " << m_childrenTransform.m32() << " " << m_childrenTransform.m33() << " " << m_childrenTransform.m34() << "] "; ts << "[" << m_childrenTransform.m41() << " " << m_childrenTransform.m42() << " " << m_childrenTransform.m43() << " " << m_childrenTransform.m44() << "])\n"; } if (m_replicaLayer) { writeIndent(ts, indent + 1); ts << "(replica layer"; if (behavior & LayerTreeAsTextDebug) ts << " " << m_replicaLayer; ts << ")\n"; m_replicaLayer->dumpLayer(ts, indent + 2, behavior); } if (m_replicatedLayer) { writeIndent(ts, indent + 1); ts << "(replicated layer"; if (behavior & LayerTreeAsTextDebug) ts << " " << m_replicatedLayer; ts << ")\n"; } if (behavior & LayerTreeAsTextIncludeRepaintRects && repaintRectMap().contains(this) && !repaintRectMap().get(this).isEmpty() && m_client->shouldDumpPropertyForLayer(this, "repaintRects")) { writeIndent(ts, indent + 1); ts << "(repaint rects\n"; for (size_t i = 0; i < repaintRectMap().get(this).size(); ++i) { if (repaintRectMap().get(this)[i].isEmpty()) continue; writeIndent(ts, indent + 2); ts << "(rect "; ts << repaintRectMap().get(this)[i].x() << " "; ts << repaintRectMap().get(this)[i].y() << " "; ts << repaintRectMap().get(this)[i].width() << " "; ts << repaintRectMap().get(this)[i].height(); ts << ")\n"; } writeIndent(ts, indent + 1); ts << ")\n"; } if (behavior & LayerTreeAsTextIncludePaintingPhases && paintingPhase()) { writeIndent(ts, indent + 1); ts << "(paintingPhases\n"; if (paintingPhase() & GraphicsLayerPaintBackground) { writeIndent(ts, indent + 2); ts << "GraphicsLayerPaintBackground\n"; } if (paintingPhase() & GraphicsLayerPaintForeground) { writeIndent(ts, indent + 2); ts << "GraphicsLayerPaintForeground\n"; } if (paintingPhase() & GraphicsLayerPaintMask) { writeIndent(ts, indent + 2); ts << "GraphicsLayerPaintMask\n"; } if (paintingPhase() & GraphicsLayerPaintOverflowContents) { writeIndent(ts, indent + 2); ts << "GraphicsLayerPaintOverflowContents\n"; } if (paintingPhase() & GraphicsLayerPaintCompositedScroll) { writeIndent(ts, indent + 2); ts << "GraphicsLayerPaintCompositedScroll\n"; } writeIndent(ts, indent + 1); ts << ")\n"; } dumpAdditionalProperties(ts, indent, behavior); if (m_children.size()) { TextStream childrenStream; unsigned totalChildCount = m_children.size(); for (size_t childIndex = 0; childIndex < m_children.size(); childIndex++) { GraphicsLayer* child = m_children[childIndex]; if (!m_client->shouldSkipLayerInDump(child)) { child->dumpLayer(childrenStream, indent + 2, behavior); continue; } const Vector<GraphicsLayer*>& grandChildren = child->children(); totalChildCount += grandChildren.size() - 1; for (size_t grandChildIndex = 0; grandChildIndex < grandChildren.size(); grandChildIndex++) grandChildren[grandChildIndex]->dumpLayer(childrenStream, indent + 2, behavior); } writeIndent(childrenStream, indent + 1); childrenStream << ")\n"; if (totalChildCount) { writeIndent(ts, indent + 1); ts << "(children " << totalChildCount << "\n"; ts << childrenStream.release(); } } }