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

Side by Side Diff: third_party/WebKit/WebCore/editing/htmlediting.cpp

Issue 21165: Revert the merge. Mac build is mysteriously broken. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 return p; 215 return p;
216 } 216 }
217 return Position(); 217 return Position();
218 } 218 }
219 219
220 Position nextVisuallyDistinctCandidate(const Position& position) 220 Position nextVisuallyDistinctCandidate(const Position& position)
221 { 221 {
222 Position p = position; 222 Position p = position;
223 Position downstreamStart = p.downstream(); 223 Position downstreamStart = p.downstream();
224 while (!p.atEnd()) { 224 while (!p.atEnd()) {
225 p = p.next(Character); 225 p = p.next(UsingComposedCharacters);
226 if (p.isCandidate() && p.downstream() != downstreamStart) 226 if (p.isCandidate() && p.downstream() != downstreamStart)
227 return p; 227 return p;
228 } 228 }
229 return Position(); 229 return Position();
230 } 230 }
231 231
232 Position previousCandidate(const Position& position) 232 Position previousCandidate(const Position& position)
233 { 233 {
234 PositionIterator p = position; 234 PositionIterator p = position;
235 while (!p.atStart()) { 235 while (!p.atStart()) {
236 p.decrement(); 236 p.decrement();
237 if (p.isCandidate()) 237 if (p.isCandidate())
238 return p; 238 return p;
239 } 239 }
240 return Position(); 240 return Position();
241 } 241 }
242 242
243 Position previousVisuallyDistinctCandidate(const Position& position) 243 Position previousVisuallyDistinctCandidate(const Position& position)
244 { 244 {
245 Position p = position; 245 Position p = position;
246 Position downstreamStart = p.downstream(); 246 Position downstreamStart = p.downstream();
247 while (!p.atStart()) { 247 while (!p.atStart()) {
248 p = p.previous(Character); 248 p = p.previous(UsingComposedCharacters);
249 if (p.isCandidate() && p.downstream() != downstreamStart) 249 if (p.isCandidate() && p.downstream() != downstreamStart)
250 return p; 250 return p;
251 } 251 }
252 return Position(); 252 return Position();
253 } 253 }
254 254
255 VisiblePosition firstEditablePositionAfterPositionInRoot(const Position& positio n, Node* highestRoot) 255 VisiblePosition firstEditablePositionAfterPositionInRoot(const Position& positio n, Node* highestRoot)
256 { 256 {
257 // position falls before highestRoot. 257 // position falls before highestRoot.
258 if (comparePositions(position, Position(highestRoot, 0)) == -1 && highestRoo t->isContentEditable()) 258 if (comparePositions(position, Position(highestRoot, 0)) == -1 && highestRoo t->isContentEditable())
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 ASSERT(node->parentNode()); 996 ASSERT(node->parentNode());
997 updatedSelection.setExtent(Position(node->parentNode(), node->nodeIndex( ))); 997 updatedSelection.setExtent(Position(node->parentNode(), node->nodeIndex( )));
998 } 998 }
999 999
1000 return updatedSelection; 1000 return updatedSelection;
1001 } 1001 }
1002 1002
1003 } // namespace WebCore 1003 } // namespace WebCore
1004 1004
1005 1005
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/editing/TypingCommand.cpp ('k') | third_party/WebKit/WebCore/editing/mac/SelectionControllerMac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698