| 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 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1475 if (!frame() || !frame()->page()) | 1475 if (!frame() || !frame()->page()) |
| 1476 return false; | 1476 return false; |
| 1477 | 1477 |
| 1478 WebFrameImpl* mainFrameImpl = viewImpl()->mainFrameImpl(); | 1478 WebFrameImpl* mainFrameImpl = viewImpl()->mainFrameImpl(); |
| 1479 | 1479 |
| 1480 if (!options.findNext) | 1480 if (!options.findNext) |
| 1481 frame()->page()->unmarkAllTextMatches(); | 1481 frame()->page()->unmarkAllTextMatches(); |
| 1482 else | 1482 else |
| 1483 setMarkerActive(m_activeMatch.get(), false); | 1483 setMarkerActive(m_activeMatch.get(), false); |
| 1484 | 1484 |
| 1485 if (m_activeMatch && m_activeMatch->ownerDocument() != frame()->document()) | 1485 if (m_activeMatch && &m_activeMatch->ownerDocument() != frame()->document()) |
| 1486 m_activeMatch = 0; | 1486 m_activeMatch = 0; |
| 1487 | 1487 |
| 1488 // If the user has selected something since the last Find operation we want | 1488 // If the user has selected something since the last Find operation we want |
| 1489 // to start from there. Otherwise, we start searching from where the last Fi
nd | 1489 // to start from there. Otherwise, we start searching from where the last Fi
nd |
| 1490 // operation left off (either a Find or a FindNext operation). | 1490 // operation left off (either a Find or a FindNext operation). |
| 1491 VisibleSelection selection(frame()->selection().selection()); | 1491 VisibleSelection selection(frame()->selection().selection()); |
| 1492 bool activeSelection = !selection.isNone(); | 1492 bool activeSelection = !selection.isNone(); |
| 1493 if (activeSelection) { | 1493 if (activeSelection) { |
| 1494 m_activeMatch = selection.firstRange().get(); | 1494 m_activeMatch = selection.firstRange().get(); |
| 1495 frame()->selection().clear(); | 1495 frame()->selection().clear(); |
| (...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2478 | 2478 |
| 2479 // There is a possibility that the frame being detached was the only | 2479 // There is a possibility that the frame being detached was the only |
| 2480 // pending one. We need to make sure final replies can be sent. | 2480 // pending one. We need to make sure final replies can be sent. |
| 2481 flushCurrentScopingEffort(m_findRequestIdentifier); | 2481 flushCurrentScopingEffort(m_findRequestIdentifier); |
| 2482 | 2482 |
| 2483 cancelPendingScopingEffort(); | 2483 cancelPendingScopingEffort(); |
| 2484 } | 2484 } |
| 2485 } | 2485 } |
| 2486 | 2486 |
| 2487 } // namespace WebKit | 2487 } // namespace WebKit |
| OLD | NEW |