| Index: Source/core/testing/Internals.cpp
|
| diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
|
| index ee84fbfc31be8ffef88fe548329f7aeb731d54f6..727b878afd60555082b1ebcccedf24162456f900 100644
|
| --- a/Source/core/testing/Internals.cpp
|
| +++ b/Source/core/testing/Internals.cpp
|
| @@ -1570,6 +1570,26 @@ 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;
|
| +
|
| + return document->frame()->layerTreeAsText(layerTreeFlags);
|
| +}
|
| +
|
| static PassRefPtr<NodeList> paintOrderList(Element* element, ExceptionCode& ec, RenderLayer::PaintOrderListType type)
|
| {
|
| if (!element) {
|
| @@ -1606,24 +1626,28 @@ PassRefPtr<NodeList> Internals::paintOrderListAfterPromote(Element* element, Exc
|
| return paintOrderList(element, ec, RenderLayer::AfterPromote);
|
| }
|
|
|
| -String Internals::layerTreeAsText(Document* document, unsigned flags, ExceptionCode& ec) const
|
| +void Internals::setNeedsCompositedScrolling(Element* element, unsigned needsCompositedScrolling, ExceptionCode& ec)
|
| {
|
| - if (!document || !document->frame()) {
|
| + if (!element) {
|
| ec = INVALID_ACCESS_ERR;
|
| - return String();
|
| + return;
|
| }
|
|
|
| - 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;
|
| + element->document()->updateLayout();
|
|
|
| - return document->frame()->layerTreeAsText(layerTreeFlags);
|
| + RenderObject* renderer = element->renderer();
|
| + if (!renderer || !renderer->isBox()) {
|
| + ec = INVALID_ACCESS_ERR;
|
| + return;
|
| + }
|
| +
|
| + RenderLayer* layer = toRenderBox(renderer)->layer();
|
| + if (!layer) {
|
| + ec = INVALID_ACCESS_ERR;
|
| + return;
|
| + }
|
| +
|
| + layer->setForceNeedsCompositedScrolling(static_cast<RenderLayer::ForceNeedsCompositedScrollingMode>(needsCompositedScrolling));
|
| }
|
|
|
| String Internals::repaintRectsAsText(Document* document, ExceptionCode& ec) const
|
|
|