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

Unified Diff: third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp

Issue 2294853004: Remove fprintf() from core/editing/. (Closed)
Patch Set: Created 4 years, 4 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/Position.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
index 5d6cc72803922a314a21a7df4022ffdff7106cf6..b4bb23777d18e7c717d52beebf4821a9e4fc1e58 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
@@ -746,22 +746,30 @@ bool DocumentMarkerController::setMarkersActive(Node* node, unsigned startOffset
#ifndef NDEBUG
void DocumentMarkerController::showMarkers() const
{
- fprintf(stderr, "%d nodes have markers:\n", m_markers.size());
+ StringBuilder builder;
MarkerMap::const_iterator end = m_markers.end();
for (MarkerMap::const_iterator nodeIterator = m_markers.begin(); nodeIterator != end; ++nodeIterator) {
const Node* node = nodeIterator->key;
- fprintf(stderr, "%p", node);
+ builder.append(String::format("%p", node));
MarkerLists* markers = m_markers.get(node);
for (size_t markerListIndex = 0; markerListIndex < DocumentMarker::MarkerTypeIndexesCount; ++markerListIndex) {
Member<MarkerList>& list = (*markers)[markerListIndex];
for (unsigned markerIndex = 0; list.get() && markerIndex < list->size(); ++markerIndex) {
DocumentMarker* marker = list->at(markerIndex).get();
- fprintf(stderr, " %d:[%d:%d](%d)", marker->type(), marker->startOffset(), marker->endOffset(), marker->activeMatch());
+ builder.append(" ");
+ builder.appendNumber(marker->type());
+ builder.append(":[");
+ builder.appendNumber(marker->startOffset());
+ builder.append(":");
+ builder.appendNumber(marker->endOffset());
+ builder.append("](");
+ builder.appendNumber(marker->activeMatch());
+ builder.append(")");
}
}
-
- fprintf(stderr, "\n");
+ builder.append("\n");
}
+ LOG(INFO) << m_markers.size() << " nodes have markers:\n" << builder.toString().utf8().data();
}
#endif
« no previous file with comments | « third_party/WebKit/Source/core/editing/Position.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698