| 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 if (!searchRange) | 296 if (!searchRange) |
| 297 return; | 297 return; |
| 298 | 298 |
| 299 CharacterIterator charIt(searchRange.get(), TextIteratorEmitsCharactersBetwe
enAllVisiblePositions); | 299 CharacterIterator charIt(searchRange.get(), TextIteratorEmitsCharactersBetwe
enAllVisiblePositions); |
| 300 bool changed = false; | 300 bool changed = false; |
| 301 | 301 |
| 302 for (; charIt.length(); charIt.advance(1)) { | 302 for (; charIt.length(); charIt.advance(1)) { |
| 303 UChar c = charIt.characterAt(0); | 303 UChar c = charIt.characterAt(0); |
| 304 if ((!isSpaceOrNewline(c) && c != noBreakSpace) || c == '\n') | 304 if ((!isSpaceOrNewline(c) && c != noBreakSpace) || c == '\n') |
| 305 break; | 305 break; |
| 306 m_end = charIt.range()->endPosition(); | 306 m_end = charIt.endPosition(); |
| 307 changed = true; | 307 changed = true; |
| 308 } | 308 } |
| 309 if (changed) | 309 if (changed) |
| 310 didChange(); | 310 didChange(); |
| 311 } | 311 } |
| 312 | 312 |
| 313 void VisibleSelection::setBaseAndExtentToDeepEquivalents() | 313 void VisibleSelection::setBaseAndExtentToDeepEquivalents() |
| 314 { | 314 { |
| 315 // Move the selection to rendered positions, if possible. | 315 // Move the selection to rendered positions, if possible. |
| 316 bool baseAndExtentEqual = m_base == m_extent; | 316 bool baseAndExtentEqual = m_base == m_extent; |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 sel.showTreeForThis(); | 856 sel.showTreeForThis(); |
| 857 } | 857 } |
| 858 | 858 |
| 859 void showTree(const blink::VisibleSelection* sel) | 859 void showTree(const blink::VisibleSelection* sel) |
| 860 { | 860 { |
| 861 if (sel) | 861 if (sel) |
| 862 sel->showTreeForThis(); | 862 sel->showTreeForThis(); |
| 863 } | 863 } |
| 864 | 864 |
| 865 #endif | 865 #endif |
| OLD | NEW |