| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2009 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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 // Don't include inline tables. | 490 // Don't include inline tables. |
| 491 if (isHTMLTableElement(*node)) | 491 if (isHTMLTableElement(*node)) |
| 492 return false; | 492 return false; |
| 493 | 493 |
| 494 // A Marquee elements are moving so we should assume their ends are always | 494 // A Marquee elements are moving so we should assume their ends are always |
| 495 // visibily distinct. | 495 // visibily distinct. |
| 496 if (isHTMLMarqueeElement(*node)) | 496 if (isHTMLMarqueeElement(*node)) |
| 497 return true; | 497 return true; |
| 498 | 498 |
| 499 // There is a VisiblePosition inside an empty inline-block container. | 499 // There is a VisiblePosition inside an empty inline-block container. |
| 500 return node->renderer()->isReplaced() && canHaveChildrenForEditing(node) &&
toRenderBox(node->renderer())->height() != 0 && !node->firstChild(); | 500 return node->renderer()->isReplaced() && canHaveChildrenForEditing(node) &&
toRenderBox(node->renderer())->height() != 0 && !node->hasChildren(); |
| 501 } | 501 } |
| 502 | 502 |
| 503 static Node* enclosingVisualBoundary(Node* node) | 503 static Node* enclosingVisualBoundary(Node* node) |
| 504 { | 504 { |
| 505 while (node && !endsOfNodeAreVisuallyDistinctPositions(node)) | 505 while (node && !endsOfNodeAreVisuallyDistinctPositions(node)) |
| 506 node = node->parentNode(); | 506 node = node->parentNode(); |
| 507 | 507 |
| 508 return node; | 508 return node; |
| 509 } | 509 } |
| 510 | 510 |
| (...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1304 pos.showTreeForThis(); | 1304 pos.showTreeForThis(); |
| 1305 } | 1305 } |
| 1306 | 1306 |
| 1307 void showTree(const blink::Position* pos) | 1307 void showTree(const blink::Position* pos) |
| 1308 { | 1308 { |
| 1309 if (pos) | 1309 if (pos) |
| 1310 pos->showTreeForThis(); | 1310 pos->showTreeForThis(); |
| 1311 } | 1311 } |
| 1312 | 1312 |
| 1313 #endif | 1313 #endif |
| OLD | NEW |