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

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

Issue 1301933002: Move a static member function nodeIsUserSelectNone() out from PositionAlgorithm template class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-19T17:33:44 Move out from class 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 PositionAlgorithm<Strategy> upstream(EditingBoundaryCrossingRule = CannotCro ssEditingBoundary) const; 193 PositionAlgorithm<Strategy> upstream(EditingBoundaryCrossingRule = CannotCro ssEditingBoundary) const;
194 PositionAlgorithm<Strategy> downstream(EditingBoundaryCrossingRule = CannotC rossEditingBoundary) const; 194 PositionAlgorithm<Strategy> downstream(EditingBoundaryCrossingRule = CannotC rossEditingBoundary) const;
195 195
196 bool isCandidate() const; 196 bool isCandidate() const;
197 bool inRenderedText() const; 197 bool inRenderedText() const;
198 198
199 InlineBoxPosition computeInlineBoxPosition(EAffinity) const; 199 InlineBoxPosition computeInlineBoxPosition(EAffinity) const;
200 InlineBoxPosition computeInlineBoxPosition(EAffinity, TextDirection primaryD irection) const; 200 InlineBoxPosition computeInlineBoxPosition(EAffinity, TextDirection primaryD irection) const;
201 201
202 static bool hasRenderedNonAnonymousDescendantsWithHeight(LayoutObject*); 202 static bool hasRenderedNonAnonymousDescendantsWithHeight(LayoutObject*);
203 static bool nodeIsUserSelectNone(Node*);
204 static bool nodeIsUserSelectAll(const Node*); 203 static bool nodeIsUserSelectAll(const Node*);
205 static Node* rootUserSelectAllForNode(Node*); 204 static Node* rootUserSelectAllForNode(Node*);
206 static PositionAlgorithm<Strategy> beforeNode(Node* anchorNode); 205 static PositionAlgorithm<Strategy> beforeNode(Node* anchorNode);
207 static PositionAlgorithm<Strategy> afterNode(Node* anchorNode); 206 static PositionAlgorithm<Strategy> afterNode(Node* anchorNode);
208 static PositionAlgorithm<Strategy> inParentBeforeNode(const Node& anchorNode ); 207 static PositionAlgorithm<Strategy> inParentBeforeNode(const Node& anchorNode );
209 static PositionAlgorithm<Strategy> inParentAfterNode(const Node& anchorNode) ; 208 static PositionAlgorithm<Strategy> inParentAfterNode(const Node& anchorNode) ;
210 static int lastOffsetInNode(Node* anchorNode); 209 static int lastOffsetInNode(Node* anchorNode);
211 static PositionAlgorithm<Strategy> firstPositionInNode(Node* anchorNode); 210 static PositionAlgorithm<Strategy> firstPositionInNode(Node* anchorNode);
212 static PositionAlgorithm<Strategy> lastPositionInNode(Node* anchorNode); 211 static PositionAlgorithm<Strategy> lastPositionInNode(Node* anchorNode);
213 static int minOffsetForNode(Node* anchorNode, int offset); 212 static int minOffsetForNode(Node* anchorNode, int offset);
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 { 437 {
439 return position; 438 return position;
440 } 439 }
441 440
442 template <> 441 template <>
443 inline PositionInComposedTree fromPositionInDOMTree<EditingInComposedTreeStrateg y>(const Position& position) 442 inline PositionInComposedTree fromPositionInDOMTree<EditingInComposedTreeStrateg y>(const Position& position)
444 { 443 {
445 return toPositionInComposedTree(position); 444 return toPositionInComposedTree(position);
446 } 445 }
447 446
447 CORE_EXPORT bool nodeIsUserSelectNone(Node*);
tkent 2015/08/19 09:24:04 Is Position.{h,cpp} the best home of nodeIsUserSel
yosin_UTC9 2015/08/19 09:34:18 No. Following patch will move it to "EditingUtilit
tkent 2015/08/19 09:41:08 I prefer moving it to EditingUtilities in this CL.
yosin_UTC9 2015/08/19 09:59:32 Done.
448
448 } // namespace blink 449 } // namespace blink
449 450
450 #ifndef NDEBUG 451 #ifndef NDEBUG
451 // Outside the WebCore namespace for ease of invocation from gdb. 452 // Outside the WebCore namespace for ease of invocation from gdb.
452 void showTree(const blink::Position&); 453 void showTree(const blink::Position&);
453 void showTree(const blink::Position*); 454 void showTree(const blink::Position*);
454 #endif 455 #endif
455 456
456 #endif // Position_h 457 #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