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

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

Issue 565613002: Remove usages of temporary Range objects that end up registered on the (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/editing/TextIterator.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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 void appendTrailingWhitespace(); 92 void appendTrailingWhitespace();
93 93
94 bool expandUsingGranularity(TextGranularity granularity); 94 bool expandUsingGranularity(TextGranularity granularity);
95 95
96 // We don't yet support multi-range selections, so we only ever have one ran ge to return. 96 // We don't yet support multi-range selections, so we only ever have one ran ge to return.
97 PassRefPtrWillBeRawPtr<Range> firstRange() const; 97 PassRefPtrWillBeRawPtr<Range> firstRange() const;
98 98
99 bool intersectsNode(Node*) const; 99 bool intersectsNode(Node*) const;
100 100
101 // FIXME: Most callers probably don't want this function, but are using it 101 // FIXME: Most callers probably don't want these functions, but
102 // for historical reasons. toNormalizedRange contracts the range around 102 // are using them for historical reasons. toNormalizedRange and
103 // text, and moves the caret upstream before returning the range. 103 // toNormalizedPositions contracts the range around text, and
104 // moves the caret upstream before returning the range/positions.
104 PassRefPtrWillBeRawPtr<Range> toNormalizedRange() const; 105 PassRefPtrWillBeRawPtr<Range> toNormalizedRange() const;
106 bool toNormalizedPositions(Position& start, Position& end) const;
105 107
106 Element* rootEditableElement() const; 108 Element* rootEditableElement() const;
107 bool isContentEditable() const; 109 bool isContentEditable() const;
108 bool hasEditableStyle() const; 110 bool hasEditableStyle() const;
109 bool isContentRichlyEditable() const; 111 bool isContentRichlyEditable() const;
110 // Returns a shadow tree node for legacy shadow trees, a child of the 112 // Returns a shadow tree node for legacy shadow trees, a child of the
111 // ShadowRoot node for new shadow trees, or 0 for non-shadow trees. 113 // ShadowRoot node for new shadow trees, or 0 for non-shadow trees.
112 Node* nonBoundaryShadowTreeRootNode() const; 114 Node* nonBoundaryShadowTreeRootNode() const;
113 115
114 VisiblePosition visiblePositionRespectingEditingBoundary(const LayoutPoint& localPoint, Node* targetNode) const; 116 VisiblePosition visiblePositionRespectingEditingBoundary(const LayoutPoint& localPoint, Node* targetNode) const;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 189
188 } // namespace blink 190 } // namespace blink
189 191
190 #ifndef NDEBUG 192 #ifndef NDEBUG
191 // Outside the WebCore namespace for ease of invocation from gdb. 193 // Outside the WebCore namespace for ease of invocation from gdb.
192 void showTree(const blink::VisibleSelection&); 194 void showTree(const blink::VisibleSelection&);
193 void showTree(const blink::VisibleSelection*); 195 void showTree(const blink::VisibleSelection*);
194 #endif 196 #endif
195 197
196 #endif // VisibleSelection_h 198 #endif // VisibleSelection_h
OLDNEW
« no previous file with comments | « Source/core/editing/TextIterator.cpp ('k') | Source/core/editing/VisibleSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698