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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h

Issue 2639143002: Revert of Move property tree debugging code to platform/graphics/paint/. (Closed)
Patch Set: Created 3 years, 11 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: third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h b/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h
index 698ba60632557f44a8f4b104f59737bb162a99f3..19555592996153b78883df9520f1af9cc9f6b1c2 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h
@@ -11,7 +11,6 @@
#include "platform/graphics/paint/TransformPaintPropertyNode.h"
#include "wtf/HashFunctions.h"
#include "wtf/HashTraits.h"
-#include "wtf/text/StringBuilder.h"
namespace blink {
@@ -113,11 +112,6 @@
// DCHECK(iterator.next()->innermostNode() == None);
InnermostNode innermostNode() const;
-#if DCHECK_IS_ON()
- // Dumps the tree from this state up to the root as a string.
- String toTreeString() const;
-#endif
-
private:
RefPtr<const TransformPaintPropertyNode> m_transform;
RefPtr<const ClipPaintPropertyNode> m_clip;
@@ -145,50 +139,6 @@
PropertyTreeState m_properties;
};
-#if DCHECK_IS_ON()
-
-template <typename PropertyTreeNode>
-class PropertyTreeStatePrinter {
- public:
- String pathAsString(const PropertyTreeNode* lastNode) {
- const PropertyTreeNode* node = lastNode;
- while (!node->isRoot()) {
- addPropertyNode(node, "");
- node = node->parent();
- }
-
- StringBuilder stringBuilder;
- addAllPropertyNodes(stringBuilder, node);
- return stringBuilder.toString();
- }
-
- void addPropertyNode(const PropertyTreeNode* node, String debugInfo) {
- m_nodeToDebugString.set(node, debugInfo);
- }
-
- void addAllPropertyNodes(StringBuilder& stringBuilder,
- const PropertyTreeNode* node,
- unsigned indent = 0) {
- DCHECK(node);
- for (unsigned i = 0; i < indent; i++)
- stringBuilder.append(' ');
- if (m_nodeToDebugString.contains(node))
- stringBuilder.append(m_nodeToDebugString.get(node));
- stringBuilder.append(String::format(" %p ", node));
- stringBuilder.append(node->toString());
- stringBuilder.append("\n");
-
- for (const auto* childNode : m_nodeToDebugString.keys()) {
- if (childNode->parent() == node)
- addAllPropertyNodes(stringBuilder, childNode, indent + 2);
- }
- }
-
- HashMap<const PropertyTreeNode*, String> m_nodeToDebugString;
-};
-
-#endif
-
} // namespace blink
#endif // PropertyTreeState_h

Powered by Google App Engine
This is Rietveld 408576698