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

Unified Diff: Source/core/dom/DocumentMarkerController.cpp

Issue 67473002: Have ElementTraversal / NodeTraversal's next() methods take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 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
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/DocumentOrderedMap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DocumentMarkerController.cpp
diff --git a/Source/core/dom/DocumentMarkerController.cpp b/Source/core/dom/DocumentMarkerController.cpp
index 554c511e54cc8929f9ba05acf82bbb2e00d91497..99df54c000e8537c6ab840585c0038a327ab8d40 100644
--- a/Source/core/dom/DocumentMarkerController.cpp
+++ b/Source/core/dom/DocumentMarkerController.cpp
@@ -439,7 +439,7 @@ Vector<DocumentMarker*> DocumentMarkerController::markersInRange(Range* range, D
ASSERT(endContainer);
Node* pastLastNode = range->pastLastNode();
- for (Node* node = range->firstNode(); node != pastLastNode; node = NodeTraversal::next(node)) {
+ for (Node* node = range->firstNode(); node != pastLastNode; node = NodeTraversal::next(*node)) {
Vector<DocumentMarker*> markers = markersFor(node);
Vector<DocumentMarker*>::const_iterator end = markers.end();
for (Vector<DocumentMarker*>::const_iterator it = markers.begin(); it != end; ++it) {
@@ -644,7 +644,7 @@ void DocumentMarkerController::setMarkersActive(Range* range, bool active)
Node* pastLastNode = range->pastLastNode();
- for (Node* node = range->firstNode(); node != pastLastNode; node = NodeTraversal::next(node)) {
+ for (Node* node = range->firstNode(); node != pastLastNode; node = NodeTraversal::next(*node)) {
int startOffset = node == startContainer ? range->startOffset() : 0;
int endOffset = node == endContainer ? range->endOffset() : INT_MAX;
setMarkersActive(node, startOffset, endOffset, active);
@@ -689,7 +689,7 @@ bool DocumentMarkerController::hasMarkers(Range* range, DocumentMarker::MarkerTy
ASSERT(endContainer);
Node* pastLastNode = range->pastLastNode();
- for (Node* node = range->firstNode(); node != pastLastNode; node = NodeTraversal::next(node)) {
+ for (Node* node = range->firstNode(); node != pastLastNode; node = NodeTraversal::next(*node)) {
Vector<DocumentMarker*> markers = markersFor(node);
Vector<DocumentMarker*>::const_iterator end = markers.end();
for (Vector<DocumentMarker*>::const_iterator it = markers.begin(); it != end; ++it) {
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/DocumentOrderedMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698