Bug 23109 - REGRESSION: Backwards search in a long document matches incorrectly
Summary: REGRESSION: Backwards search in a long document matches incorrectly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P1 Normal
Assignee: Darin Adler
URL: http://build.webkit.org/builders/trun...
Keywords: Regression
Depends on:
Blocks:
 
Reported: 2009-01-04 14:51 PST by mitz
Modified: 2009-01-21 14:43 PST (History)
3 users (show)

See Also:


Attachments
patch (12.51 KB, patch)
2009-01-04 23:09 PST, Darin Adler
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2009-01-04 14:51:33 PST
To reproduce:
1) Go to the URL
2) Choose Edit > Find > Find
3) In the search field, type "display"
4) Click the previous match button near the search field

Note that the highlighted text is not the word "display".
Comment 1 Darin Adler 2009-01-04 20:54:43 PST
Should be simple to fix. I'll look at it tomorrow.
Comment 2 Darin Adler 2009-01-04 21:44:31 PST
Given the structure of the code, it's quite surprising that searching forward works properly and searching backward fails.
Comment 3 Darin Adler 2009-01-04 23:09:01 PST
Created attachment 26425 [details]
patch
Comment 4 Darin Adler 2009-01-05 11:50:54 PST
http://trac.webkit.org/changeset/39609
Comment 5 Simon Hausmann 2009-01-21 14:39:21 PST
I'd like to note that on a build _without_ the ICU based SearchBuffer the backwards search results in an endless loop, including in the changeset's testcase fast/text/find-backwards.html. It looks like the goto inserted in the last hunk triggers this, but I don't know the code well enough to be sure it's really the goto's fault or just a symptom.
Comment 6 mitz 2009-01-21 14:40:35 PST
(In reply to comment #5)
> I'd like to note that on a build _without_ the ICU based SearchBuffer the
> backwards search results in an endless loop, including in the changeset's
> testcase fast/text/find-backwards.html. It looks like the goto inserted in the
> last hunk triggers this, but I don't know the code well enough to be sure it's
> really the goto's fault or just a symptom.

Please file a new bug.
Comment 7 Darin Adler 2009-01-21 14:43:19 PST
And please cc me. I'll be happy to take a crack at fixing it.