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

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: 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
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 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 if ((*text)[i] == '\n') 1222 if ((*text)[i] == '\n')
1223 return VisiblePosition(Position(toText(n), i), DOWNSTREA M); 1223 return VisiblePosition(Position(toText(n), i), DOWNSTREA M);
1224 } 1224 }
1225 } 1225 }
1226 node = n; 1226 node = n;
1227 offset = r->caretMaxOffset(); 1227 offset = r->caretMaxOffset();
1228 n = NodeTraversal::next(*n, stayInsideBlock); 1228 n = NodeTraversal::next(*n, stayInsideBlock);
1229 } else if (editingIgnoresContent(n) || isRenderedTable(n)) { 1229 } else if (editingIgnoresContent(n) || isRenderedTable(n)) {
1230 node = n; 1230 node = n;
1231 type = Position::PositionIsAfterAnchor; 1231 type = Position::PositionIsAfterAnchor;
1232 n = NodeTraversal::nextSkippingChildren(n, stayInsideBlock); 1232 n = NodeTraversal::nextSkippingChildren(*n, stayInsideBlock);
1233 } else { 1233 } else {
1234 n = NodeTraversal::next(*n, stayInsideBlock); 1234 n = NodeTraversal::next(*n, stayInsideBlock);
1235 } 1235 }
1236 } 1236 }
1237 1237
1238 if (type == Position::PositionIsOffsetInAnchor) 1238 if (type == Position::PositionIsOffsetInAnchor)
1239 return VisiblePosition(Position(node, offset, type), DOWNSTREAM); 1239 return VisiblePosition(Position(node, offset, type), DOWNSTREAM);
1240 1240
1241 return VisiblePosition(Position(node, type), DOWNSTREAM); 1241 return VisiblePosition(Position(node, type), DOWNSTREAM);
1242 } 1242 }
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 { 1409 {
1410 return direction == LTR ? logicalStartOfLine(c) : logicalEndOfLine(c); 1410 return direction == LTR ? logicalStartOfLine(c) : logicalEndOfLine(c);
1411 } 1411 }
1412 1412
1413 VisiblePosition rightBoundaryOfLine(const VisiblePosition& c, TextDirection dire ction) 1413 VisiblePosition rightBoundaryOfLine(const VisiblePosition& c, TextDirection dire ction)
1414 { 1414 {
1415 return direction == LTR ? logicalEndOfLine(c) : logicalStartOfLine(c); 1415 return direction == LTR ? logicalEndOfLine(c) : logicalStartOfLine(c);
1416 } 1416 }
1417 1417
1418 } 1418 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698