Index: third_party/WebKit/Source/core/editing/SelectionTemplate.cpp |
diff --git a/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp b/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp |
index c901ce77248dea86d74f08c3ab6b270f089a9d89..d3652e72edd936085f1a834a86da4de45947c616 100644 |
--- a/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp |
+++ b/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp |
@@ -103,6 +103,27 @@ bool SelectionTemplate<Strategy>::assertValid() const { |
} |
#endif |
+#ifndef NDEBUG |
+template <typename Strategy> |
+void SelectionTemplate<Strategy>::showTreeForThis() const { |
+ if (m_base.isNull()) { |
+ LOG(INFO) << "\nbase is null"; |
+ return; |
+ } |
+ |
+ LOG(INFO) << "\n" |
+ << m_base.anchorNode() |
+ ->toMarkedTreeString(m_base.anchorNode(), "B", |
+ m_extent.anchorNode(), "E") |
+ .utf8() |
+ .data() |
+ << "base: " << m_base.toAnchorTypeAndOffsetString().utf8().data() |
+ << "\n" |
+ << "extent: " |
+ << m_extent.toAnchorTypeAndOffsetString().utf8().data(); |
+} |
+#endif |
+ |
template <typename Strategy> |
void SelectionTemplate<Strategy>::printTo(std::ostream* ostream, |
const char* type) const { |