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

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

Issue 1299873002: ALL-IN-ONE Introduce enum class TextAffinity (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-19T18:08:52 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 | « Source/core/editing/DOMSelection.cpp ('k') | Source/core/editing/EditingUtilities.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 // FIXME: isRichlyEditablePosition should also take EUpdateStyle. 193 // FIXME: isRichlyEditablePosition should also take EUpdateStyle.
194 bool isEditablePosition(const Position&, EditableType = ContentIsEditable, EUpda teStyle = UpdateStyle); 194 bool isEditablePosition(const Position&, EditableType = ContentIsEditable, EUpda teStyle = UpdateStyle);
195 bool isEditablePosition(const PositionInComposedTree&, EditableType = ContentIsE ditable, EUpdateStyle = UpdateStyle); 195 bool isEditablePosition(const PositionInComposedTree&, EditableType = ContentIsE ditable, EUpdateStyle = UpdateStyle);
196 bool isRichlyEditablePosition(const Position&, EditableType = ContentIsEditable) ; 196 bool isRichlyEditablePosition(const Position&, EditableType = ContentIsEditable) ;
197 bool lineBreakExistsAtPosition(const Position&); 197 bool lineBreakExistsAtPosition(const Position&);
198 bool isAtUnsplittableElement(const Position&); 198 bool isAtUnsplittableElement(const Position&);
199 199
200 // miscellaneous functions on Position 200 // miscellaneous functions on Position
201 201
202 enum WhitespacePositionOption { NotConsiderNonCollapsibleWhitespace, ConsiderNon CollapsibleWhitespace }; 202 enum WhitespacePositionOption { NotConsiderNonCollapsibleWhitespace, ConsiderNon CollapsibleWhitespace };
203 Position leadingWhitespacePosition(const Position&, EAffinity, WhitespacePositio nOption = NotConsiderNonCollapsibleWhitespace); 203 Position leadingWhitespacePosition(const Position&, TextAffinity, WhitespacePosi tionOption = NotConsiderNonCollapsibleWhitespace);
204 Position trailingWhitespacePosition(const Position&, EAffinity, WhitespacePositi onOption = NotConsiderNonCollapsibleWhitespace); 204 Position trailingWhitespacePosition(const Position&, TextAffinity, WhitespacePos itionOption = NotConsiderNonCollapsibleWhitespace);
205 unsigned numEnclosingMailBlockquotes(const Position&); 205 unsigned numEnclosingMailBlockquotes(const Position&);
206 void updatePositionForNodeRemoval(Position&, Node&); 206 void updatePositionForNodeRemoval(Position&, Node&);
207 207
208 // ------------------------------------------------------------------------- 208 // -------------------------------------------------------------------------
209 // VisiblePosition 209 // VisiblePosition
210 // ------------------------------------------------------------------------- 210 // -------------------------------------------------------------------------
211 211
212 // Functions returning VisiblePosition 212 // Functions returning VisiblePosition
213 213
214 VisiblePosition firstEditableVisiblePositionAfterPositionInRoot(const Position&, ContainerNode*); 214 VisiblePosition firstEditableVisiblePositionAfterPositionInRoot(const Position&, ContainerNode*);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 // FIXME: this is required until 6853027 is fixed and text checking can do t his for us. 286 // FIXME: this is required until 6853027 is fixed and text checking can do t his for us.
287 return character == '\'' || character == rightSingleQuotationMarkCharacter | | character == hebrewPunctuationGershayimCharacter; 287 return character == '\'' || character == rightSingleQuotationMarkCharacter | | character == hebrewPunctuationGershayimCharacter;
288 } 288 }
289 289
290 String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagrap h, bool endIsEndOfParagraph); 290 String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagrap h, bool endIsEndOfParagraph);
291 const String& nonBreakingSpaceString(); 291 const String& nonBreakingSpaceString();
292 292
293 } 293 }
294 294
295 #endif 295 #endif
OLDNEW
« no previous file with comments | « Source/core/editing/DOMSelection.cpp ('k') | Source/core/editing/EditingUtilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698