| 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 // To stop looking for the active tickmark, we set this flag. | 390 // To stop looking for the active tickmark, we set this flag. |
| 391 m_locatingActiveRect = false; | 391 m_locatingActiveRect = false; |
| 392 | 392 |
| 393 // Notify browser of new location for the selected rectangle. | 393 // Notify browser of new location for the selected rectangle. |
| 394 reportFindInPageSelection( | 394 reportFindInPageSelection( |
| 395 ownerFrame().frameView()->contentsToRootFrame(resultBounds), | 395 ownerFrame().frameView()->contentsToRootFrame(resultBounds), |
| 396 m_activeMatchIndex + 1, identifier); | 396 m_activeMatchIndex + 1, identifier); |
| 397 } | 397 } |
| 398 | 398 |
| 399 ownerFrame().frame()->document()->markers().addTextMatchMarker( | 399 ownerFrame().frame()->document()->markers().addTextMatchMarker( |
| 400 EphemeralRange(resultRange), foundActiveMatch); | 400 EphemeralRange(resultRange), |
| 401 foundActiveMatch ? DocumentMarker::MatchStatus::kActive |
| 402 : DocumentMarker::MatchStatus::kInactive); |
| 401 | 403 |
| 402 m_findMatchesCache.push_back( | 404 m_findMatchesCache.push_back( |
| 403 FindMatch(resultRange, m_lastMatchCount + matchCount)); | 405 FindMatch(resultRange, m_lastMatchCount + matchCount)); |
| 404 | 406 |
| 405 // Set the new start for the search range to be the end of the previous | 407 // Set the new start for the search range to be the end of the previous |
| 406 // result range. There is no need to use a VisiblePosition here, | 408 // result range. There is no need to use a VisiblePosition here, |
| 407 // since findPlainText will use a TextIterator to go over the visible | 409 // since findPlainText will use a TextIterator to go over the visible |
| 408 // text nodes. | 410 // text nodes. |
| 409 searchStart = result.endPosition(); | 411 searchStart = result.endPosition(); |
| 410 | 412 |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 | 781 |
| 780 DEFINE_TRACE(TextFinder) { | 782 DEFINE_TRACE(TextFinder) { |
| 781 visitor->trace(m_ownerFrame); | 783 visitor->trace(m_ownerFrame); |
| 782 visitor->trace(m_activeMatch); | 784 visitor->trace(m_activeMatch); |
| 783 visitor->trace(m_resumeScopingFromRange); | 785 visitor->trace(m_resumeScopingFromRange); |
| 784 visitor->trace(m_deferredScopingWork); | 786 visitor->trace(m_deferredScopingWork); |
| 785 visitor->trace(m_findMatchesCache); | 787 visitor->trace(m_findMatchesCache); |
| 786 } | 788 } |
| 787 | 789 |
| 788 } // namespace blink | 790 } // namespace blink |
| OLD | NEW |