Bug 44837 - Web Inspector: persist DOM breakpoints between page reloads
: Web Inspector: persist DOM breakpoints between page reloads
Status: RESOLVED FIXED
: WebKit
Web Inspector (Deprecated)
: 528+ (Nightly build)
: PC Mac OS X 10.5
: P2 Normal
Assigned To:
:
:
:
: 45209
  Show dependency treegraph
 
Reported: 2010-08-29 06:32 PST by
Modified: 2010-09-03 15:57 PST (History)


Attachments
Proposed patch. (19.11 KB, patch)
2010-08-30 04:03 PST, Pavel Podivilov
no flags Review Patch | Details | Formatted Diff | Diff
All comments addressed. (19.69 KB, patch)
2010-08-31 07:19 PST, Pavel Podivilov
yurys: review-
yurys: commit‑queue-
Review Patch | Details | Formatted Diff | Diff
Proposed patch. (20.46 KB, patch)
2010-09-02 04:40 PST, Pavel Podivilov
no flags Review Patch | Details | Formatted Diff | Diff
Proposed patch. (20.38 KB, patch)
2010-09-02 04:55 PST, Pavel Podivilov
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2010-08-29 06:32:50 PST
Web Inspector: persist DOM breakpoints between page reloads
------- Comment #1 From 2010-08-30 04:03:16 PST -------
Created an attachment (id=65902) [details]
Proposed patch.
------- Comment #2 From 2010-08-30 06:56:26 PST -------
(From update of attachment 65902 [details])
> +++ b/LayoutTests/inspector/dom-breakpoints.html
> @@ -35,7 +35,7 @@ var test = function()
>      function step2(node)
>      {
>          InspectorTest.addResult("Found dom node d0.");
> -        WebInspector.domBreakpointManager.setBreakpoint(node, WebInspector.DOMBreakpoint.Types.SubtreeModified);
> +        node.setBreakpoint("SubtreeModified");
Use constants for such arguments.


> +++ b/WebCore/inspector/front-end/DOMAgent.js
> @@ -143,6 +143,40 @@ WebInspector.DOMNode.prototype = {
>          this.ownerDocument._domAgent.removeAttributeAsync(this, name, callback);
>      },
>  
> +    path: function()
> +    {
> +        var path = [];
> +        var node = this;
> +        while (node && "index" in node && node.nodeName && node.nodeName.length) {
Is it possible that there is node.index but but no node.nodeName?
------- Comment #3 From 2010-08-30 06:57:40 PST -------
If we restore breakpoints from the front-end we may miss some early events, is it intentional or should we move the logic to the backend?
------- Comment #4 From 2010-08-30 16:47:34 PST -------
Pavel, please use the http://webkit.org/new-inspector-bug link, or the "Inspector"
link from within Bugzilla <https://bugs.webkit.org/enter_bug.cgi>. I would like to
get CC'd on your bugs. That automatically applies the proper template and a CC
list of interested people (including reviewers to get extra eyes on patches). Thanks!
------- Comment #5 From 2010-08-31 07:19:51 PST -------
Created an attachment (id=66047) [details]
All comments addressed.
------- Comment #6 From 2010-08-31 07:22:56 PST -------
(In reply to comment #4)
> Pavel, please use the http://webkit.org/new-inspector-bug link, or the "Inspector"
> link from within Bugzilla <https://bugs.webkit.org/enter_bug.cgi>. I would like to
> get CC'd on your bugs. That automatically applies the proper template and a CC
> list of interested people (including reviewers to get extra eyes on patches). Thanks!

ok
------- Comment #7 From 2010-09-01 02:38:26 PST -------
(From update of attachment 66047 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=66047&action=prettypatch

> WebCore/inspector/front-end/DOMAgent.js:804
> +        WebInspector.DOMBreakpoint._ids = {};
Why do we need both integer and string type value? We should either use strings or intergers everywhere, r- for this. Given that the backend uses integers and we have named constants in the frontend it seems like we may well get rid of string values.

> WebCore/inspector/front-end/DOMAgent.js:842
> +        WebInspector.DOMBreakpoint._contextMenuLabels[WebInspector.DOMBreakpoint.Types.NodeRemoved] = WebInspector.UIString("Break on Node Removal");        
Revert this please.
------- Comment #8 From 2010-09-02 04:40:00 PST -------
Created an attachment (id=66353) [details]
Proposed patch.

Comments addressed. Added test for restoring DOM breakpoints on page reload.
------- Comment #9 From 2010-09-02 04:55:03 PST -------
Created an attachment (id=66359) [details]
Proposed patch.

Comments addressed. Added test for restoring DOM breakpoints on page reload.
------- Comment #10 From 2010-09-02 22:06:09 PST -------
(From update of attachment 66359 [details])
Clearing flags on attachment: 66359

Committed r66712: <http://trac.webkit.org/changeset/66712>
------- Comment #11 From 2010-09-02 22:06:14 PST -------
All reviewed patches have been landed.  Closing bug.