WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
102688
Web Inspector: simplify? damaged region computation in the editor
https://bugs.webkit.org/show_bug.cgi?id=102688
Summary
Web Inspector: simplify? damaged region computation in the editor
Pavel Feldman
Reported
2012-11-19 06:58:02 PST
This change simplifies the damaged region computation. Drive-by make _getSelection work properly.
Attachments
Patch
(27.32 KB, patch)
2012-11-19 06:59 PST
,
Pavel Feldman
no flags
Details
Formatted Diff
Diff
Patch
(28.82 KB, patch)
2012-11-19 22:49 PST
,
Pavel Feldman
no flags
Details
Formatted Diff
Diff
Patch
(28.71 KB, patch)
2012-11-19 23:03 PST
,
Pavel Feldman
no flags
Details
Formatted Diff
Diff
Patch
(29.28 KB, patch)
2012-11-20 07:04 PST
,
Pavel Feldman
no flags
Details
Formatted Diff
Diff
Patch
(29.42 KB, patch)
2012-11-20 07:56 PST
,
Pavel Feldman
vsevik
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Pavel Feldman
Comment 1
2012-11-19 06:59:33 PST
Created
attachment 174972
[details]
Patch
Pavel Feldman
Comment 2
2012-11-19 22:49:21 PST
Created
attachment 175144
[details]
Patch
Pavel Feldman
Comment 3
2012-11-19 23:03:16 PST
Created
attachment 175147
[details]
Patch
Vsevolod Vlasov
Comment 4
2012-11-20 05:21:13 PST
Comment on
attachment 175147
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=175147&action=review
> Source/WebCore/inspector/front-end/DefaultTextEditor.js:1891 > + node = this._enclosingLineRowOrSelf(container);
This if branch should precede previous one. We should make sure that the enclosing line row of container is preceding lastUndamaged line row.
> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2128 > + var lastUndamagedChunk = lastUndamagedLineNumber < this._textModel.linesCount ? this._textChunks[this._chunkNumberForLine(lastUndamagedLineNumber)] : null;
lastUndamagedLineChunk
> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2129 > + var firstUndamagedChunk = firstUndamagedLineNumber >= 0 ? this._textChunks[this._chunkNumberForLine(firstUndamagedLineNumber)] : null;
I think you should invert checks for these two lines.
> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2131 > + var collectLinesFromNode = lastUndamagedChunk ? lastUndamagedChunk.lineRowContainingLine(lastUndamagedLineNumber) : null;
lastUndamagedLineRow
> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2202 > + var cloneToLine = Math.min(Math.max(endLine, range.endLine) + lineCountDelta + 1, this._textModel.linesCount);
replace endLine with startLine + lines.length.
> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2681 > +WebInspector.debugDefaultTextEditor = true;
Please remove
Pavel Feldman
Comment 5
2012-11-20 07:04:43 PST
Created
attachment 175211
[details]
Patch
Pavel Feldman
Comment 6
2012-11-20 07:56:35 PST
Created
attachment 175221
[details]
Patch
Pavel Feldman
Comment 7
2012-11-20 08:32:32 PST
Committed
r135285
: <
http://trac.webkit.org/changeset/135285
>
eustas.bug
Comment 8
2012-11-21 22:39:13 PST
Comment on
attachment 175221
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=175221&action=review
> Source/WebCore/inspector/front-end/DefaultTextEditor.js:1989 > + if (false) // For paint debugging.
This makes compiler unhappy: "WARNING - unreachable code"
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug