It looks like there is an unnecessary duplicated computation of a text range in the TextPrompt's autocompletion feature. Lines 152 and 162 are identical. The result from 152 is passed into the function and available at the point 162 does the same calculation: http://trac.webkit.org/browser/trunk/WebCore/inspector/front-end/TextPrompt.js?rev=45315#L150
Created attachment 31984 [details] Removed Duplicate Computation This removed the computation from inside the called function. Alternatively the computation could be removed from the calling function (line 152) and the parameter removed.
Created attachment 31985 [details] Removed Duplicate Computation Better ChangeLog (link to the bug).
Comment on attachment 31985 [details] Removed Duplicate Computation Looks good to me. I am surprised at the duplication but it certainly looks like the passed in originalWordPrefixRange is computed in an identical way, and can't have changed by the time _completionsReady is reached.
The patch is from within WebCore, so bugzilla-tool fails to apply it. https://bugs.webkit.org/show_bug.cgi?id=26999
I did the same as my last patch, which seemed to apply fine: https://bugs.webkit.org/show_bug.cgi?id=26489 Is this due to the Bugzilla upgrade? Should I go to the root and run "svn-create-patch" instead?
It will apply fine. :) I just can't do it from bugzilla-tool, because bugzilla-tool assumes patches are made from the root. Someone can manually land this no problem.
Created attachment 32316 [details] Removed Duplicate Computation (patch from root) Removed Duplicate Computation - svn-create-patch made from the root directory.
Landed in http://trac.webkit.org/changeset/45784.
Since the patch landed I removed the (patch from root) from the review queue. Cheers.