Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: Source/core/testing/Internals.cpp

Issue 13462003: Add support for accelerated fixed root background (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@background-attachment-fixed2
Patch Set: Moved the layout tests. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698