Index: Source/core/testing/Internals.cpp |
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp |
index 6464af19a76c427b594806c8fcdf26f476289c48..17abe5ef2ae07b44c837215e547fac86ce8f5738 100644 |
--- a/Source/core/testing/Internals.cpp |
+++ b/Source/core/testing/Internals.cpp |
@@ -1473,6 +1473,28 @@ String Internals::layerTreeAsText(Document* document, ExceptionCode& ec) const |
return layerTreeAsText(document, 0, ec); |
} |
+String Internals::layerTreeAsText(Document* document, unsigned flags, ExceptionCode& ec) const |
+{ |
+ if (!document || !document->frame()) { |
+ ec = INVALID_ACCESS_ERR; |
+ return String(); |
+ } |
+ |
+ LayerTreeFlags layerTreeFlags = 0; |
+ if (flags & LAYER_TREE_INCLUDES_VISIBLE_RECTS) |
+ layerTreeFlags |= LayerTreeFlagsIncludeVisibleRects; |
+ if (flags & LAYER_TREE_INCLUDES_TILE_CACHES) |
+ layerTreeFlags |= LayerTreeFlagsIncludeTileCaches; |
+ if (flags & LAYER_TREE_INCLUDES_REPAINT_RECTS) |
+ layerTreeFlags |= LayerTreeFlagsIncludeRepaintRects; |
+ if (flags & LAYER_TREE_INCLUDES_PAINTING_PHASES) |
+ layerTreeFlags |= LayerTreeFlagsIncludePaintingPhases; |
+ if (flags & LAYER_TREE_INCLUDES_ROOT_LAYER) |
+ layerTreeFlags |= LayerTreeFlagsIncludeRootLayer; |
+ |
+ return document->frame()->layerTreeAsText(layerTreeFlags); |
+} |
+ |
static PassRefPtr<NodeList> paintOrderList(Element* element, ExceptionCode& ec, RenderLayer::PaintOrderListType type) |
{ |
if (!element) { |
@@ -1509,26 +1531,6 @@ PassRefPtr<NodeList> Internals::paintOrderListAfterPromote(Element* element, Exc |
return paintOrderList(element, ec, RenderLayer::AfterPromote); |
} |
-String Internals::layerTreeAsText(Document* document, unsigned flags, ExceptionCode& ec) const |
-{ |
- if (!document || !document->frame()) { |
- ec = INVALID_ACCESS_ERR; |
- return String(); |
- } |
- |
- LayerTreeFlags layerTreeFlags = 0; |
- if (flags & LAYER_TREE_INCLUDES_VISIBLE_RECTS) |
- layerTreeFlags |= LayerTreeFlagsIncludeVisibleRects; |
- if (flags & LAYER_TREE_INCLUDES_TILE_CACHES) |
- layerTreeFlags |= LayerTreeFlagsIncludeTileCaches; |
- if (flags & LAYER_TREE_INCLUDES_REPAINT_RECTS) |
- layerTreeFlags |= LayerTreeFlagsIncludeRepaintRects; |
- if (flags & LAYER_TREE_INCLUDES_PAINTING_PHASES) |
- layerTreeFlags |= LayerTreeFlagsIncludePaintingPhases; |
- |
- return document->frame()->layerTreeAsText(layerTreeFlags); |
-} |
- |
void Internals::setNeedsCompositedScrolling(Element* element, unsigned needsCompositedScrolling, ExceptionCode& ec) |
{ |
if (!element) { |