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

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

Issue 2732863004: Add VisibleUnits::startOfWordPosition (Closed)
Patch Set: Created 3 years, 9 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/VisibleUnits.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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 nextPositionOf(const VisiblePositionInFlatTree&, 149 nextPositionOf(const VisiblePositionInFlatTree&,
150 EditingBoundaryCrossingRule = CanCrossEditingBoundary); 150 EditingBoundaryCrossingRule = CanCrossEditingBoundary);
151 CORE_EXPORT VisiblePosition 151 CORE_EXPORT VisiblePosition
152 previousPositionOf(const VisiblePosition&, 152 previousPositionOf(const VisiblePosition&,
153 EditingBoundaryCrossingRule = CanCrossEditingBoundary); 153 EditingBoundaryCrossingRule = CanCrossEditingBoundary);
154 CORE_EXPORT VisiblePositionInFlatTree 154 CORE_EXPORT VisiblePositionInFlatTree
155 previousPositionOf(const VisiblePositionInFlatTree&, 155 previousPositionOf(const VisiblePositionInFlatTree&,
156 EditingBoundaryCrossingRule = CanCrossEditingBoundary); 156 EditingBoundaryCrossingRule = CanCrossEditingBoundary);
157 157
158 // words 158 // words
159 // TODO(yoichio): Replace |startOfWord| to |startOfWordPosition| because
160 // returned Position should be canonicalized with |previousBoundary()| by
161 // TextItetator.
162 CORE_EXPORT Position startOfWordPosition(const VisiblePosition&,
163 EWordSide = RightWordIfOnBoundary);
159 CORE_EXPORT VisiblePosition startOfWord(const VisiblePosition&, 164 CORE_EXPORT VisiblePosition startOfWord(const VisiblePosition&,
160 EWordSide = RightWordIfOnBoundary); 165 EWordSide = RightWordIfOnBoundary);
166 CORE_EXPORT PositionInFlatTree
167 startOfWordPosition(const VisiblePositionInFlatTree&,
168 EWordSide = RightWordIfOnBoundary);
161 CORE_EXPORT VisiblePositionInFlatTree 169 CORE_EXPORT VisiblePositionInFlatTree
162 startOfWord(const VisiblePositionInFlatTree&, 170 startOfWord(const VisiblePositionInFlatTree&,
163 EWordSide = RightWordIfOnBoundary); 171 EWordSide = RightWordIfOnBoundary);
164 // TODO(yoichio): Replace |endOfWord| to |endOfWordPosition| because returned 172 // TODO(yoichio): Replace |endOfWord| to |endOfWordPosition| because returned
165 // Position should be canonicalized with |nextBoundary()| by TextItetator. 173 // Position should be canonicalized with |nextBoundary()| by TextItetator.
166 CORE_EXPORT Position endOfWordPosition(const VisiblePosition&, 174 CORE_EXPORT Position endOfWordPosition(const VisiblePosition&,
167 EWordSide = RightWordIfOnBoundary); 175 EWordSide = RightWordIfOnBoundary);
168 CORE_EXPORT VisiblePosition endOfWord(const VisiblePosition&, 176 CORE_EXPORT VisiblePosition endOfWord(const VisiblePosition&,
169 EWordSide = RightWordIfOnBoundary); 177 EWordSide = RightWordIfOnBoundary);
170 CORE_EXPORT PositionInFlatTree 178 CORE_EXPORT PositionInFlatTree
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 // Returns a hit-tested VisiblePosition for the given point in contents-space 335 // Returns a hit-tested VisiblePosition for the given point in contents-space
328 // coordinates. 336 // coordinates.
329 CORE_EXPORT VisiblePosition visiblePositionForContentsPoint(const IntPoint&, 337 CORE_EXPORT VisiblePosition visiblePositionForContentsPoint(const IntPoint&,
330 LocalFrame*); 338 LocalFrame*);
331 339
332 CORE_EXPORT bool rendersInDifferentPosition(const Position&, const Position&); 340 CORE_EXPORT bool rendersInDifferentPosition(const Position&, const Position&);
333 341
334 } // namespace blink 342 } // namespace blink
335 343
336 #endif // VisibleUnits_h 344 #endif // VisibleUnits_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698