Bug 146490

Summary: Web Inspector: Make the first click on a rule section create a newline for easy property addition
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Expected Functionality (from Chrome)
none
Patch
none
After Patch is applied
none
Patch none

Description Devin Rousso 2015-06-30 21:02:52 PDT
Created attachment 255890 [details]
Expected Functionality (from Chrome)

Clicking on the last line of a rule section should create a newline and place the cursor on the beginning of that newline to make adding new properties easier.  This should only happen, however, on the first click of that rule section, meaning that once it is focused (and until it has lost focus) clicking on the last line will simply put the cursor at the end of that line.
Comment 1 Radar WebKit Bug Importer 2015-06-30 21:03:31 PDT
<rdar://problem/21625881>
Comment 2 Devin Rousso 2015-06-30 21:14:02 PDT
Created attachment 255893 [details]
Patch
Comment 3 Devin Rousso 2015-06-30 21:14:30 PDT
Created attachment 255894 [details]
After Patch is applied
Comment 4 Timothy Hatcher 2015-06-30 22:13:08 PDT
Comment on attachment 255893 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=255893&action=review

> Source/WebInspectorUI/ChangeLog:12
> +        (WebInspector.CSSStyleDeclarationTextEditor.prototype._editorFocused): When the editor gains focus and the cursor is on
> +        the last line of the rule, insert a new line and place the cursor on that line.

Chrome seems to do this on any line. Should we? I think last line is fine too.
Comment 5 Devin Rousso 2015-07-01 11:58:14 PDT
Created attachment 255942 [details]
Patch
Comment 6 Timothy Hatcher 2015-07-01 16:34:49 PDT
Comment on attachment 255942 [details]
Patch

Awesome!
Comment 7 WebKit Commit Bot 2015-07-01 17:48:51 PDT
Comment on attachment 255942 [details]
Patch

Clearing flags on attachment: 255942

Committed r186212: <http://trac.webkit.org/changeset/186212>
Comment 8 WebKit Commit Bot 2015-07-01 17:48:53 PDT
All reviewed patches have been landed.  Closing bug.