| Index: Source/core/testing/Internals.cpp
|
| diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
|
| index 254dc8c1904d65dd903e89f29c79934638d0e4ba..ff773a00d8a5fbbb2900468f3af947bb00c21362 100644
|
| --- a/Source/core/testing/Internals.cpp
|
| +++ b/Source/core/testing/Internals.cpp
|
| @@ -1532,6 +1532,40 @@ String Internals::layerTreeAsText(Document* document, ExceptionCode& ec) const
|
| return layerTreeAsText(document, 0, ec);
|
| }
|
|
|
| +static PassRefPtr<NodeList> paintOrderList(Element* element, ExceptionCode& ec, RenderLayer::PaintOrderListType type)
|
| +{
|
| + if (!element) {
|
| + ec = INVALID_ACCESS_ERR;
|
| + return 0;
|
| + }
|
| +
|
| + element->document()->updateLayout();
|
| +
|
| + RenderObject* renderer = element->renderer();
|
| + if (!renderer || !renderer->isBox()) {
|
| + ec = INVALID_ACCESS_ERR;
|
| + return 0;
|
| + }
|
| +
|
| + RenderLayer* layer = toRenderBox(renderer)->layer();
|
| + if (!layer) {
|
| + ec = INVALID_ACCESS_ERR;
|
| + return 0;
|
| + }
|
| +
|
| + return layer->paintOrderList(type);
|
| +}
|
| +
|
| +PassRefPtr<NodeList> Internals::paintOrderListBeforePromote(Element* element, ExceptionCode& ec)
|
| +{
|
| + return paintOrderList(element, ec, RenderLayer::BeforePromote);
|
| +}
|
| +
|
| +PassRefPtr<NodeList> Internals::paintOrderListAfterPromote(Element* element, ExceptionCode& ec)
|
| +{
|
| + return paintOrderList(element, ec, RenderLayer::AfterPromote);
|
| +}
|
| +
|
| String Internals::layerTreeAsText(Document* document, unsigned flags, ExceptionCode& ec) const
|
| {
|
| if (!document || !document->frame()) {
|
|
|