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

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

Issue 171773008: Rename childNodeCount() / childNode() methods for clarity (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Further renaming for consistency Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« 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 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 if (box) { 995 if (box) {
996 root = box->root()->nextRootBox(); 996 root = box->root()->nextRootBox();
997 // We want to skip zero height boxes. 997 // We want to skip zero height boxes.
998 // This could happen in case it is a TrailingFloatsRootInlineBox. 998 // This could happen in case it is a TrailingFloatsRootInlineBox.
999 if (!root || !root->logicalHeight() || !root->firstLeafChild()) 999 if (!root || !root->logicalHeight() || !root->firstLeafChild())
1000 root = 0; 1000 root = 0;
1001 } 1001 }
1002 1002
1003 if (!root) { 1003 if (!root) {
1004 // FIXME: We need do the same in previousLinePosition. 1004 // FIXME: We need do the same in previousLinePosition.
1005 Node* child = node->childNode(p.deprecatedEditingOffset()); 1005 Node* child = node->traverseToChildAt(p.deprecatedEditingOffset());
1006 node = child ? child : &node->lastDescendant(); 1006 node = child ? child : &node->lastDescendant();
1007 Position position = nextRootInlineBoxCandidatePosition(node, visiblePosi tion, editableType); 1007 Position position = nextRootInlineBoxCandidatePosition(node, visiblePosi tion, editableType);
1008 if (position.isNotNull()) { 1008 if (position.isNotNull()) {
1009 RenderedPosition renderedPosition(position); 1009 RenderedPosition renderedPosition(position);
1010 root = renderedPosition.rootBox(); 1010 root = renderedPosition.rootBox();
1011 if (!root) 1011 if (!root)
1012 return position; 1012 return position;
1013 } 1013 }
1014 } 1014 }
1015 1015
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 { 1393 {
1394 return direction == LTR ? logicalStartOfLine(c) : logicalEndOfLine(c); 1394 return direction == LTR ? logicalStartOfLine(c) : logicalEndOfLine(c);
1395 } 1395 }
1396 1396
1397 VisiblePosition rightBoundaryOfLine(const VisiblePosition& c, TextDirection dire ction) 1397 VisiblePosition rightBoundaryOfLine(const VisiblePosition& c, TextDirection dire ction)
1398 { 1398 {
1399 return direction == LTR ? logicalEndOfLine(c) : logicalStartOfLine(c); 1399 return direction == LTR ? logicalEndOfLine(c) : logicalStartOfLine(c);
1400 } 1400 }
1401 1401
1402 } 1402 }
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