Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: Source/core/editing/Position.h

Issue 1289423005: Move a static member function hasRenderedNonAnonymousDescendantsWithHeight() out from PositionAlgori (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-19T23:25:33 Rebase Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/editing/Position.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/Position.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698