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