Chromium Code Reviews| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 223 // ended our last search so we can continue from where we left of. | 223 // ended our last search so we can continue from where we left of. |
| 224 // | 224 // |
| 225 // This range is collapsed to the end position of the last successful | 225 // This range is collapsed to the end position of the last successful |
| 226 // search; the new search should start from this position. | 226 // search; the new search should start from this position. |
| 227 Member<Range> m_resumeScopingFromRange; | 227 Member<Range> m_resumeScopingFromRange; |
| 228 | 228 |
| 229 // Keeps track of the last string this frame searched for. This is used for | 229 // Keeps track of the last string this frame searched for. This is used for |
| 230 // short-circuiting searches in the following scenarios: When a frame has | 230 // short-circuiting searches in the following scenarios: When a frame has |
| 231 // been searched and returned 0 results, we don't need to search that frame | 231 // been searched and returned 0 results, we don't need to search that frame |
| 232 // again if the user is just adding to the search (making it more specific). | 232 // again if the user is just adding to the search (making it more specific). |
| 233 WTF::String m_lastSearchString; | 233 WTF::String m_lastSearchString; |
|
dcheng
2016/10/17 18:17:41
Can we get rid of this (and maybe m_lastMatchCount
| |
| 234 | 234 |
| 235 // Keeps track of how many matches this frame has found so far, so that we | 235 // Keeps track of how many matches this frame has found so far, so that we |
| 236 // don't lose count between scoping efforts, and is also used (in conjunction | 236 // don't lose count between scoping efforts, and is also used (in conjunction |
| 237 // with m_lastSearchString) to figure out if we need to search the frame | 237 // with m_lastSearchString) to figure out if we need to search the frame |
| 238 // again. | 238 // again. |
| 239 int m_lastMatchCount; | 239 int m_lastMatchCount; |
| 240 | 240 |
| 241 // This variable keeps a cumulative total of matches found so far in this | 241 // This variable keeps a cumulative total of matches found so far in this |
| 242 // frame, and is only incremented by calling IncreaseMatchCount. | 242 // frame, and is only incremented by calling IncreaseMatchCount. |
| 243 int m_totalMatchCount; | 243 int m_totalMatchCount; |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 269 IntSize m_contentsSizeForCurrentFindMatchRects; | 269 IntSize m_contentsSizeForCurrentFindMatchRects; |
| 270 | 270 |
| 271 // This flag is used by the scoping effort to determine if we need to figure | 271 // This flag is used by the scoping effort to determine if we need to figure |
| 272 // out which rectangle is the active match. Once we find the active | 272 // out which rectangle is the active match. Once we find the active |
| 273 // rectangle we clear this flag. | 273 // rectangle we clear this flag. |
| 274 bool m_locatingActiveRect; | 274 bool m_locatingActiveRect; |
| 275 | 275 |
| 276 // Keeps track of whether there is an scoping effort ongoing in the frame. | 276 // Keeps track of whether there is an scoping effort ongoing in the frame. |
| 277 bool m_scopingInProgress; | 277 bool m_scopingInProgress; |
| 278 | 278 |
| 279 // Keeps track of whether the last find request completed its scoping effort | |
| 280 // without finding any matches in this frame. | |
| 281 bool m_lastFindRequestCompletedWithNoMatches; | |
| 282 | |
| 283 // Determines if the rects in the find-in-page matches cache of this frame | 279 // Determines if the rects in the find-in-page matches cache of this frame |
| 284 // are invalid and should be recomputed. | 280 // are invalid and should be recomputed. |
| 285 bool m_findMatchRectsAreValid; | 281 bool m_findMatchRectsAreValid; |
| 286 }; | 282 }; |
| 287 | 283 |
| 288 } // namespace blink | 284 } // namespace blink |
| 289 | 285 |
| 290 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::TextFinder::FindMatch); | 286 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::TextFinder::FindMatch); |
| 291 | 287 |
| 292 #endif // TextFinder_h | 288 #endif // TextFinder_h |
| OLD | NEW |