Web Inspector: React.js JSXTransformer produces bogus error locations
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Apr 2016 00:44:52 +0000 (00:44 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Apr 2016 00:44:52 +0000 (00:44 +0000)
commit5e7d65b924a9c5dff0d4954ae8a4d338410aa784
tree180ab1570a88526380f1c6d15cb7f8bb357580f1
parent863a89bb35bcd328d6e2de23eaa472396ea42576
Web Inspector: React.js JSXTransformer produces bogus error locations
https://bugs.webkit.org/show_bug.cgi?id=150010
<rdar://problem/23062233>

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

Show dynamically added <script> elements added to a frame as resources.
For cases where the scripts had source map resources or error messages
we have a root from which to associate them to.

* Localizations/en.lproj/localizedStrings.js:
"Script Element %d" tree element title.

* UserInterface/Models/Frame.js:
(WebInspector.Frame.prototype.commitProvisionalLoad):
(WebInspector.Frame.prototype.get extraScripts):
(WebInspector.Frame.prototype.addExtraScript):
Have a frame keep a list of its extra scripts.

* UserInterface/Models/Script.js:
(WebInspector.Script):
(WebInspector.Script.prototype.get displayName):
(WebInspector.Script.prototype.get dynamicallyAddedScriptElement):
Identify dynamically added script elements and associate them
with the frame, instead of the frame's main resource.

* UserInterface/Views/FrameTreeElement.js:
(WebInspector.FrameTreeElement.prototype.onpopulate):
(WebInspector.FrameTreeElement.prototype._extraScriptAdded):
Show named / source mapped dynamic script elements under a frame.

* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
Dynamically added script element Scripts will be added by the frame that
owns them.

* UserInterface/Views/ScriptTreeElement.js:
(WebInspector.ScriptTreeElement):
Don't include a subtitle for dynamicallyAddedScriptElement, details match
the frame that owns them.

LayoutTests:

* inspector/model/frame-extra-scripts-expected.txt: Added.
* inspector/model/frame-extra-scripts.html: Added.
Add a test for a WebInspector.Frame's extraScripts list.

* inspector/model/script-resource-relationship-expected.txt
* inspector/model/script-resource-relationship.html
Add a test for a dynamicallyAddedScriptElement.
Remove debug logging.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/model/frame-extra-scripts-expected.txt [new file with mode: 0644]
LayoutTests/inspector/model/frame-extra-scripts.html [new file with mode: 0644]
LayoutTests/inspector/model/script-resource-relationship-expected.txt
LayoutTests/inspector/model/script-resource-relationship.html
LayoutTests/inspector/model/stack-trace-expected.txt
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
Source/WebInspectorUI/UserInterface/Models/Frame.js
Source/WebInspectorUI/UserInterface/Models/Script.js
Source/WebInspectorUI/UserInterface/Views/FrameTreeElement.js
Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/ScriptTreeElement.js