[Webkit-unassigned] [Bug 54661] Web Inspector: [Text editor] Optimize editing updates in main panel
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Feb 18 04:42:51 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=54661
--- Comment #4 from Andrey Adaikin <aandrey at google.com> 2011-02-18 04:42:51 PST ---
(From update of attachment 82937)
View in context: https://bugs.webkit.org/attachment.cgi?id=82937&action=review
>> Source/WebCore/inspector/front-end/TextViewer.js:44
>> + this._mainPanel = new WebInspector.TextEditorMainPanel(this._textModel, url, syncScrollListener, syncDecorationsForLineListener, enterTextChangeMode, exitTextChangeMode);
>
> 6 parameters in the constructor makes it look like a bad design.
yes! :) another option that I can think of is to just pass the "this" reference, as we already do for Chunk's constructor. can suggest anything else?
>> Source/WebCore/inspector/front-end/TextViewer.js:167
>> + // FIXME: UPDATE GUTTER SMARTLY!
>
> No need to shout :)
this is just for me. I can remove it.
>> Source/WebCore/inspector/front-end/TextViewer.js:203
>> + var mainChunk = this._mainPanel.chunkForLine(lineNumber);
>
> It sounds like main/gutterChunk separation starts hitting us (code bloat)
should I move the classes on it's own files (and maybe package=directory)? next CL? :)
>> Source/WebCore/inspector/front-end/TextViewer.js:773
>> + _markSkippedPaintLines: function(startLine, endLine)
>
> What is "skipped line" and why do we mark it?
we can not paint lines during an editing phase (this._dirtyLines !== undefined), neither we can just skip them, as it was before, because we will loose the callbacks from the highlighter for expanded lines.
>> Source/WebCore/inspector/front-end/TextViewer.js:1199
>> + // Update the chunks in range: firstChunkNumber <= index <= lastChunkNumber
>
> Can this method receive only ranges?
yes, the other 3 arguments can be calculated again
--
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