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

Unified Diff: third_party/WebKit/Source/core/editing/VisibleSelection.cpp

Issue 2533693002: [Editing] Add SelectionTemplate::showTreeForThis() (Closed)
Patch Set: Created 4 years, 1 month 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/core/editing/VisibleSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/VisibleSelection.cpp b/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
index c2dac8421a0b8aeb429250c91966d3afb40fa4b8..7b2a7da45a27dfd42e2b7cf61602c4125603d94a 100644
--- a/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
@@ -777,23 +777,27 @@ bool VisibleSelectionTemplate<Strategy>::operator==(
}
#ifndef NDEBUG
-
template <typename Strategy>
-void VisibleSelectionTemplate<Strategy>::showTreeForThis() const {
- if (!start().anchorNode())
+void VisibleSelectionTemplate<Strategy>::showTreeForStartAndEnd(
+ const PositionTemplate<Strategy>& start,
+ const PositionTemplate<Strategy>& end) {
+ if (!start.anchorNode())
return;
LOG(INFO) << "\n"
- << start()
- .anchorNode()
- ->toMarkedTreeString(start().anchorNode(), "S",
- end().anchorNode(), "E")
+ << start.anchorNode()
+ ->toMarkedTreeString(start.anchorNode(), "S",
+ end.anchorNode(), "E")
.utf8()
.data()
- << "start: " << start().toAnchorTypeAndOffsetString().utf8().data()
+ << "start: " << start.toAnchorTypeAndOffsetString().utf8().data()
<< "\n"
- << "end: " << end().toAnchorTypeAndOffsetString().utf8().data();
+ << "end: " << end.toAnchorTypeAndOffsetString().utf8().data();
}
+template <typename Strategy>
+void VisibleSelectionTemplate<Strategy>::showTreeForThis() const {
+ VisibleSelectionTemplate<Strategy>::showTreeForStartAndEnd(start(), end());
+}
#endif
template <typename Strategy>

Powered by Google App Engine
This is Rietveld 408576698