| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 127 |
| 128 if (m_activeMatch && &m_activeMatch->ownerDocument() != ownerFrame().frame()
->document()) | 128 if (m_activeMatch && &m_activeMatch->ownerDocument() != ownerFrame().frame()
->document()) |
| 129 m_activeMatch = nullptr; | 129 m_activeMatch = nullptr; |
| 130 | 130 |
| 131 // If the user has selected something since the last Find operation we want | 131 // If the user has selected something since the last Find operation we want |
| 132 // to start from there. Otherwise, we start searching from where the last Fi
nd | 132 // to start from there. Otherwise, we start searching from where the last Fi
nd |
| 133 // operation left off (either a Find or a FindNext operation). | 133 // operation left off (either a Find or a FindNext operation). |
| 134 VisibleSelection selection(ownerFrame().frame()->selection().selection()); | 134 VisibleSelection selection(ownerFrame().frame()->selection().selection()); |
| 135 bool activeSelection = !selection.isNone(); | 135 bool activeSelection = !selection.isNone(); |
| 136 if (activeSelection) { | 136 if (activeSelection) { |
| 137 m_activeMatch = selection.firstRange().get(); | 137 m_activeMatch = firstRangeOf(selection).get(); |
| 138 ownerFrame().frame()->selection().clear(); | 138 ownerFrame().frame()->selection().clear(); |
| 139 } | 139 } |
| 140 | 140 |
| 141 ASSERT(ownerFrame().frame() && ownerFrame().frame()->view()); | 141 ASSERT(ownerFrame().frame() && ownerFrame().frame()->view()); |
| 142 const FindOptions findOptions = (options.forward ? 0 : Backwards) | 142 const FindOptions findOptions = (options.forward ? 0 : Backwards) |
| 143 | (options.matchCase ? 0 : CaseInsensitive) | 143 | (options.matchCase ? 0 : CaseInsensitive) |
| 144 | (wrapWithinFrame ? WrapAround : 0) | 144 | (wrapWithinFrame ? WrapAround : 0) |
| 145 | (options.wordStart ? AtWordStarts : 0) | 145 | (options.wordStart ? AtWordStarts : 0) |
| 146 | (options.medialCapitalAsWordStart ? TreatMedialCapitalAsWordStart : 0) | 146 | (options.medialCapitalAsWordStart ? TreatMedialCapitalAsWordStart : 0) |
| 147 | (options.findNext ? 0 : StartInSelection); | 147 | (options.findNext ? 0 : StartInSelection); |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 visitor->trace(m_ownerFrame); | 802 visitor->trace(m_ownerFrame); |
| 803 visitor->trace(m_currentActiveMatchFrame); | 803 visitor->trace(m_currentActiveMatchFrame); |
| 804 visitor->trace(m_activeMatch); | 804 visitor->trace(m_activeMatch); |
| 805 visitor->trace(m_resumeScopingFromRange); | 805 visitor->trace(m_resumeScopingFromRange); |
| 806 visitor->trace(m_deferredScopingWork); | 806 visitor->trace(m_deferredScopingWork); |
| 807 visitor->trace(m_findMatchesCache); | 807 visitor->trace(m_findMatchesCache); |
| 808 #endif | 808 #endif |
| 809 } | 809 } |
| 810 | 810 |
| 811 } // namespace blink | 811 } // namespace blink |
| OLD | NEW |