WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 81758
Web Inspector: Indenting fully selected line should not indent the line next to it
https://bugs.webkit.org/show_bug.cgi?id=81758
Summary
Web Inspector: Indenting fully selected line should not indent the line next ...
Nikita Vasilyev
Reported
2012-03-21 04:10:27 PDT
Screencast:
http://www.screenr.com/0oB8
I’ve never seen this behavior in the others code editors such as TextMate, IntelliJ IDEA, Espresso, CodeMirror and Ace.
Attachments
First try
(2.48 KB, patch)
2012-03-21 04:22 PDT
,
Nikita Vasilyev
timothy
: review-
Details
Formatted Diff
Diff
Add detailed comment to ChangeLog file
(3.08 KB, patch)
2012-03-21 14:15 PDT
,
Nikita Vasilyev
pfeldman
: review-
Details
Formatted Diff
Diff
Add a test
(5.54 KB, patch)
2012-03-22 03:37 PDT
,
Nikita Vasilyev
pfeldman
: review-
Details
Formatted Diff
Diff
Couple more tests
(6.41 KB, patch)
2012-03-24 11:10 PDT
,
Nikita Vasilyev
no flags
Details
Formatted Diff
Diff
Whoops, forgot to update ChangeLogs
(6.31 KB, patch)
2012-03-24 11:16 PDT
,
Nikita Vasilyev
no flags
Details
Formatted Diff
Diff
Coding style
(6.30 KB, patch)
2012-03-24 12:07 PDT
,
Nikita Vasilyev
no flags
Details
Formatted Diff
Diff
Coding style, again
(6.30 KB, patch)
2012-03-24 12:10 PDT
,
Nikita Vasilyev
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ec2-cr-linux-03
(9.55 MB, application/zip)
2012-03-24 12:39 PDT
,
WebKit Review Bot
no flags
Details
Fix the test
(6.30 KB, patch)
2012-03-25 13:34 PDT
,
Nikita Vasilyev
no flags
Details
Formatted Diff
Diff
Show Obsolete
(7)
View All
Add attachment
proposed patch, testcase, etc.
Nikita Vasilyev
Comment 1
2012-03-21 04:22:28 PDT
Created
attachment 133010
[details]
First try After the patch applied:
http://www.screenr.com/LoB8
Timothy Hatcher
Comment 2
2012-03-21 13:00:28 PDT
Comment on
attachment 133010
[details]
First try Please revise the ChangeLog and provide information on what changed and why (overall summary and per function).
Nikita Vasilyev
Comment 3
2012-03-21 14:15:49 PDT
Created
attachment 133112
[details]
Add detailed comment to ChangeLog file
Pavel Feldman
Comment 4
2012-03-21 23:07:32 PDT
Comment on
attachment 133112
[details]
Add detailed comment to ChangeLog file This logic covers way more edge cases, it'll be really easy to regress it. Could you add a test for it (
http://code.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/LayoutTests/inspector/editor/&exact_package=chromium&q=file:LayoutTests/inspector%20TextEditor
)
Nikita Vasilyev
Comment 5
2012-03-22 03:37:47 PDT
Created
attachment 133214
[details]
Add a test
Pavel Feldman
Comment 6
2012-03-24 02:06:45 PDT
Comment on
attachment 133214
[details]
Add a test View in context:
https://bugs.webkit.org/attachment.cgi?id=133214&action=review
The change looks good. Could you please add more test scenarios and check for the post-indent / unindent selection as well?
> LayoutTests/inspector/editor/indenting.html:6 > +function dumpTextModel(model) {
Please remove this.
> LayoutTests/inspector/editor/indenting.html:14 > + "*/";
You might want to indent this one char so that it looked like properly formatted comment and dump the initial state.
> LayoutTests/inspector/editor/indenting.html:21 > + function dumpTextModel(msg) {
nit: { on the next line.
> LayoutTests/inspector/editor/indenting.html:39 > +This test checks code indentation.
Please provide more verbose description. I would call the test "indentation.html" as well.
> Source/WebCore/inspector/front-end/TextViewer.js:1109 > + if (range.startColumn !== 0)
Placing a comment that we distinguish between full and partial line selection won't hurt. This could actually be tested as well. I.e. query selection after the indentation in both cases (full line select and partial line select).
Nikita Vasilyev
Comment 7
2012-03-24 04:56:23 PDT
(In reply to
comment #6
)
> (From update of
attachment 133214
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=133214&action=review
> > The change looks good. Could you please add more test scenarios and check for the post-indent / unindent selection as well?
Okay. I’m in the process of figuring out how to get selection. window.getSelection() doesn’t return anything since an editor element is neither attached to the document nor visible...
Pavel Feldman
Comment 8
2012-03-24 05:54:39 PDT
(In reply to
comment #7
)
> (In reply to
comment #6
) > > (From update of
attachment 133214
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=133214&action=review
> > > > The change looks good. Could you please add more test scenarios and check for the post-indent / unindent selection as well? > > Okay. I’m in the process of figuring out how to get selection. window.getSelection() doesn’t return anything since an editor element is neither attached to the document nor visible...
You could just dump the range that is being returned as a start.
Nikita Vasilyev
Comment 9
2012-03-24 11:10:08 PDT
Created
attachment 133642
[details]
Couple more tests
Nikita Vasilyev
Comment 10
2012-03-24 11:16:38 PDT
Created
attachment 133644
[details]
Whoops, forgot to update ChangeLogs
Pavel Feldman
Comment 11
2012-03-24 11:48:23 PDT
Comment on
attachment 133644
[details]
Whoops, forgot to update ChangeLogs View in context:
https://bugs.webkit.org/attachment.cgi?id=133644&action=review
> Source/WebCore/inspector/front-end/TextViewer.js:1111 > + if (range.startColumn !== 0)
Looks great! One last thing: WebKit prohibits comparison to 0. Should be "if (range.startColumn)". See
http://www.webkit.org/coding/coding-style.html#zero
. Sorry for pointing it out so late in the review cycle.
Nikita Vasilyev
Comment 12
2012-03-24 12:07:04 PDT
Created
attachment 133646
[details]
Coding style Didn’t know it applies to JS.
Nikita Vasilyev
Comment 13
2012-03-24 12:10:02 PDT
Created
attachment 133647
[details]
Coding style, again
WebKit Review Bot
Comment 14
2012-03-24 12:39:51 PDT
Comment on
attachment 133647
[details]
Coding style, again
Attachment 133647
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/12127228
New failing tests: inspector/editor/indentation.html
WebKit Review Bot
Comment 15
2012-03-24 12:39:58 PDT
Created
attachment 133648
[details]
Archive of layout-test-results from ec2-cr-linux-03 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-03 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Nikita Vasilyev
Comment 16
2012-03-25 13:34:56 PDT
Created
attachment 133690
[details]
Fix the test
Pavel Feldman
Comment 17
2012-03-25 22:48:24 PDT
Comment on
attachment 133690
[details]
Fix the test Thanks
WebKit Review Bot
Comment 18
2012-03-25 23:18:03 PDT
Comment on
attachment 133690
[details]
Fix the test Clearing flags on attachment: 133690 Committed
r112053
: <
http://trac.webkit.org/changeset/112053
>
WebKit Review Bot
Comment 19
2012-03-25 23:18:23 PDT
All reviewed patches have been landed. Closing bug.
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