| 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 // If the Find function found a match it will have stored where the | 372 // If the Find function found a match it will have stored where the |
| 373 // match was found in m_activeSelectionRect on the current frame. If we | 373 // match was found in m_activeSelectionRect on the current frame. If we |
| 374 // find this rect during scoping it means we have found the active | 374 // find this rect during scoping it means we have found the active |
| 375 // tickmark. | 375 // tickmark. |
| 376 bool foundActiveMatch = false; | 376 bool foundActiveMatch = false; |
| 377 if (m_locatingActiveRect && (activeSelectionRect == resultBounds)) { | 377 if (m_locatingActiveRect && (activeSelectionRect == resultBounds)) { |
| 378 // We have found the active tickmark frame. | 378 // We have found the active tickmark frame. |
| 379 m_currentActiveMatchFrame = true; | 379 m_currentActiveMatchFrame = true; |
| 380 foundActiveMatch = true; | 380 foundActiveMatch = true; |
| 381 // We also know which tickmark is active now. | 381 // We also know which tickmark is active now. |
| 382 m_activeMatchIndex = matchCount - 1; | 382 m_activeMatchIndex = m_totalMatchCount + matchCount - 1; |
| 383 // To stop looking for the active tickmark, we set this flag. | 383 // To stop looking for the active tickmark, we set this flag. |
| 384 m_locatingActiveRect = false; | 384 m_locatingActiveRect = false; |
| 385 | 385 |
| 386 // Notify browser of new location for the selected rectangle. | 386 // Notify browser of new location for the selected rectangle. |
| 387 reportFindInPageSelection( | 387 reportFindInPageSelection( |
| 388 ownerFrame().frameView()->contentsToRootFrame(resultBounds), | 388 ownerFrame().frameView()->contentsToRootFrame(resultBounds), |
| 389 m_activeMatchIndex + 1, identifier); | 389 m_activeMatchIndex + 1, identifier); |
| 390 } | 390 } |
| 391 | 391 |
| 392 ownerFrame().frame()->document()->markers().addTextMatchMarker( | 392 ownerFrame().frame()->document()->markers().addTextMatchMarker( |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 | 769 |
| 770 DEFINE_TRACE(TextFinder) { | 770 DEFINE_TRACE(TextFinder) { |
| 771 visitor->trace(m_ownerFrame); | 771 visitor->trace(m_ownerFrame); |
| 772 visitor->trace(m_activeMatch); | 772 visitor->trace(m_activeMatch); |
| 773 visitor->trace(m_resumeScopingFromRange); | 773 visitor->trace(m_resumeScopingFromRange); |
| 774 visitor->trace(m_deferredScopingWork); | 774 visitor->trace(m_deferredScopingWork); |
| 775 visitor->trace(m_findMatchesCache); | 775 visitor->trace(m_findMatchesCache); |
| 776 } | 776 } |
| 777 | 777 |
| 778 } // namespace blink | 778 } // namespace blink |
| OLD | NEW |