OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 if (!searchRange) | 306 if (!searchRange) |
307 return; | 307 return; |
308 | 308 |
309 CharacterIterator charIt(searchRange.get(), TextIteratorEmitsCharactersBetwe
enAllVisiblePositions); | 309 CharacterIterator charIt(searchRange.get(), TextIteratorEmitsCharactersBetwe
enAllVisiblePositions); |
310 bool changed = false; | 310 bool changed = false; |
311 | 311 |
312 for (; charIt.length(); charIt.advance(1)) { | 312 for (; charIt.length(); charIt.advance(1)) { |
313 UChar c = charIt.characterAt(0); | 313 UChar c = charIt.characterAt(0); |
314 if ((!isSpaceOrNewline(c) && c != noBreakSpace) || c == '\n') | 314 if ((!isSpaceOrNewline(c) && c != noBreakSpace) || c == '\n') |
315 break; | 315 break; |
316 m_end = charIt.range()->endPosition(); | 316 m_end = charIt.endPosition(); |
317 changed = true; | 317 changed = true; |
318 } | 318 } |
319 if (changed) | 319 if (changed) |
320 didChange(); | 320 didChange(); |
321 } | 321 } |
322 | 322 |
323 void VisibleSelection::setBaseAndExtentToDeepEquivalents() | 323 void VisibleSelection::setBaseAndExtentToDeepEquivalents() |
324 { | 324 { |
325 // Move the selection to rendered positions, if possible. | 325 // Move the selection to rendered positions, if possible. |
326 bool baseAndExtentEqual = m_base == m_extent; | 326 bool baseAndExtentEqual = m_base == m_extent; |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
866 sel.showTreeForThis(); | 866 sel.showTreeForThis(); |
867 } | 867 } |
868 | 868 |
869 void showTree(const blink::VisibleSelection* sel) | 869 void showTree(const blink::VisibleSelection* sel) |
870 { | 870 { |
871 if (sel) | 871 if (sel) |
872 sel->showTreeForThis(); | 872 sel->showTreeForThis(); |
873 } | 873 } |
874 | 874 |
875 #endif | 875 #endif |
OLD | NEW |