[Webkit-unassigned] [Bug 55685] Web Inspector: [Text editor] Do bisect to find visible chunks

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 4 05:31:45 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=55685





--- Comment #3 from Andrey Adaikin <aandrey at google.com>  2011-03-04 05:31:45 PST ---
(From update of attachment 84576)
View in context: https://bugs.webkit.org/attachment.cgi?id=84576&action=review

>> Source/WebCore/inspector/front-end/TextViewer.js:408
>> +    _findVisibleChunks: function(visibleFrom, visibleTo)
> 
> You should use insertionIndexForObjectInListSortedByFunction from utilities.js (and you can rename it to binarySearch).

done

>> Source/WebCore/inspector/front-end/TextViewer.js:661
>> +        return this._expandedLineRows ? this._expandedLineRows[0].offsetTop : this.element.offsetTop;
> 
> What does this logic do?

this calculates offsetTop of the chunk, that is offsetTop of the first DOM node controlled by the chunk

>> Source/WebCore/inspector/front-end/TextViewer.js:1580
>> +        return this._expandedLineRows ? this._expandedLineRows[0].offsetTop : this.element.offsetTop;
> 
> ditto. Also, I see that gutter chunk and main chunk have a lot in common. This does not sound right.

there is even more code duplication now. I am planning to address this when doing the redesign with a ChunkedModel (as we discussed earlier)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list