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

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

Issue 2416553002: Convert set{End,Start}RespectingGranularity() in VisibleSlection as pure functions (Closed)
Patch Set: 2016-10-12T19:51:30 Created 4 years, 2 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 | third_party/WebKit/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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 const PositionTemplate<Strategy>& extent, 177 const PositionTemplate<Strategy>& extent,
178 TextAffinity, 178 TextAffinity,
179 bool isDirectional); 179 bool isDirectional);
180 180
181 void validate(TextGranularity = CharacterGranularity); 181 void validate(TextGranularity = CharacterGranularity);
182 182
183 // Support methods for validate() 183 // Support methods for validate()
184 void setBaseAndExtentToDeepEquivalents(); 184 void setBaseAndExtentToDeepEquivalents();
185 void adjustSelectionToAvoidCrossingShadowBoundaries(); 185 void adjustSelectionToAvoidCrossingShadowBoundaries();
186 void adjustSelectionToAvoidCrossingEditingBoundaries(); 186 void adjustSelectionToAvoidCrossingEditingBoundaries();
187 void setEndRespectingGranularity(TextGranularity);
188 void setStartRespectingGranularity(TextGranularity);
189 void updateSelectionType(); 187 void updateSelectionType();
190 188
191 // We need to store these as Positions because VisibleSelection is 189 // We need to store these as Positions because VisibleSelection is
192 // used to store values in editing commands for use when 190 // used to store values in editing commands for use when
193 // undoing the command. We need to be able to create a selection that, while 191 // undoing the command. We need to be able to create a selection that, while
194 // currently invalid, will be valid once the changes are undone. 192 // currently invalid, will be valid once the changes are undone.
195 193
196 // Where the first click happened 194 // Where the first click happened
197 PositionTemplate<Strategy> m_base; 195 PositionTemplate<Strategy> m_base;
198 // Where the end click happened 196 // Where the end click happened
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 336
339 #ifndef NDEBUG 337 #ifndef NDEBUG
340 // Outside the WebCore namespace for ease of invocation from gdb. 338 // Outside the WebCore namespace for ease of invocation from gdb.
341 void showTree(const blink::VisibleSelection&); 339 void showTree(const blink::VisibleSelection&);
342 void showTree(const blink::VisibleSelection*); 340 void showTree(const blink::VisibleSelection*);
343 void showTree(const blink::VisibleSelectionInFlatTree&); 341 void showTree(const blink::VisibleSelectionInFlatTree&);
344 void showTree(const blink::VisibleSelectionInFlatTree*); 342 void showTree(const blink::VisibleSelectionInFlatTree*);
345 #endif 343 #endif
346 344
347 #endif // VisibleSelection_h 345 #endif // VisibleSelection_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/VisibleSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698