[webkit-reviews] review denied: [Bug 107238] Web Inspector: speedup highlight regex API in DefaultTextEditor : [Attachment 183398] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 18 02:28:21 PST 2013


Pavel Feldman <pfeldman at chromium.org> has denied Andrey Lushnikov
<lushnikov at chromium.org>'s request for review:
Bug 107238: Web Inspector: speedup highlight regex API in DefaultTextEditor
https://bugs.webkit.org/show_bug.cgi?id=107238

Attachment 183398: Patch
https://bugs.webkit.org/attachment.cgi?id=183398&action=review

------- Additional Comments from Pavel Feldman <pfeldman at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=183398&action=review


> Source/WebCore/inspector/front-end/DefaultTextEditor.js:1932
> +    _measureOverlayHighlight: function(lineChunks)

lineChunks is a poor name.

> Source/WebCore/inspector/front-end/DefaultTextEditor.js:1934
> +	   /** @type
{Array.<WebInspector.TextEditorMainPanel.RegexOverlayHighlight>} */

nuke this

> Source/WebCore/inspector/front-end/DefaultTextEditor.js:1947
> +	* @return
{Array.<WebInspector.TextEditorMainPanel.LineOverlayHighlightMetrics>}

Lets use map here.

> Source/WebCore/inspector/front-end/DefaultTextEditor.js:1953
> +	   for (var i = 0; i < lineChunks.length; ++i) {

this.beginDomUpdates()

> Source/WebCore/inspector/front-end/DefaultTextEditor.js:1964
> +		       this._renderRanges(lineRow, line, ranges);

We could do this in an artificial container positioned at 0, 0

> Source/WebCore/inspector/front-end/DefaultTextEditor.js:1970
> +	   /** @type
{Array.<WebInspector.TextEditorMainPanel.LineOverlayHighlightMetrics>} */

This is inferred

> Source/WebCore/inspector/front-end/DefaultTextEditor.js:1975
> +	       /** @type
{WebInspector.TextEditorMainPanel.LineOverlayHighlightMetrics} */

This is implied

> Source/WebCore/inspector/front-end/DefaultTextEditor.js:3058
> +    this.offsetLeft = element.offsetLeft;

You should not use DOM metrics, use simple box metrics that fit your problem:
width and offset.


More information about the webkit-reviews mailing list