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 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1982 | 1982 |
| 1983 // There are three cases in which scoping is needed: | 1983 // There are three cases in which scoping is needed: |
| 1984 // | 1984 // |
| 1985 // 1) This is an initial find request (|options.findNext| is false). This | 1985 // 1) This is an initial find request (|options.findNext| is false). This |
| 1986 // will be the first scoping effort for this find session. | 1986 // will be the first scoping effort for this find session. |
| 1987 // | 1987 // |
| 1988 // 2) Something has been selected since the last search. This means that we | 1988 // 2) Something has been selected since the last search. This means that we |
| 1989 // cannot just increment the current match ordinal; we need to re-generate | 1989 // cannot just increment the current match ordinal; we need to re-generate |
| 1990 // it. | 1990 // it. |
| 1991 // | 1991 // |
| 1992 // 3) TextFinder::Find() could not locate the next active find match, so it | 1992 // 3) This frame is currently scoping, so we continue the scoping effort. |
| 1993 // needs to be re-scoped. | |
| 1994 // | 1993 // |
| 1995 // If none of these cases are true, then we just report the current match | 1994 // If none of these cases are true, then we just report the current match |
| 1996 // count without scoping. | 1995 // count without scoping. |
| 1997 if (options.findNext && currentSelection.isNull() && activeNow) { | 1996 if (options.findNext && currentSelection.isNull() && !textFinder()->scopingI nProgress()) { |
|
esprehn
2016/08/11 09:40:01
Actually this means the activeNow bool in this fun
| |
| 1998 // Force report of the actual count. | 1997 // Force report of the actual count. |
| 1999 increaseMatchCount(0, identifier); | 1998 increaseMatchCount(0, identifier); |
| 2000 return; | 1999 return; |
| 2001 } | 2000 } |
| 2002 | 2001 |
| 2003 // Scoping effort begins. | 2002 // Scoping effort begins. |
| 2004 ensureTextFinder().resetMatchCount(); | 2003 ensureTextFinder().resetMatchCount(); |
| 2005 textFinder()->cancelPendingScopingEffort(); | 2004 textFinder()->cancelPendingScopingEffort(); |
| 2006 | 2005 |
| 2007 // Start a new scoping request. If the scoping function determines that it | 2006 // Start a new scoping request. If the scoping function determines that it |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2182 { | 2181 { |
| 2183 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); | 2182 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); |
| 2184 } | 2183 } |
| 2185 | 2184 |
| 2186 void WebLocalFrameImpl::clearActiveFindMatch() | 2185 void WebLocalFrameImpl::clearActiveFindMatch() |
| 2187 { | 2186 { |
| 2188 ensureTextFinder().clearActiveFindMatch(); | 2187 ensureTextFinder().clearActiveFindMatch(); |
| 2189 } | 2188 } |
| 2190 | 2189 |
| 2191 } // namespace blink | 2190 } // namespace blink |
| OLD | NEW |