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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 if (!node || !node->renderer()) | 540 if (!node || !node->renderer()) |
541 return false; | 541 return false; |
542 | 542 |
543 if (!node->renderer()->isInline()) | 543 if (!node->renderer()->isInline()) |
544 return true; | 544 return true; |
545 | 545 |
546 // Don't include inline tables. | 546 // Don't include inline tables. |
547 if (node->hasTagName(tableTag)) | 547 if (node->hasTagName(tableTag)) |
548 return false; | 548 return false; |
549 | 549 |
| 550 // A Marquee elements are moving so we should assume their ends are always |
| 551 // visibily distinct. |
| 552 if (node->hasTagName(marqueeTag)) |
| 553 return true; |
| 554 |
550 // There is a VisiblePosition inside an empty inline-block container. | 555 // There is a VisiblePosition inside an empty inline-block container. |
551 return node->renderer()->isReplaced() && canHaveChildrenForEditing(node) &&
toRenderBox(node->renderer())->height() != 0 && !node->firstChild(); | 556 return node->renderer()->isReplaced() && canHaveChildrenForEditing(node) &&
toRenderBox(node->renderer())->height() != 0 && !node->firstChild(); |
552 } | 557 } |
553 | 558 |
554 static Node* enclosingVisualBoundary(Node* node) | 559 static Node* enclosingVisualBoundary(Node* node) |
555 { | 560 { |
556 while (node && !endsOfNodeAreVisuallyDistinctPositions(node)) | 561 while (node && !endsOfNodeAreVisuallyDistinctPositions(node)) |
557 node = node->parentNode(); | 562 node = node->parentNode(); |
558 | 563 |
559 return node; | 564 return node; |
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1382 pos.showTreeForThis(); | 1387 pos.showTreeForThis(); |
1383 } | 1388 } |
1384 | 1389 |
1385 void showTree(const WebCore::Position* pos) | 1390 void showTree(const WebCore::Position* pos) |
1386 { | 1391 { |
1387 if (pos) | 1392 if (pos) |
1388 pos->showTreeForThis(); | 1393 pos->showTreeForThis(); |
1389 } | 1394 } |
1390 | 1395 |
1391 #endif | 1396 #endif |
OLD | NEW |