Bug 20238

Summary: Minor bugs with style editing in the Inspector
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: Web Inspector (Deprecated)Assignee: Timothy Hatcher <timothy>
Status: RESOLVED FIXED    
Severity: Minor CC: aroben
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed patch aroben: review+

Timothy Hatcher
Reported 2008-07-30 19:46:09 PDT
The scroll position stays where it was when editing a string that was longer than the editing input area. The text shifts when entering and exiting editing mode. Child elements are sometimes not restored for shorthands. Shorthands are not always expanded again after editing. Color swatches should be hidden when editing.
Attachments
Proposed patch (6.97 KB, patch)
2008-07-30 19:47 PDT, Timothy Hatcher
aroben: review+
Adam Roben (:aroben)
Comment 1 2008-07-30 19:46:59 PDT
Maybe we should have separate bugs for each of these issues?
Timothy Hatcher
Comment 2 2008-07-30 19:47:09 PDT
Created attachment 22572 [details] Proposed patch
Adam Roben (:aroben)
Comment 3 2008-07-30 19:51:11 PDT
Comment on attachment 22572 [details] Proposed patch - // Lie about out children to prevent toggling on click. + this.wasExpanded = this.expanded; + + // Lie about our children to prevent expanding on double click and to collapse shorthands. + this.reallyHasChildren = this.hasChildren; this.hasChildren = false; if (!selectElement) @@ -563,23 +564,26 @@ WebInspector.StylePropertyTreeElement.prototype = { window.getSelection().setBaseAndExtent(selectElement, 0, selectElement, 1); - WebInspector.startEditing(this.listItemElement, this.editingCommitted.bind(this), this.editingCancelled.bind(this), wasExpanded); + WebInspector.startEditing(this.listItemElement, this.editingCommitted.bind(this), this.editingCancelled.bind(this)); I guess you could pass the information along in the context parameter to startEditing instead of storing it on this. That would save you from having to delete the properties later. But it doesn't matter too much either way. r=me!
Adam Roben (:aroben)
Comment 4 2008-07-30 19:51:29 PDT
Oh, don't forget to mention the bug number in the URL.
Timothy Hatcher
Comment 5 2008-07-30 21:05:12 PDT
Landed in r35472.
Note You need to log in before you can comment on or make changes to this bug.