| OLD | NEW |
| 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 2771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2782 return false; | 2782 return false; |
| 2783 } | 2783 } |
| 2784 | 2784 |
| 2785 if (isDisplayInsideTable(anchorNode) || Strategy::editingIgnoresContent(anch
orNode)) { | 2785 if (isDisplayInsideTable(anchorNode) || Strategy::editingIgnoresContent(anch
orNode)) { |
| 2786 if (!position.atFirstEditingPositionForNode() && !position.atLastEditing
PositionForNode()) | 2786 if (!position.atFirstEditingPositionForNode() && !position.atLastEditing
PositionForNode()) |
| 2787 return false; | 2787 return false; |
| 2788 const Node* parent = Strategy::parent(*anchorNode); | 2788 const Node* parent = Strategy::parent(*anchorNode); |
| 2789 return parent->layoutObject() && parent->layoutObject()->isSelectable(); | 2789 return parent->layoutObject() && parent->layoutObject()->isSelectable(); |
| 2790 } | 2790 } |
| 2791 | 2791 |
| 2792 if (anchorNode->document().documentElement() == anchorNode) | 2792 if (anchorNode->document().documentElement() == anchorNode || anchorNode->is
DocumentNode()) |
| 2793 return false; | 2793 return false; |
| 2794 | 2794 |
| 2795 if (!layoutObject->isSelectable()) | 2795 if (!layoutObject->isSelectable()) |
| 2796 return false; | 2796 return false; |
| 2797 | 2797 |
| 2798 if (layoutObject->isLayoutBlockFlow() || layoutObject->isFlexibleBox() || la
youtObject->isLayoutGrid()) { | 2798 if (layoutObject->isLayoutBlockFlow() || layoutObject->isFlexibleBox() || la
youtObject->isLayoutGrid()) { |
| 2799 if (toLayoutBlock(layoutObject)->logicalHeight() || isHTMLBodyElement(*a
nchorNode)) { | 2799 if (toLayoutBlock(layoutObject)->logicalHeight() || isHTMLBodyElement(*a
nchorNode)) { |
| 2800 if (!hasRenderedNonAnonymousDescendantsWithHeight(layoutObject)) | 2800 if (!hasRenderedNonAnonymousDescendantsWithHeight(layoutObject)) |
| 2801 return position.atFirstEditingPositionForNode(); | 2801 return position.atFirstEditingPositionForNode(); |
| 2802 return anchorNode->hasEditableStyle() && atEditingBoundary(position)
; | 2802 return anchorNode->hasEditableStyle() && atEditingBoundary(position)
; |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3350 { | 3350 { |
| 3351 return previousPositionOfAlgorithm<EditingStrategy>(visiblePosition, rule); | 3351 return previousPositionOfAlgorithm<EditingStrategy>(visiblePosition, rule); |
| 3352 } | 3352 } |
| 3353 | 3353 |
| 3354 VisiblePositionInComposedTree previousPositionOf(const VisiblePositionInComposed
Tree& visiblePosition, EditingBoundaryCrossingRule rule) | 3354 VisiblePositionInComposedTree previousPositionOf(const VisiblePositionInComposed
Tree& visiblePosition, EditingBoundaryCrossingRule rule) |
| 3355 { | 3355 { |
| 3356 return previousPositionOfAlgorithm<EditingInComposedTreeStrategy>(visiblePos
ition, rule); | 3356 return previousPositionOfAlgorithm<EditingInComposedTreeStrategy>(visiblePos
ition, rule); |
| 3357 } | 3357 } |
| 3358 | 3358 |
| 3359 } // namespace blink | 3359 } // namespace blink |
| OLD | NEW |