Bug 20415 - Support editing DOM properties and scope variables
Summary: Support editing DOM properties and scope variables
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Timothy Hatcher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-16 22:33 PDT by Timothy Hatcher
Modified: 2008-08-19 10:30 PDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (19.82 KB, patch)
2008-08-18 15:21 PDT, Timothy Hatcher
kmccullough: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.