OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |