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

Issue 13130: Fix issue 5079: Incorrect "Active match ordinal" count during Find-in-page... (Closed)

Created:
12 years ago by Finnur
Modified:
9 years, 6 months ago
Reviewers:
idana
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Fix issue 5079: Incorrect "Active match ordinal" count during Find-in-page I introduced a regression in my reimplemenation of Find-in-page. The active match ordinal in Find-in-page (also known as "the 7" in "7 of 9") would be just a little off on pages with frames. Problem A: When you search for something in gmail, for example, the ordinal could start off slightly negative or be 0. I wasn't checking the last_match_count_ of a frame for negative numbers before adding it to the total (it starts off as -1 and remains that way if the frame is not deemed to be worthy of being scoped, i.e. if it is hidden). Problem B: On pages with multiple matches spread across multiple frames the ordinal would not be subtracted correctly after pressing F3 and Shift-F3 to go back to the frame you were on. We shouldn't be increasing/decreasing the active_match_index for a given frame when FindNext/FindPrevious causes us to jump between frames. We should instead reset it. I added two tests to catch this in the future. They test ordinal values as you use Find in page (including combinations of frames/no-frames & FindNext/FindPrevious). Oh, and I also removed some traces that were supposed to expose why a test was flaky, but it turns out to have been something unrelated to the test. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=6369

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -76 lines) Patch
M chrome/browser/automation/automation_provider.cc View 4 chunks +13 lines, -4 lines 0 comments Download
M chrome/browser/views/find_bar_win_uitest.cc View 5 chunks +108 lines, -47 lines 0 comments Download
M chrome/test/automation/automation_messages_internal.h View 3 chunks +10 lines, -5 lines 1 comment Download
M chrome/test/automation/tab_proxy.h View 1 chunk +4 lines, -2 lines 1 comment Download
M chrome/test/automation/tab_proxy.cc View 2 chunks +9 lines, -4 lines 0 comments Download
M webkit/glue/webframe_impl.h View 3 chunks +3 lines, -3 lines 0 comments Download
M webkit/glue/webframe_impl.cc View 7 chunks +27 lines, -11 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Finnur
12 years ago (2008-12-04 18:16:54 UTC) #1
idana
12 years ago (2008-12-04 19:02:05 UTC) #2
LGTM (with a couple of nits)

Can you please make sure indernain verifies that the bug is fixed?

http://codereview.chromium.org/13130/diff/1/4
File chrome/test/automation/automation_messages_internal.h (right):

http://codereview.chromium.org/13130/diff/1/4#newcode314
Line 314: // NOTE: These two message have been deprecated, please use the new
messages
"These two message" -> "These two messages"

http://codereview.chromium.org/13130/diff/1/6
File chrome/test/automation/tab_proxy.h (right):

http://codereview.chromium.org/13130/diff/1/6#newcode183
Line 183: // "7 of 9". A return value of -1 indicates failure.
"7 of 9". -> "7 of 9").

Powered by Google App Engine
This is Rietveld 408576698