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

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

Issue 2964893002: Make VisibleSelection::AppendTrailingWhitespace() as const function (Closed)
Patch Set: 2017-07-04T15:32:18 Created 3 years, 5 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
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 return IsRange() && !Start().IsOrphan() && !End().IsOrphan(); 104 return IsRange() && !Start().IsOrphan() && !End().IsOrphan();
105 } 105 }
106 bool IsNonOrphanedCaretOrRange() const { 106 bool IsNonOrphanedCaretOrRange() const {
107 return !IsNone() && !Start().IsOrphan() && !End().IsOrphan(); 107 return !IsNone() && !Start().IsOrphan() && !End().IsOrphan();
108 } 108 }
109 109
110 // True if base() <= extent(). 110 // True if base() <= extent().
111 bool IsBaseFirst() const { return base_is_first_; } 111 bool IsBaseFirst() const { return base_is_first_; }
112 bool IsDirectional() const { return is_directional_; } 112 bool IsDirectional() const { return is_directional_; }
113 113
114 void AppendTrailingWhitespace(); 114 VisibleSelectionTemplate<Strategy> AppendTrailingWhitespace() const;
115 115
116 // TODO(yosin) Most callers probably don't want these functions, but 116 // TODO(yosin) Most callers probably don't want these functions, but
117 // are using them for historical reasons. |toNormalizedEphemeralRange()| 117 // are using them for historical reasons. |toNormalizedEphemeralRange()|
118 // contracts the range around text, and moves the caret most backward 118 // contracts the range around text, and moves the caret most backward
119 // visually equivalent position before returning the range/positions. 119 // visually equivalent position before returning the range/positions.
120 EphemeralRangeTemplate<Strategy> ToNormalizedEphemeralRange() const; 120 EphemeralRangeTemplate<Strategy> ToNormalizedEphemeralRange() const;
121 121
122 Element* RootEditableElement() const; 122 Element* RootEditableElement() const;
123 bool IsContentEditable() const; 123 bool IsContentEditable() const;
124 bool HasEditableStyle() const; 124 bool HasEditableStyle() const;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 #ifndef NDEBUG 211 #ifndef NDEBUG
212 // Outside the WebCore namespace for ease of invocation from gdb. 212 // Outside the WebCore namespace for ease of invocation from gdb.
213 void showTree(const blink::VisibleSelection&); 213 void showTree(const blink::VisibleSelection&);
214 void showTree(const blink::VisibleSelection*); 214 void showTree(const blink::VisibleSelection*);
215 void showTree(const blink::VisibleSelectionInFlatTree&); 215 void showTree(const blink::VisibleSelectionInFlatTree&);
216 void showTree(const blink::VisibleSelectionInFlatTree*); 216 void showTree(const blink::VisibleSelectionInFlatTree*);
217 #endif 217 #endif
218 218
219 #endif // VisibleSelection_h 219 #endif // VisibleSelection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698