Crash when pressing Command-Delete in Web Inspector

Originator:igeek1
Number:rdar://16156171 Date Originated:24-Feb-2014 06:45 PM
Status:Open Resolved:
Product:Safari Product Version:Safari 7.0.1 (9537.73.11)
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
In the Web Inspector, if you change the value of a property, hit return, then hit Command-Delete, Safari hangs.

Steps to Reproduce:
1. Open Safari.
1a. Make sure the Develop menu is enabled in preferences.
2. Navigate to apple.com/safari (I've reproduced it elsewhere; just using it as an example).
3. Scroll to the first word of main marketing copy on the page. As of this writing, the word is “Safari”.
4. Context-click the word “Safari”
5. Choose “Inspect Element” from the context menu.
6. The Web Inspector opens.
7. In the right sidebar, make sure the Rules tab is selected.
8. There is a rule on the <p> tag in base.css line 150. It is the 4th item after “+ New Rule” in the sidebar for me, and it reads: “margin-bottom: 18px;”
9. Click to position the text cursor between the 8 and the p: “margin-bottom: 18|px”.
10. Press Delete to delete the 8.
11. Type a “4” to make the value 14px.
12. Press Return. I did this accidentally, thinking it would commit the value. Instead, it puts a new line, so the value now reads: “margin-bottom: 14
px;”
13. Realizing your mistake, panic and press Command-Delete instead of just Delete. I think I was probably falling back to Xcode muscle memory, where if I accidentally press Return in the wrong place, auto-indentation will indent the part of the line after the cursor, and I will have to delete back to the beginning of the line.

Expected Results:
Probably a no-op, because we are at the beginning of a line and Command-Delete usually does not delete across line breaks.

Actual Results:
The Web Inspector pinwheels or hangs with a CPU core pegged at 100%, and I have to force quit that Safari Web Content process.

Version:
OS X 10.9.1 (13B3116)
Safari 7.0.1 (9537.73.11)

Notes:


Configuration:
This is not reproducible if you just press Return. You have to modify the value first. And you can’t just delete the 8, either. You also have to type the 4 (or some new value).

Not reproducible in WebKit Nightly r164564, but I’m filing the bug anyway in case that’s just a side effect.

Attachments:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!