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

Side by Side Diff: Source/core/editing/VisibleUnits.cpp

Issue 69543007: Have NodeTraversal::nextSkippingChildren() 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 unified diff | Download patch
« no previous file with comments | « Source/core/editing/TextIterator.cpp ('k') | Source/core/editing/htmlediting.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 if ((*text)[i] == '\n') 1223 if ((*text)[i] == '\n')
1224 return VisiblePosition(Position(toText(n), i), DOWNSTREA M); 1224 return VisiblePosition(Position(toText(n), i), DOWNSTREA M);
1225 } 1225 }
1226 } 1226 }
1227 node = n; 1227 node = n;
1228 offset = r->caretMaxOffset(); 1228 offset = r->caretMaxOffset();
1229 n = NodeTraversal::next(*n, stayInsideBlock); 1229 n = NodeTraversal::next(*n, stayInsideBlock);
1230 } else if (editingIgnoresContent(n) || isRenderedTable(n)) { 1230 } else if (editingIgnoresContent(n) || isRenderedTable(n)) {
1231 node = n; 1231 node = n;
1232 type = Position::PositionIsAfterAnchor; 1232 type = Position::PositionIsAfterAnchor;
1233 n = NodeTraversal::nextSkippingChildren(n, stayInsideBlock); 1233 n = NodeTraversal::nextSkippingChildren(*n, stayInsideBlock);
1234 } else { 1234 } else {
1235 n = NodeTraversal::next(*n, stayInsideBlock); 1235 n = NodeTraversal::next(*n, stayInsideBlock);
1236 } 1236 }
1237 } 1237 }
1238 1238
1239 if (type == Position::PositionIsOffsetInAnchor) 1239 if (type == Position::PositionIsOffsetInAnchor)
1240 return VisiblePosition(Position(node, offset, type), DOWNSTREAM); 1240 return VisiblePosition(Position(node, offset, type), DOWNSTREAM);
1241 1241
1242 return VisiblePosition(Position(node, type), DOWNSTREAM); 1242 return VisiblePosition(Position(node, type), DOWNSTREAM);
1243 } 1243 }
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 { 1410 {
1411 return direction == LTR ? logicalStartOfLine(c) : logicalEndOfLine(c); 1411 return direction == LTR ? logicalStartOfLine(c) : logicalEndOfLine(c);
1412 } 1412 }
1413 1413
1414 VisiblePosition rightBoundaryOfLine(const VisiblePosition& c, TextDirection dire ction) 1414 VisiblePosition rightBoundaryOfLine(const VisiblePosition& c, TextDirection dire ction)
1415 { 1415 {
1416 return direction == LTR ? logicalEndOfLine(c) : logicalStartOfLine(c); 1416 return direction == LTR ? logicalEndOfLine(c) : logicalStartOfLine(c);
1417 } 1417 }
1418 1418
1419 } 1419 }
OLDNEW
« no previous file with comments | « Source/core/editing/TextIterator.cpp ('k') | Source/core/editing/htmlediting.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698