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

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

Issue 1328493002: Move static member function normalizeRange() out from VisibleSelection (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-09-01T16:34:49 Created 5 years, 3 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 | « Source/core/editing/FrameSelection.cpp ('k') | Source/core/editing/VisibleSelection.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 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004 Apple Computer, 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 void appendTrailingWhitespace(); 151 void appendTrailingWhitespace();
152 152
153 bool expandUsingGranularity(TextGranularity); 153 bool expandUsingGranularity(TextGranularity);
154 bool expandUsingGranularityInComposedTree(TextGranularity); 154 bool expandUsingGranularityInComposedTree(TextGranularity);
155 155
156 // TODO(yosin) Most callers probably don't want these functions, but 156 // TODO(yosin) Most callers probably don't want these functions, but
157 // are using them for historical reasons. |toNormalizedEphemeralRange()| 157 // are using them for historical reasons. |toNormalizedEphemeralRange()|
158 // contracts the range around text, and moves the caret most backward 158 // contracts the range around text, and moves the caret most backward
159 // visually equivalent position before returning the range/positions. 159 // visually equivalent position before returning the range/positions.
160 EphemeralRange toNormalizedEphemeralRange() const; 160 EphemeralRange toNormalizedEphemeralRange() const;
161 static EphemeralRange normalizeRange(const EphemeralRange&);
162 static EphemeralRangeInComposedTree normalizeRange(const EphemeralRangeInCom posedTree&);
163 161
164 Element* rootEditableElement() const; 162 Element* rootEditableElement() const;
165 bool isContentEditable() const; 163 bool isContentEditable() const;
166 bool hasEditableStyle() const; 164 bool hasEditableStyle() const;
167 bool isContentRichlyEditable() const; 165 bool isContentRichlyEditable() const;
168 // Returns a shadow tree node for legacy shadow trees, a child of the 166 // Returns a shadow tree node for legacy shadow trees, a child of the
169 // ShadowRoot node for new shadow trees, or 0 for non-shadow trees. 167 // ShadowRoot node for new shadow trees, or 0 for non-shadow trees.
170 Node* nonBoundaryShadowTreeRootNode() const; 168 Node* nonBoundaryShadowTreeRootNode() const;
171 169
172 VisiblePosition visiblePositionRespectingEditingBoundary(const LayoutPoint& localPoint, Node* targetNode) const; 170 VisiblePosition visiblePositionRespectingEditingBoundary(const LayoutPoint& localPoint, Node* targetNode) const;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 256
259 } // namespace blink 257 } // namespace blink
260 258
261 #ifndef NDEBUG 259 #ifndef NDEBUG
262 // Outside the WebCore namespace for ease of invocation from gdb. 260 // Outside the WebCore namespace for ease of invocation from gdb.
263 void showTree(const blink::VisibleSelection&); 261 void showTree(const blink::VisibleSelection&);
264 void showTree(const blink::VisibleSelection*); 262 void showTree(const blink::VisibleSelection*);
265 #endif 263 #endif
266 264
267 #endif // VisibleSelection_h 265 #endif // VisibleSelection_h
OLDNEW
« no previous file with comments | « Source/core/editing/FrameSelection.cpp ('k') | Source/core/editing/VisibleSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698