WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
65612
Web Inspector: draft implementation of source mapping listeners.
https://bugs.webkit.org/show_bug.cgi?id=65612
Summary
Web Inspector: draft implementation of source mapping listeners.
Pavel Podivilov
Reported
2011-08-03 05:31:58 PDT
Web Inspector: draft implementation of source mapping listeners. Refactor anchors creation: move anchor updating code to ScriptsPanel since we have model.addSourceMappingListener now.
Attachments
Patch
(13.08 KB, patch)
2011-08-03 05:32 PDT
,
Pavel Podivilov
no flags
Details
Formatted Diff
Diff
Patch
(14.06 KB, patch)
2011-08-03 07:19 PDT
,
Pavel Podivilov
no flags
Details
Formatted Diff
Diff
Patch
(25.16 KB, patch)
2011-08-04 06:04 PDT
,
Pavel Podivilov
no flags
Details
Formatted Diff
Diff
Patch
(26.55 KB, patch)
2011-08-04 06:46 PDT
,
Pavel Podivilov
no flags
Details
Formatted Diff
Diff
Patch
(26.55 KB, patch)
2011-08-04 07:07 PDT
,
Pavel Podivilov
no flags
Details
Formatted Diff
Diff
Patch
(26.55 KB, patch)
2011-08-04 07:08 PDT
,
Pavel Podivilov
pfeldman
: review+
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Pavel Podivilov
Comment 1
2011-08-03 05:32:57 PDT
Created
attachment 102768
[details]
Patch
WebKit Review Bot
Comment 2
2011-08-03 05:56:18 PDT
Comment on
attachment 102768
[details]
Patch
Attachment 102768
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/9304015
New failing tests: http/tests/inspector-enabled/console-clear-arguments-on-frame-remove.html
Pavel Podivilov
Comment 3
2011-08-03 07:19:05 PDT
Created
attachment 102783
[details]
Patch
Pavel Feldman
Comment 4
2011-08-04 03:08:39 PDT
Comment on
attachment 102783
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=102783&action=review
> Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:125 > + this._sourceMappingListeners.push(listener);
Nit: You could do addEventListener(sourceId, listener) followed by a dispatchEvent(this.sourceId)...
> Source/WebCore/inspector/front-end/ScriptsPanel.js:572 > + model.addSourceMappingListener(url, null, formatAnchor);
Could we test anchor update?
> Source/WebCore/inspector/front-end/inspector.js:1323 > +WebInspector._linkifyLocation = function(url, oneBasedLineNumber, oneBasedColumnNumber, classes, tooltipText, preferredPanel)
Call sites should probably do WebInspector.debuggerPresentationModel.linkifyLocation(location), where location is raw 'script' location.
> Source/WebCore/inspector/front-end/inspector.js:1325 > + if (preferredPanel === "scripts" && !WebInspector.debuggerModel.scriptsForURL(url).length)
Either this code or WebInspector._showAnchorLocation should fall back to "resources".
Pavel Podivilov
Comment 5
2011-08-04 06:04:02 PDT
Created
attachment 102902
[details]
Patch
Pavel Podivilov
Comment 6
2011-08-04 06:11:21 PDT
(In reply to
comment #4
)
> (From update of
attachment 102783
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=102783&action=review
> > > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:125 > > + this._sourceMappingListeners.push(listener); > > Nit: You could do addEventListener(sourceId, listener) followed by a dispatchEvent(this.sourceId)...
Unfortunately, sourceId isn't a good id since there may be several scripts linked to one RawSourceCode instance.
> > > Source/WebCore/inspector/front-end/ScriptsPanel.js:572 > > + model.addSourceMappingListener(url, null, formatAnchor); > > Could we test anchor update?
It is tested by testConsoleMessagesForFormattedScripts in script-formatter.html.
> > > Source/WebCore/inspector/front-end/inspector.js:1323 > > +WebInspector._linkifyLocation = function(url, oneBasedLineNumber, oneBasedColumnNumber, classes, tooltipText, preferredPanel) > > Call sites should probably do WebInspector.debuggerPresentationModel.linkifyLocation(location), where location is raw 'script' location.
Done.
> > > Source/WebCore/inspector/front-end/inspector.js:1325 > > + if (preferredPanel === "scripts" && !WebInspector.debuggerModel.scriptsForURL(url).length) > > Either this code or WebInspector._showAnchorLocation should fall back to "resources".
Not all anchors are created by linkifyResourceAsNode, some of them don't have preferred_panel attribute. Code in WebInspector._showAnchorLocation is needed for such anchors.
WebKit Review Bot
Comment 7
2011-08-04 06:27:30 PDT
Comment on
attachment 102902
[details]
Patch
Attachment 102902
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/9303457
New failing tests: http/tests/inspector/console-resource-errors.html http/tests/inspector/console-xhr-logging.html
Pavel Podivilov
Comment 8
2011-08-04 06:46:58 PDT
Created
attachment 102905
[details]
Patch
Pavel Podivilov
Comment 9
2011-08-04 07:07:31 PDT
Created
attachment 102909
[details]
Patch
Pavel Podivilov
Comment 10
2011-08-04 07:08:30 PDT
Created
attachment 102910
[details]
Patch
Pavel Feldman
Comment 11
2011-08-05 08:47:35 PDT
Comment on
attachment 102910
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=102910&action=review
> Source/WebCore/inspector/front-end/EventListenersSidebarPane.js:240 > + var url = this.eventListener.location.scriptId;
Please add yet another FIXME on the location structure + use of column.
> Source/WebCore/inspector/front-end/ProfileDataGridTree.js:101 > + var urlElement = WebInspector.debuggerPresentationModel.linkifyLocation(this.profileNode.url, lineNumber, 0, "profile-node-file");
Do you know what url is?
> Source/WebCore/inspector/front-end/TimelinePanel.js:1128 > + return this._linkifyLocation(this.stackTrace[0].url, this.stackTrace[0].lineNumber, this.stackTrace[0].columnNumber);
Extract method receiving ConsoleCallFrame
Pavel Podivilov
Comment 12
2011-08-08 08:51:03 PDT
Committed
r92598
: <
http://trac.webkit.org/changeset/92598
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug