Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 299 bool timedOut = false; | 299 bool timedOut = false; |
| 300 double startTime = currentTime(); | 300 double startTime = currentTime(); |
| 301 do { | 301 do { |
| 302 // Find next occurrence of the search string. | 302 // Find next occurrence of the search string. |
| 303 // FIXME: (http://crbug.com/6818) This WebKit operation may run for long er | 303 // FIXME: (http://crbug.com/6818) This WebKit operation may run for long er |
| 304 // than the timeout value, and is not interruptible as it is currently | 304 // than the timeout value, and is not interruptible as it is currently |
| 305 // written. We may need to rewrite it with interruptibility in mind, or | 305 // written. We may need to rewrite it with interruptibility in mind, or |
| 306 // find an alternative. | 306 // find an alternative. |
| 307 EphemeralRangeTemplate<Strategy> result = findPlainText(EphemeralRangeTe mplate<Strategy>(searchStart, searchEnd), searchText, options.matchCase ? 0 : Ca seInsensitive); | 307 EphemeralRangeTemplate<Strategy> result = findPlainText(EphemeralRangeTe mplate<Strategy>(searchStart, searchEnd), searchText, options.matchCase ? 0 : Ca seInsensitive); |
| 308 if (result.isCollapsed()) { | 308 if (result.isCollapsed()) { |
| 309 // result will be collapsed if whitespace spans over multiple TreeSc opes. | |
| 310 // FIXME: Show such matches to users. | |
|
yosin_UTC9
2016/01/05 08:30:40
Please use "TODO(email):" style.
https://google.gi
ramya.v
2016/01/06 08:28:44
Done.
| |
| 311 if (result.endPosition() != searchEnd) { | |
| 312 searchStart = result.endPosition(); | |
| 313 continue; | |
| 314 } | |
| 309 // Not found. | 315 // Not found. |
| 310 break; | 316 break; |
| 311 } | 317 } |
| 312 RefPtrWillBeRawPtr<Range> resultRange = Range::create(result.document(), toPositionInDOMTree(result.startPosition()), toPositionInDOMTree(result.endPosi tion())); | 318 RefPtrWillBeRawPtr<Range> resultRange = Range::create(result.document(), toPositionInDOMTree(result.startPosition()), toPositionInDOMTree(result.endPosi tion())); |
| 313 if (resultRange->collapsed()) { | 319 if (resultRange->collapsed()) { |
| 314 // resultRange will be collapsed if the matched text spans over mult iple TreeScopes. | 320 // resultRange will be collapsed if the matched text spans over mult iple TreeScopes. |
| 315 // FIXME: Show such matches to users. | 321 // FIXME: Show such matches to users. |
| 316 searchStart = result.endPosition(); | 322 searchStart = result.endPosition(); |
| 317 continue; | 323 continue; |
| 318 } | 324 } |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 816 visitor->trace(m_ownerFrame); | 822 visitor->trace(m_ownerFrame); |
| 817 visitor->trace(m_currentActiveMatchFrame); | 823 visitor->trace(m_currentActiveMatchFrame); |
| 818 visitor->trace(m_activeMatch); | 824 visitor->trace(m_activeMatch); |
| 819 visitor->trace(m_resumeScopingFromRange); | 825 visitor->trace(m_resumeScopingFromRange); |
| 820 visitor->trace(m_deferredScopingWork); | 826 visitor->trace(m_deferredScopingWork); |
| 821 visitor->trace(m_findMatchesCache); | 827 visitor->trace(m_findMatchesCache); |
| 822 #endif | 828 #endif |
| 823 } | 829 } |
| 824 | 830 |
| 825 } // namespace blink | 831 } // namespace blink |
| OLD | NEW |