| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 bool atLastEditingPositionForNode() const; | 183 bool atLastEditingPositionForNode() const; |
| 184 | 184 |
| 185 bool atStartOfTree() const; | 185 bool atStartOfTree() const; |
| 186 bool atEndOfTree() const; | 186 bool atEndOfTree() const; |
| 187 | 187 |
| 188 // These return useful visually equivalent positions. | 188 // These return useful visually equivalent positions. |
| 189 PositionAlgorithm<Strategy> upstream(EditingBoundaryCrossingRule = CannotCro
ssEditingBoundary) const; | 189 PositionAlgorithm<Strategy> upstream(EditingBoundaryCrossingRule = CannotCro
ssEditingBoundary) const; |
| 190 PositionAlgorithm<Strategy> downstream(EditingBoundaryCrossingRule = CannotC
rossEditingBoundary) const; | 190 PositionAlgorithm<Strategy> downstream(EditingBoundaryCrossingRule = CannotC
rossEditingBoundary) const; |
| 191 | 191 |
| 192 bool isCandidate() const; | 192 bool isCandidate() const; |
| 193 bool inRenderedText() const; | |
| 194 | 193 |
| 195 InlineBoxPosition computeInlineBoxPosition(TextAffinity) const; | 194 InlineBoxPosition computeInlineBoxPosition(TextAffinity) const; |
| 196 InlineBoxPosition computeInlineBoxPosition(TextAffinity, TextDirection prima
ryDirection) const; | 195 InlineBoxPosition computeInlineBoxPosition(TextAffinity, TextDirection prima
ryDirection) const; |
| 197 | 196 |
| 198 static bool nodeIsUserSelectAll(const Node*); | 197 static bool nodeIsUserSelectAll(const Node*); |
| 199 static Node* rootUserSelectAllForNode(Node*); | 198 static Node* rootUserSelectAllForNode(Node*); |
| 200 static PositionAlgorithm<Strategy> beforeNode(Node* anchorNode); | 199 static PositionAlgorithm<Strategy> beforeNode(Node* anchorNode); |
| 201 static PositionAlgorithm<Strategy> afterNode(Node* anchorNode); | 200 static PositionAlgorithm<Strategy> afterNode(Node* anchorNode); |
| 202 static PositionAlgorithm<Strategy> inParentBeforeNode(const Node& anchorNode
); | 201 static PositionAlgorithm<Strategy> inParentBeforeNode(const Node& anchorNode
); |
| 203 static PositionAlgorithm<Strategy> inParentAfterNode(const Node& anchorNode)
; | 202 static PositionAlgorithm<Strategy> inParentAfterNode(const Node& anchorNode)
; |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 template <> | 440 template <> |
| 442 inline PositionInComposedTree fromPositionInDOMTree<EditingInComposedTreeStrateg
y>(const Position& position) | 441 inline PositionInComposedTree fromPositionInDOMTree<EditingInComposedTreeStrateg
y>(const Position& position) |
| 443 { | 442 { |
| 444 return toPositionInComposedTree(position); | 443 return toPositionInComposedTree(position); |
| 445 } | 444 } |
| 446 | 445 |
| 447 // TODO(yosin) We should move |hasRenderedNonAnonymousDescendantsWithHeight| | 446 // TODO(yosin) We should move |hasRenderedNonAnonymousDescendantsWithHeight| |
| 448 // to "VisibleUnits.cpp" to reduce |LayoutObject| dependency in "Position.cpp" | 447 // to "VisibleUnits.cpp" to reduce |LayoutObject| dependency in "Position.cpp" |
| 449 bool hasRenderedNonAnonymousDescendantsWithHeight(LayoutObject*); | 448 bool hasRenderedNonAnonymousDescendantsWithHeight(LayoutObject*); |
| 450 | 449 |
| 450 // TODO(yosin) We should move |inRenderedText()| to "VisibleUnits.h" for |
| 451 // reduce dependency of |LayoutObject| in |Position| class. |
| 452 CORE_EXPORT bool inRenderedText(const Position&); |
| 453 CORE_EXPORT bool inRenderedText(const PositionInComposedTree&); |
| 454 |
| 451 } // namespace blink | 455 } // namespace blink |
| 452 | 456 |
| 453 #ifndef NDEBUG | 457 #ifndef NDEBUG |
| 454 // Outside the WebCore namespace for ease of invocation from gdb. | 458 // Outside the WebCore namespace for ease of invocation from gdb. |
| 455 void showTree(const blink::Position&); | 459 void showTree(const blink::Position&); |
| 456 void showTree(const blink::Position*); | 460 void showTree(const blink::Position*); |
| 457 #endif | 461 #endif |
| 458 | 462 |
| 459 #endif // Position_h | 463 #endif // Position_h |
| OLD | NEW |