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

Side by Side Diff: Source/core/editing/htmlediting.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/VisibleUnits.cpp ('k') | Source/core/editing/markup.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 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 break; 598 break;
599 } 599 }
600 600
601 return highest; 601 return highest;
602 } 602 }
603 603
604 static bool hasARenderedDescendant(Node* node, Node* excludedNode) 604 static bool hasARenderedDescendant(Node* node, Node* excludedNode)
605 { 605 {
606 for (Node* n = node->firstChild(); n;) { 606 for (Node* n = node->firstChild(); n;) {
607 if (n == excludedNode) { 607 if (n == excludedNode) {
608 n = NodeTraversal::nextSkippingChildren(n, node); 608 n = NodeTraversal::nextSkippingChildren(*n, node);
609 continue; 609 continue;
610 } 610 }
611 if (n->renderer()) 611 if (n->renderer())
612 return true; 612 return true;
613 n = NodeTraversal::next(*n, node); 613 n = NodeTraversal::next(*n, node);
614 } 614 }
615 return false; 615 return false;
616 } 616 }
617 617
618 Node* highestNodeToRemoveInPruning(Node* node, Node* excludeNode) 618 Node* highestNodeToRemoveInPruning(Node* node, Node* excludeNode)
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 // if the selection starts just before a paragraph break, skip over it 1153 // if the selection starts just before a paragraph break, skip over it
1154 if (isEndOfParagraph(visiblePosition)) 1154 if (isEndOfParagraph(visiblePosition))
1155 return visiblePosition.next().deepEquivalent().downstream(); 1155 return visiblePosition.next().deepEquivalent().downstream();
1156 1156
1157 // otherwise, make sure to be at the start of the first selected node, 1157 // otherwise, make sure to be at the start of the first selected node,
1158 // instead of possibly at the end of the last node before the selection 1158 // instead of possibly at the end of the last node before the selection
1159 return visiblePosition.deepEquivalent().downstream(); 1159 return visiblePosition.deepEquivalent().downstream();
1160 } 1160 }
1161 1161
1162 } // namespace WebCore 1162 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/editing/VisibleUnits.cpp ('k') | Source/core/editing/markup.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698