| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2008 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 // These return useful visually equivalent positions. | 190 // These return useful visually equivalent positions. |
| 191 PositionAlgorithm<Strategy> upstream(EditingBoundaryCrossingRule = CannotCro
ssEditingBoundary) const; | 191 PositionAlgorithm<Strategy> upstream(EditingBoundaryCrossingRule = CannotCro
ssEditingBoundary) const; |
| 192 PositionAlgorithm<Strategy> downstream(EditingBoundaryCrossingRule = CannotC
rossEditingBoundary) const; | 192 PositionAlgorithm<Strategy> downstream(EditingBoundaryCrossingRule = CannotC
rossEditingBoundary) const; |
| 193 | 193 |
| 194 bool isCandidate() const; | 194 bool isCandidate() const; |
| 195 bool inRenderedText() const; | 195 bool inRenderedText() const; |
| 196 | 196 |
| 197 InlineBoxPosition computeInlineBoxPosition(TextAffinity) const; | 197 InlineBoxPosition computeInlineBoxPosition(TextAffinity) const; |
| 198 InlineBoxPosition computeInlineBoxPosition(TextAffinity, TextDirection prima
ryDirection) const; | 198 InlineBoxPosition computeInlineBoxPosition(TextAffinity, TextDirection prima
ryDirection) const; |
| 199 | 199 |
| 200 static bool hasRenderedNonAnonymousDescendantsWithHeight(LayoutObject*); | |
| 201 static bool nodeIsUserSelectAll(const Node*); | 200 static bool nodeIsUserSelectAll(const Node*); |
| 202 static Node* rootUserSelectAllForNode(Node*); | 201 static Node* rootUserSelectAllForNode(Node*); |
| 203 static PositionAlgorithm<Strategy> beforeNode(Node* anchorNode); | 202 static PositionAlgorithm<Strategy> beforeNode(Node* anchorNode); |
| 204 static PositionAlgorithm<Strategy> afterNode(Node* anchorNode); | 203 static PositionAlgorithm<Strategy> afterNode(Node* anchorNode); |
| 205 static PositionAlgorithm<Strategy> inParentBeforeNode(const Node& anchorNode
); | 204 static PositionAlgorithm<Strategy> inParentBeforeNode(const Node& anchorNode
); |
| 206 static PositionAlgorithm<Strategy> inParentAfterNode(const Node& anchorNode)
; | 205 static PositionAlgorithm<Strategy> inParentAfterNode(const Node& anchorNode)
; |
| 207 static int lastOffsetInNode(Node* anchorNode); | 206 static int lastOffsetInNode(Node* anchorNode); |
| 208 static PositionAlgorithm<Strategy> firstPositionInNode(Node* anchorNode); | 207 static PositionAlgorithm<Strategy> firstPositionInNode(Node* anchorNode); |
| 209 static PositionAlgorithm<Strategy> lastPositionInNode(Node* anchorNode); | 208 static PositionAlgorithm<Strategy> lastPositionInNode(Node* anchorNode); |
| 210 static int minOffsetForNode(Node* anchorNode, int offset); | 209 static int minOffsetForNode(Node* anchorNode, int offset); |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 { | 434 { |
| 436 return position; | 435 return position; |
| 437 } | 436 } |
| 438 | 437 |
| 439 template <> | 438 template <> |
| 440 inline PositionInComposedTree fromPositionInDOMTree<EditingInComposedTreeStrateg
y>(const Position& position) | 439 inline PositionInComposedTree fromPositionInDOMTree<EditingInComposedTreeStrateg
y>(const Position& position) |
| 441 { | 440 { |
| 442 return toPositionInComposedTree(position); | 441 return toPositionInComposedTree(position); |
| 443 } | 442 } |
| 444 | 443 |
| 444 // TODO(yosin) We should move |hasRenderedNonAnonymousDescendantsWithHeight| |
| 445 // to "VisibleUnits.cpp" to reduce |LayoutObject| dependency in "Position.cpp" |
| 446 bool hasRenderedNonAnonymousDescendantsWithHeight(LayoutObject*); |
| 447 |
| 445 } // namespace blink | 448 } // namespace blink |
| 446 | 449 |
| 447 #ifndef NDEBUG | 450 #ifndef NDEBUG |
| 448 // Outside the WebCore namespace for ease of invocation from gdb. | 451 // Outside the WebCore namespace for ease of invocation from gdb. |
| 449 void showTree(const blink::Position&); | 452 void showTree(const blink::Position&); |
| 450 void showTree(const blink::Position*); | 453 void showTree(const blink::Position*); |
| 451 #endif | 454 #endif |
| 452 | 455 |
| 453 #endif // Position_h | 456 #endif // Position_h |
| OLD | NEW |