Bug 20415

Summary: Support editing DOM properties and scope variables
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: Web Inspector (Deprecated)Assignee: Timothy Hatcher <timothy>
Status: RESOLVED FIXED    
Severity: Enhancement CC: aroben
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed patch kmccullough: review+

Description Timothy Hatcher 2008-08-16 22:33:48 PDT
We need to support editing of DOM properties and scope variables whole paused in the debugger.
Comment 1 Timothy Hatcher 2008-08-18 15:21:45 PDT
Created attachment 22864 [details]
Proposed patch
Comment 2 Kevin McCullough 2008-08-18 16:14:23 PDT
Comment on attachment 22864 [details]
Proposed patch

in WebInspector.ObjectPropertyTreeElement.prototype line 202 hasChildren is restored, but update() will restore the hasChildren variable so it doesn't need to be in the context at all.

Line 193: Why does editingEnded take a context? It's not used.

Line 226 "the everything"

In treeoutline.js line 560 I do not understand why you are comparing what you are.  And should we even call insertBefore if nextSibling is null?
Comment 3 Keishi Hattori 2008-08-19 04:49:43 PDT
This is cool. Maybe some kind of magic variable that points to the previous value and some command line api stuff would be useful?
Comment 4 Timothy Hatcher 2008-08-19 10:06:03 PDT
(In reply to comment #2)
> (From update of attachment 22864 [details] [edit])
> in WebInspector.ObjectPropertyTreeElement.prototype line 202 hasChildren is
> restored, but update() will restore the hasChildren variable so it doesn't need
> to be in the context at all.

Fixed.

> Line 193: Why does editingEnded take a context? It's not used.

Changed this, it now uses the context since I moved some code.

> Line 226 "the everything"

Fixed.

> In treeoutline.js line 560 I do not understand why you are comparing what you
> are.  And should we even call insertBefore if nextSibling is null?

If the nextSibling's parentNode is different than the parent we are about to insert too, we need to use null for the next sibling otherwise you get a DOM exception 8. And calling insertBefore with null is the same as appendChild, so thats what we want.
Comment 5 Kevin McCullough 2008-08-19 10:09:20 PDT
Comment on attachment 22864 [details]
Proposed patch

After Tim's changes
Comment 6 Timothy Hatcher 2008-08-19 10:30:43 PDT
Landed in r35835.