Bug 88791 - Web Inspector: use jsdifflib for revision diff calculation.
Summary: Web Inspector: use jsdifflib for revision diff calculation.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-11 11:00 PDT by Pavel Feldman
Modified: 2012-06-12 09:44 PDT (History)
10 users (show)

See Also:


Attachments
Patch (27.61 KB, patch)
2012-06-11 11:11 PDT, Pavel Feldman
vsevik: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2012-06-11 11:00:28 PDT
Present diff calculation is incomplete, it does not properly handle the following case:
    [a, b, c, d, e, f, g, h] => [c, d, e, f, g, h, a, b]

It detects [a, b] as the lcs.

I imported jsdifflib from https://github.com/cemerick/jsdifflib. It has BSD license that is compatible with WebKit.
Comment 1 Pavel Feldman 2012-06-11 11:11:54 PDT
Created attachment 146877 [details]
Patch
Comment 2 Pavel Feldman 2012-06-12 09:44:58 PDT
Committed r120085: <http://trac.webkit.org/changeset/120085>