Title: [171819] trunk/Source/WebInspectorUI
- Revision
- 171819
- Author
- [email protected]
- Date
- 2014-07-30 14:46:52 -0700 (Wed, 30 Jul 2014)
Log Message
Web Inspector: ProbeSetDetailsSection should not create live location links for unresolved breakpoints
https://bugs.webkit.org/show_bug.cgi?id=135367
Reviewed by Timothy Hatcher.
Regenerate the source code link whenever the breakpoint resolved status changes. If it is
resolved, then we can create a live location link that respects source maps.
* UserInterface/Views/ProbeSetDetailsSection.js:
(WebInspector.ProbeSetDetailsSection):
(WebInspector.ProbeSetDetailsSection.prototype._updateLinkElement): Added.
(WebInspector.ProbeSetDetailsSection.prototype._probeSetPositionTextOrLink): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (171818 => 171819)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-07-30 21:34:51 UTC (rev 171818)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-07-30 21:46:52 UTC (rev 171819)
@@ -1,3 +1,18 @@
+2014-07-30 Brian J. Burg <[email protected]>
+
+ Web Inspector: ProbeSetDetailsSection should not create live location links for unresolved breakpoints
+ https://bugs.webkit.org/show_bug.cgi?id=135367
+
+ Reviewed by Timothy Hatcher.
+
+ Regenerate the source code link whenever the breakpoint resolved status changes. If it is
+ resolved, then we can create a live location link that respects source maps.
+
+ * UserInterface/Views/ProbeSetDetailsSection.js:
+ (WebInspector.ProbeSetDetailsSection):
+ (WebInspector.ProbeSetDetailsSection.prototype._updateLinkElement): Added.
+ (WebInspector.ProbeSetDetailsSection.prototype._probeSetPositionTextOrLink): Deleted.
+
2014-07-29 Joseph Pecoraro <[email protected]>
Web Inspector: 80% of time during recording is spent creating source code locations for profile nodes
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ProbeSetDetailsSection.js (171818 => 171819)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ProbeSetDetailsSection.js 2014-07-30 21:34:51 UTC (rev 171818)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ProbeSetDetailsSection.js 2014-07-30 21:46:52 UTC (rev 171819)
@@ -30,7 +30,7 @@
this._listeners = new WebInspector.EventListenerSet(this, "ProbeSetDetailsSection UI listeners");
this._probeSet = probeSet;
- var optionsElement = document.createElement("div");
+ var optionsElement = this._optionsElement = document.createElement("div");
optionsElement.classList.add(WebInspector.ProbeSetDetailsSection.SectionOptionsStyleClassName);
var removeProbeButton = optionsElement.createChild("img");
@@ -47,9 +47,10 @@
addProbeButton.classList.add(WebInspector.ProbeSetDetailsSection.AddProbeValueStyleClassName);
this._listeners.register(addProbeButton, "click", this._addProbeButtonClicked);
- var titleElement = this._probeSetPositionTextOrLink();
- titleElement.classList.add(WebInspector.ProbeSetDetailsSection.DontFloatLinkStyleClassName);
- optionsElement.appendChild(titleElement);
+ // Update the source link when the breakpoint's resolved state changes,
+ // so that it can become a live location link when possible.
+ this._updateLinkElement();
+ this._listeners.register(this._probeSet.breakpoint, WebInspector.Breakpoint.Event.ResolvedStateDidChange, this._updateLinkElement);
this._dataGrid = new WebInspector.ProbeSetDataGrid(probeSet);
var singletonRow = new WebInspector.DetailsSectionRow;
@@ -86,10 +87,27 @@
// Private
- _probeSetPositionTextOrLink: function()
+ _updateLinkElement: function()
{
var breakpoint = this._probeSet.breakpoint;
- return WebInspector.createSourceCodeLocationLink(breakpoint.sourceCodeLocation);
+ var titleElement = null;
+ if (breakpoint.resolved)
+ titleElement = WebInspector.createSourceCodeLocationLink(breakpoint.sourceCodeLocation);
+ else {
+ // Fallback for when we can't create a live source link.
+ console.assert(!breakpoint.sourceCodeLocation.sourceCode);
+
+ var location = breakpoint.sourceCodeLocation;
+ titleElement = WebInspector.linkifyLocation(breakpoint.url, location.displayLineNumber, location.displayColumnNumber);
+ }
+
+ titleElement.classList.add(WebInspector.ProbeSetDetailsSection.DontFloatLinkStyleClassName);
+
+ if (this._linkElement)
+ this._optionsElement.removeChild(this._linkElement);
+
+ this._linkElement = titleElement;
+ this._optionsElement.appendChild(this._linkElement);
},
_addProbeButtonClicked: function(event)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes