Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: third_party/WebKit/Source/web/TextFinder.cpp

Issue 2316203002: Fix find box bug after navigation. (Closed)
Patch Set: Added test. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/test/data/find_in_simple_page.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 if (m_activeMatchIndex + 1 > m_lastMatchCount) 194 if (m_activeMatchIndex + 1 > m_lastMatchCount)
195 m_activeMatchIndex = 0; 195 m_activeMatchIndex = 0;
196 else if (m_activeMatchIndex < 0) 196 else if (m_activeMatchIndex < 0)
197 m_activeMatchIndex = m_lastMatchCount - 1; 197 m_activeMatchIndex = m_lastMatchCount - 1;
198 } 198 }
199 WebRect selectionRect = ownerFrame().frameView()->contentsToRootFrame(m_ activeMatch->boundingBox()); 199 WebRect selectionRect = ownerFrame().frameView()->contentsToRootFrame(m_ activeMatch->boundingBox());
200 reportFindInPageSelection(selectionRect, m_activeMatchIndex + 1, identif ier); 200 reportFindInPageSelection(selectionRect, m_activeMatchIndex + 1, identif ier);
201 } 201 }
202 202
203 m_lastFindRequestCompletedWithNoMatches = false;
203 return true; 204 return true;
204 } 205 }
205 206
206 void TextFinder::clearActiveFindMatch() 207 void TextFinder::clearActiveFindMatch()
207 { 208 {
208 m_currentActiveMatchFrame = false; 209 m_currentActiveMatchFrame = false;
209 setMarkerActive(m_activeMatch.get(), false); 210 setMarkerActive(m_activeMatch.get(), false);
210 } 211 }
211 212
212 void TextFinder::stopFindingAndClearSelection() 213 void TextFinder::stopFindingAndClearSelection()
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 DEFINE_TRACE(TextFinder) 740 DEFINE_TRACE(TextFinder)
740 { 741 {
741 visitor->trace(m_ownerFrame); 742 visitor->trace(m_ownerFrame);
742 visitor->trace(m_activeMatch); 743 visitor->trace(m_activeMatch);
743 visitor->trace(m_resumeScopingFromRange); 744 visitor->trace(m_resumeScopingFromRange);
744 visitor->trace(m_deferredScopingWork); 745 visitor->trace(m_deferredScopingWork);
745 visitor->trace(m_findMatchesCache); 746 visitor->trace(m_findMatchesCache);
746 } 747 }
747 748
748 } // namespace blink 749 } // namespace blink
OLDNEW
« no previous file with comments | « content/test/data/find_in_simple_page.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698