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 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1478 bool activeSelection = !selection.isNone(); | 1478 bool activeSelection = !selection.isNone(); |
1479 if (activeSelection) { | 1479 if (activeSelection) { |
1480 m_activeMatch = selection.firstRange().get(); | 1480 m_activeMatch = selection.firstRange().get(); |
1481 frame()->selection().clear(); | 1481 frame()->selection().clear(); |
1482 } | 1482 } |
1483 | 1483 |
1484 ASSERT(frame() && frame()->view()); | 1484 ASSERT(frame() && frame()->view()); |
1485 const FindOptions findOptions = (options.forward ? 0 : Backwards) | 1485 const FindOptions findOptions = (options.forward ? 0 : Backwards) |
1486 | (options.matchCase ? 0 : CaseInsensitive) | 1486 | (options.matchCase ? 0 : CaseInsensitive) |
1487 | (wrapWithinFrame ? WrapAround : 0) | 1487 | (wrapWithinFrame ? WrapAround : 0) |
1488 | (!options.findNext ? StartInSelection : 0); | 1488 | (options.wordStart ? AtWordStarts : 0) |
| 1489 | (options.medialCapitalAsWordStart ? TreatMedialCapitalAsWordStart : 0) |
| 1490 | (options.findNext ? 0 : StartInSelection); |
1489 m_activeMatch = frame()->editor().findStringAndScrollToVisible(searchText, m
_activeMatch.get(), findOptions); | 1491 m_activeMatch = frame()->editor().findStringAndScrollToVisible(searchText, m
_activeMatch.get(), findOptions); |
1490 | 1492 |
1491 if (!m_activeMatch) { | 1493 if (!m_activeMatch) { |
1492 // If we're finding next the next active match might not be in the curre
nt frame. | 1494 // If we're finding next the next active match might not be in the curre
nt frame. |
1493 // In this case we don't want to clear the matches cache. | 1495 // In this case we don't want to clear the matches cache. |
1494 if (!options.findNext) | 1496 if (!options.findNext) |
1495 clearFindMatchesCache(); | 1497 clearFindMatchesCache(); |
1496 invalidateArea(InvalidateAll); | 1498 invalidateArea(InvalidateAll); |
1497 return false; | 1499 return false; |
1498 } | 1500 } |
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2514 | 2516 |
2515 // There is a possibility that the frame being detached was the only | 2517 // There is a possibility that the frame being detached was the only |
2516 // pending one. We need to make sure final replies can be sent. | 2518 // pending one. We need to make sure final replies can be sent. |
2517 flushCurrentScopingEffort(m_findRequestIdentifier); | 2519 flushCurrentScopingEffort(m_findRequestIdentifier); |
2518 | 2520 |
2519 cancelPendingScopingEffort(); | 2521 cancelPendingScopingEffort(); |
2520 } | 2522 } |
2521 } | 2523 } |
2522 | 2524 |
2523 } // namespace WebKit | 2525 } // namespace WebKit |
OLD | NEW |