[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
podivilov at chromium.org
podivilov at chromium.org
Wed Dec 22 13:47:53 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 9e45911ab6b5eb0e3090df4c4a284220c065bb31
Author: podivilov at chromium.org <podivilov at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Sep 27 16:08:12 2010 +0000
2010-09-24 Pavel Podivilov <podivilov at chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: add XHR breakpoints sidebar pane to front-end
https://bugs.webkit.org/show_bug.cgi?id=46483
* English.lproj/localizedStrings.js:
* WebCore.gypi:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::instrumentWillSendXMLHttpRequestImpl):
* inspector/InspectorTimelineAgent.h:
* inspector/front-end/BreakpointManager.js:
(WebInspector.BreakpointManager):
(WebInspector.BreakpointManager.prototype._setBreakpointOnBackend):
(WebInspector.BreakpointManager.prototype.createXHRBreakpoint):
(WebInspector.BreakpointManager.prototype._xhrBreakpointRemoved):
(WebInspector.Breakpoint.prototype.compareTo):
(WebInspector.XHRBreakpoint):
(WebInspector.XHRBreakpoint.prototype.get enabled):
(WebInspector.XHRBreakpoint.prototype.set enabled):
(WebInspector.XHRBreakpoint.prototype.get url):
(WebInspector.XHRBreakpoint.prototype.formatLabel):
(WebInspector.XHRBreakpoint.prototype.compareTo):
(WebInspector.XHRBreakpoint.prototype.remove):
(WebInspector.XHRBreakpoint.prototype._setOnBackend.didSet):
(WebInspector.XHRBreakpoint.prototype._setOnBackend):
(WebInspector.XHRBreakpoint.prototype._removeFromBackend):
* inspector/front-end/BreakpointsSidebarPane.js:
(WebInspector.XHRBreakpointsSidebarPane):
(WebInspector.XHRBreakpointsSidebarPane.prototype._showEditBreakpointDialog):
(WebInspector.XHRBreakpointsSidebarPane.prototype._hideEditBreakpointDialog):
(WebInspector.BreakpointItem.prototype.compareTo):
(WebInspector.BreakpointItem.prototype._checkboxClicked):
(WebInspector.BreakpointItem.prototype._enableChanged):
(WebInspector.BreakpointItem.prototype._breakpointClicked):
(WebInspector.XHRBreakpointItem):
* inspector/front-end/CallStackSidebarPane.js:
(WebInspector.CallStackSidebarPane.prototype.updateStatus.formatters.s):
(WebInspector.CallStackSidebarPane.prototype.updateStatus.append):
(WebInspector.CallStackSidebarPane.prototype.updateStatus):
* inspector/front-end/DOMAgent.js:
(WebInspector.DOMBreakpoint.prototype.compareTo):
* inspector/front-end/Images/paneAddButtons.png: Added.
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel):
(WebInspector.ScriptsPanel.prototype.reset):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.css:
(.pane > .title > button.add):
(.pane > .title > button.add:hover):
(.pane > .title > button.add:active):
(.pane > .body .breakpoint-condition):
* inspector/front-end/inspector.js:
(WebInspector.createXHRBreakpointsSidebarPane.breakpointAdded):
(WebInspector.createXHRBreakpointsSidebarPane):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68395 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 051e06b..0d4f49c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,60 @@
+2010-09-24 Pavel Podivilov <podivilov at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: add XHR breakpoints sidebar pane to front-end
+ https://bugs.webkit.org/show_bug.cgi?id=46483
+
+ * English.lproj/localizedStrings.js:
+ * WebCore.gypi:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::instrumentWillSendXMLHttpRequestImpl):
+ * inspector/InspectorTimelineAgent.h:
+ * inspector/front-end/BreakpointManager.js:
+ (WebInspector.BreakpointManager):
+ (WebInspector.BreakpointManager.prototype._setBreakpointOnBackend):
+ (WebInspector.BreakpointManager.prototype.createXHRBreakpoint):
+ (WebInspector.BreakpointManager.prototype._xhrBreakpointRemoved):
+ (WebInspector.Breakpoint.prototype.compareTo):
+ (WebInspector.XHRBreakpoint):
+ (WebInspector.XHRBreakpoint.prototype.get enabled):
+ (WebInspector.XHRBreakpoint.prototype.set enabled):
+ (WebInspector.XHRBreakpoint.prototype.get url):
+ (WebInspector.XHRBreakpoint.prototype.formatLabel):
+ (WebInspector.XHRBreakpoint.prototype.compareTo):
+ (WebInspector.XHRBreakpoint.prototype.remove):
+ (WebInspector.XHRBreakpoint.prototype._setOnBackend.didSet):
+ (WebInspector.XHRBreakpoint.prototype._setOnBackend):
+ (WebInspector.XHRBreakpoint.prototype._removeFromBackend):
+ * inspector/front-end/BreakpointsSidebarPane.js:
+ (WebInspector.XHRBreakpointsSidebarPane):
+ (WebInspector.XHRBreakpointsSidebarPane.prototype._showEditBreakpointDialog):
+ (WebInspector.XHRBreakpointsSidebarPane.prototype._hideEditBreakpointDialog):
+ (WebInspector.BreakpointItem.prototype.compareTo):
+ (WebInspector.BreakpointItem.prototype._checkboxClicked):
+ (WebInspector.BreakpointItem.prototype._enableChanged):
+ (WebInspector.BreakpointItem.prototype._breakpointClicked):
+ (WebInspector.XHRBreakpointItem):
+ * inspector/front-end/CallStackSidebarPane.js:
+ (WebInspector.CallStackSidebarPane.prototype.updateStatus.formatters.s):
+ (WebInspector.CallStackSidebarPane.prototype.updateStatus.append):
+ (WebInspector.CallStackSidebarPane.prototype.updateStatus):
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMBreakpoint.prototype.compareTo):
+ * inspector/front-end/Images/paneAddButtons.png: Added.
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+ (WebInspector.ScriptsPanel.prototype.reset):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.css:
+ (.pane > .title > button.add):
+ (.pane > .title > button.add:hover):
+ (.pane > .title > button.add:active):
+ (.pane > .body .breakpoint-condition):
+ * inspector/front-end/inspector.js:
+ (WebInspector.createXHRBreakpointsSidebarPane.breakpointAdded):
+ (WebInspector.createXHRBreakpointsSidebarPane):
+
2010-09-27 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
diff --git a/WebCore/English.lproj/localizedStrings.js b/WebCore/English.lproj/localizedStrings.js
index a3720e2..98512b9 100644
Binary files a/WebCore/English.lproj/localizedStrings.js and b/WebCore/English.lproj/localizedStrings.js differ
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 732972c..1134f1c 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -4389,6 +4389,7 @@
'inspector/front-end/Images/largerResourcesButtonGlyph.png',
'inspector/front-end/Images/localStorage.png',
'inspector/front-end/Images/nodeSearchButtonGlyph.png',
+ 'inspector/front-end/Images/paneAddButtons.png',
'inspector/front-end/Images/paneBottomGrow.png',
'inspector/front-end/Images/paneBottomGrowActive.png',
'inspector/front-end/Images/paneGrowHandleLine.png',
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index 769ead4..d106d56 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -791,6 +791,8 @@ void InspectorController::didCommitLoad(DocumentLoader* loader)
#if ENABLE(JAVASCRIPT_DEBUGGER)
if (m_debuggerAgent)
m_debuggerAgent->clearForPageNavigation();
+
+ m_XHRBreakpoints.clear();
#endif
#if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC)
m_profilerAgent->resetState();
@@ -2167,10 +2169,15 @@ void InspectorController::instrumentWillSendXMLHttpRequestImpl(const KURL& url)
if (m_debuggerAgent) {
if (!m_XHRBreakpoints.size())
return;
- RefPtr<InspectorObject> eventData = InspectorObject::create();
- eventData->setNumber("recordType", XHRSendRecordType);
- eventData->setString("url", url);
- m_debuggerAgent->breakProgram(NativeBreakpointDebuggerEventType, eventData);
+ for (HashMap<unsigned int, String>::iterator it = m_XHRBreakpoints.begin(); it != m_XHRBreakpoints.end(); ++it) {
+ if (!url.string().contains(it->second))
+ continue;
+ RefPtr<InspectorObject> eventData = InspectorObject::create();
+ eventData->setString("type", "XHR");
+ eventData->setString("url", url);
+ m_debuggerAgent->breakProgram(NativeBreakpointDebuggerEventType, eventData);
+ break;
+ }
}
#endif
}
diff --git a/WebCore/inspector/InspectorTimelineAgent.h b/WebCore/inspector/InspectorTimelineAgent.h
index 9de3c4e..65ca442 100644
--- a/WebCore/inspector/InspectorTimelineAgent.h
+++ b/WebCore/inspector/InspectorTimelineAgent.h
@@ -70,8 +70,7 @@ enum TimelineRecordType {
GCEventTimelineRecordType = 17,
MarkDOMContentEventType = 18,
MarkLoadEventType = 19,
- ScheduleResourceRequestTimelineRecordType = 20,
- XHRSendRecordType = 21
+ ScheduleResourceRequestTimelineRecordType = 20
};
class InspectorTimelineAgent : public Noncopyable {
diff --git a/WebCore/inspector/front-end/BreakpointManager.js b/WebCore/inspector/front-end/BreakpointManager.js
index 8518618..ec4e7cf 100644
--- a/WebCore/inspector/front-end/BreakpointManager.js
+++ b/WebCore/inspector/front-end/BreakpointManager.js
@@ -27,6 +27,7 @@
WebInspector.BreakpointManager = function()
{
this._breakpoints = {};
+ this._xhrBreakpoints = {};
}
WebInspector.BreakpointManager.prototype = {
@@ -124,6 +125,22 @@ WebInspector.BreakpointManager.prototype = {
}
}
InspectorBackend.setBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.enabled, breakpoint.condition, didSetBreakpoint.bind(this));
+ },
+
+ createXHRBreakpoint: function(url)
+ {
+ if (url in this._xhrBreakpoints)
+ return;
+ this._xhrBreakpoints[url] = true;
+
+ var breakpoint = new WebInspector.XHRBreakpoint(url);
+ breakpoint.addEventListener("removed", this._xhrBreakpointRemoved.bind(this));
+ this.dispatchEventToListeners("xhr-breakpoint-added", breakpoint);
+ },
+
+ _xhrBreakpointRemoved: function(event)
+ {
+ delete this._xhrBreakpoints[event.target.url];
}
}
@@ -189,6 +206,15 @@ WebInspector.Breakpoint.prototype = {
this.dispatchEventToListeners("condition-changed");
},
+ compareTo: function(other)
+ {
+ if (this.url != other.url)
+ return this.url < other.url ? -1 : 1;
+ if (this.line != other.line)
+ return this.line < other.line ? -1 : 1;
+ return 0;
+ },
+
remove: function()
{
InspectorBackend.removeBreakpoint(this.sourceID, this.line);
@@ -199,3 +225,83 @@ WebInspector.Breakpoint.prototype = {
}
WebInspector.Breakpoint.prototype.__proto__ = WebInspector.Object.prototype;
+
+WebInspector.XHRBreakpoint = function(url)
+{
+ this._url = url;
+ this._locked = false;
+ this.enabled = true;
+}
+
+WebInspector.XHRBreakpoint.prototype = {
+ get enabled()
+ {
+ return "_id" in this;
+ },
+
+ set enabled(enabled)
+ {
+ if (this._locked)
+ return;
+ if (this.enabled === enabled)
+ return;
+ if (enabled)
+ this._setOnBackend();
+ else
+ this._removeFromBackend();
+ },
+
+ get url()
+ {
+ return this._url;
+ },
+
+ formatLabel: function()
+ {
+ var label = "";
+ if (!this.url.length)
+ label = WebInspector.UIString("Any XHR");
+ else
+ label = WebInspector.UIString("URL contains \"%s\"", this.url);
+ return label;
+ },
+
+ compareTo: function(other)
+ {
+ if (this.url != other.url)
+ return this.url < other.url ? -1 : 1;
+ return 0;
+ },
+
+ remove: function()
+ {
+ if (this._locked)
+ return;
+ if (this.enabled)
+ this._removeFromBackend();
+ this.dispatchEventToListeners("removed");
+ },
+
+ _setOnBackend: function()
+ {
+ this._locked = true;
+ var data = { type: "XHR", condition: { url: this.url } };
+ InspectorBackend.setNativeBreakpoint(data, didSet.bind(this));
+
+ function didSet(breakpointId)
+ {
+ this._locked = false;
+ this._id = breakpointId;
+ this.dispatchEventToListeners("enable-changed");
+ }
+ },
+
+ _removeFromBackend: function()
+ {
+ InspectorBackend.removeNativeBreakpoint(this._id);
+ delete this._id;
+ this.dispatchEventToListeners("enable-changed");
+ }
+}
+
+WebInspector.XHRBreakpoint.prototype.__proto__ = WebInspector.Object.prototype;
diff --git a/WebCore/inspector/front-end/BreakpointsSidebarPane.js b/WebCore/inspector/front-end/BreakpointsSidebarPane.js
index 9688f3e..16ab041 100644
--- a/WebCore/inspector/front-end/BreakpointsSidebarPane.js
+++ b/WebCore/inspector/front-end/BreakpointsSidebarPane.js
@@ -92,6 +92,42 @@ WebInspector.BreakpointsSidebarPane.prototype = {
WebInspector.BreakpointsSidebarPane.prototype.__proto__ = WebInspector.SidebarPane.prototype;
+WebInspector.XHRBreakpointsSidebarPane = function()
+{
+ WebInspector.BreakpointsSidebarPane.call(this, WebInspector.UIString("XHR Breakpoints"));
+
+ var addButton = document.createElement("button");
+ addButton.className = "add";
+ addButton.addEventListener("click", this._showEditBreakpointDialog.bind(this), false);
+ this.titleElement.appendChild(addButton);
+
+ this.urlInputElement = document.createElement("span");
+ this.urlInputElement.className = "breakpoint-condition editing";
+}
+
+WebInspector.XHRBreakpointsSidebarPane.prototype = {
+ _showEditBreakpointDialog: function(event)
+ {
+ event.stopPropagation();
+
+ if (this.urlInputElement.parentElement)
+ return;
+
+ this.urlInputElement.textContent = "";
+ this.bodyElement.insertBefore(this.urlInputElement, this.bodyElement.firstChild);
+ WebInspector.startEditing(this.urlInputElement, this._hideEditBreakpointDialog.bind(this, false), this._hideEditBreakpointDialog.bind(this, true));
+ },
+
+ _hideEditBreakpointDialog: function(discard)
+ {
+ if (!discard)
+ WebInspector.breakpointManager.createXHRBreakpoint(this.urlInputElement.textContent.toLowerCase());
+ this.bodyElement.removeChild(this.urlInputElement);
+ }
+}
+
+WebInspector.XHRBreakpointsSidebarPane.prototype.__proto__ = WebInspector.BreakpointsSidebarPane.prototype;
+
WebInspector.BreakpointItem = function(breakpoint)
{
this._breakpoint = breakpoint;
@@ -116,6 +152,11 @@ WebInspector.BreakpointItem.prototype = {
return this._element;
},
+ compareTo: function(other)
+ {
+ return this._breakpoint.compareTo(other._breakpoint);
+ },
+
remove: function()
{
this._breakpoint.remove();
@@ -125,7 +166,7 @@ WebInspector.BreakpointItem.prototype = {
{
this._breakpoint.enabled = !this._breakpoint.enabled;
- // without this, we'd switch to the source of the clicked breakpoint
+ // Breakpoint element may have it's own click handler.
event.stopPropagation();
},
@@ -133,6 +174,10 @@ WebInspector.BreakpointItem.prototype = {
{
var checkbox = this._element.firstChild;
checkbox.checked = this._breakpoint.enabled;
+ },
+
+ _breakpointClicked: function(event)
+ {
}
}
@@ -155,15 +200,6 @@ WebInspector.JSBreakpointItem = function(breakpoint)
}
WebInspector.JSBreakpointItem.prototype = {
- compareTo: function(other)
- {
- if (this._breakpoint.url != other._breakpoint.url)
- return this._breakpoint.url < other._breakpoint.url ? -1 : 1;
- if (this._breakpoint.line != other._breakpoint.line)
- return this._breakpoint.line < other._breakpoint.line ? -1 : 1;
- return 0;
- },
-
_breakpointClicked: function()
{
WebInspector.panels.scripts.showSourceLine(this._breakpoint.url, this._breakpoint.line);
@@ -191,13 +227,6 @@ WebInspector.DOMBreakpointItem = function(breakpoint)
}
WebInspector.DOMBreakpointItem.prototype = {
- compareTo: function(other)
- {
- if (this._breakpoint.type != other._breakpoint.type)
- return this._breakpoint.type < other._breakpoint.type ? -1 : 1;
- return 0;
- },
-
_breakpointClicked: function()
{
WebInspector.updateFocusedNode(this._breakpoint.nodeId);
@@ -205,3 +234,13 @@ WebInspector.DOMBreakpointItem.prototype = {
}
WebInspector.DOMBreakpointItem.prototype.__proto__ = WebInspector.BreakpointItem.prototype;
+
+WebInspector.XHRBreakpointItem = function(breakpoint)
+{
+ WebInspector.BreakpointItem.call(this, breakpoint);
+
+ var label = document.createTextNode(this._breakpoint.formatLabel());
+ this._element.appendChild(label);
+}
+
+WebInspector.XHRBreakpointItem.prototype.__proto__ = WebInspector.BreakpointItem.prototype;
diff --git a/WebCore/inspector/front-end/CallStackSidebarPane.js b/WebCore/inspector/front-end/CallStackSidebarPane.js
index 2c45b14..6212ea1 100644
--- a/WebCore/inspector/front-end/CallStackSidebarPane.js
+++ b/WebCore/inspector/front-end/CallStackSidebarPane.js
@@ -28,6 +28,11 @@ WebInspector.CallStackSidebarPane = function()
WebInspector.SidebarPane.call(this, WebInspector.UIString("Call Stack"));
}
+WebInspector.CallStackSidebarPane.DebuggerEventType = {
+ DOMBreakpoint: 0,
+ NativeBreakpoint: 1
+};
+
WebInspector.CallStackSidebarPane.prototype = {
update: function(callFrames, sourceIDMap)
{
@@ -85,34 +90,38 @@ WebInspector.CallStackSidebarPane.prototype = {
updateStatus: function(eventType, eventData)
{
var statusElement = document.createElement("div");
- statusElement.className = "info";
-
- var breakpoint = eventData.breakpoint;
- var substitutions = [WebInspector.DOMBreakpoint.labelForType(breakpoint.type), WebInspector.panels.elements.linkifyNodeById(breakpoint.nodeId)];
- var formatters = {
- s: function(substitution)
+ if (eventType === WebInspector.CallStackSidebarPane.DebuggerEventType.DOMBreakpoint) {
+ var breakpoint = eventData.breakpoint;
+ var substitutions = [WebInspector.DOMBreakpoint.labelForType(breakpoint.type), WebInspector.panels.elements.linkifyNodeById(breakpoint.nodeId)];
+ var formatters = {
+ s: function(substitution)
+ {
+ return substitution;
+ }
+ };
+ function append(a, b)
{
- return substitution;
+ if (typeof b === "string")
+ b = document.createTextNode(b);
+ statusElement.appendChild(b);
}
- };
- function append(a, b)
- {
- if (typeof b === "string")
- b = document.createTextNode(b);
- statusElement.appendChild(b);
- }
- if (breakpoint.type === WebInspector.DOMBreakpoint.Types.SubtreeModified) {
- var targetNode = WebInspector.panels.elements.linkifyNodeById(eventData.targetNodeId);
- if (eventData.insertion) {
- if (eventData.targetNodeId !== breakpoint.nodeId)
- WebInspector.formatLocalized("Paused on a \"%s\" breakpoint set on %s, because a new child was added to its descendant %s.", substitutions.concat(targetNode), formatters, "", append);
- else
- WebInspector.formatLocalized("Paused on a \"%s\" breakpoint set on %s, because a new child was added to that node.", substitutions, formatters, "", append);
+ if (breakpoint.type === WebInspector.DOMBreakpoint.Types.SubtreeModified) {
+ var targetNode = WebInspector.panels.elements.linkifyNodeById(eventData.targetNodeId);
+ if (eventData.insertion) {
+ if (eventData.targetNodeId !== breakpoint.nodeId)
+ WebInspector.formatLocalized("Paused on a \"%s\" breakpoint set on %s, because a new child was added to its descendant %s.", substitutions.concat(targetNode), formatters, "", append);
+ else
+ WebInspector.formatLocalized("Paused on a \"%s\" breakpoint set on %s, because a new child was added to that node.", substitutions, formatters, "", append);
+ } else
+ WebInspector.formatLocalized("Paused on a \"%s\" breakpoint set on %s, because its descendant %s was removed.", substitutions.concat(targetNode), formatters, "", append);
} else
- WebInspector.formatLocalized("Paused on a \"%s\" breakpoint set on %s, because its descendant %s was removed.", substitutions.concat(targetNode), formatters, "", append);
- } else
- WebInspector.formatLocalized("Paused on a \"%s\" breakpoint set on %s.", substitutions, formatters, "", append);
+ WebInspector.formatLocalized("Paused on a \"%s\" breakpoint set on %s.", substitutions, formatters, "", append);
+ } else if (eventType === WebInspector.CallStackSidebarPane.DebuggerEventType.NativeBreakpoint && eventData.type === "XHR")
+ statusElement.appendChild(document.createTextNode(WebInspector.UIString("Paused on XMLHttpRequest.")));
+ else
+ return;
+ statusElement.className = "info";
this.bodyElement.appendChild(statusElement);
},
diff --git a/WebCore/inspector/front-end/DOMAgent.js b/WebCore/inspector/front-end/DOMAgent.js
index ceaa708..279852e 100644
--- a/WebCore/inspector/front-end/DOMAgent.js
+++ b/WebCore/inspector/front-end/DOMAgent.js
@@ -874,6 +874,13 @@ WebInspector.DOMBreakpoint.prototype = {
this.dispatchEventToListeners("enable-changed");
},
+ compareTo: function(other)
+ {
+ if (this.type != other.type)
+ return this.type < other.type ? -1 : 1;
+ return 0;
+ },
+
remove: function()
{
if (this.enabled)
diff --git a/WebCore/inspector/front-end/Images/paneAddButtons.png b/WebCore/inspector/front-end/Images/paneAddButtons.png
new file mode 100644
index 0000000..f1c0047
Binary files /dev/null and b/WebCore/inspector/front-end/Images/paneAddButtons.png differ
diff --git a/WebCore/inspector/front-end/ScriptsPanel.js b/WebCore/inspector/front-end/ScriptsPanel.js
index aa6d2b7..6642db8 100644
--- a/WebCore/inspector/front-end/ScriptsPanel.js
+++ b/WebCore/inspector/front-end/ScriptsPanel.js
@@ -104,7 +104,6 @@ WebInspector.ScriptsPanel = function()
this.sidebarButtonsElement.appendChild(this.stepOutButton);
this.toggleBreakpointsButton = new WebInspector.StatusBarButton(WebInspector.UIString("Deactivate all breakpoints."), "toggle-breakpoints");
- // Breakpoints should be activated by default, so emulate a click to toggle on.
this.toggleBreakpointsButton.toggled = true;
this.toggleBreakpointsButton.addEventListener("click", this.toggleBreakpointsClicked.bind(this), false);
this.sidebarButtonsElement.appendChild(this.toggleBreakpointsButton.element);
@@ -136,6 +135,8 @@ WebInspector.ScriptsPanel = function()
if (Preferences.nativeInstrumentationEnabled) {
this.sidebarPanes.domBreakpoints = WebInspector.createDOMBreakpointsSidebarPane();
this.sidebarPanes.domBreakpoints.expanded = true;
+ this.sidebarPanes.xhrBreakpoints = WebInspector.createXHRBreakpointsSidebarPane();
+ this.sidebarPanes.xhrBreakpoints.expanded = true;
}
this.sidebarPanes.workers = new WebInspector.WorkersSidebarPane();
@@ -468,8 +469,10 @@ WebInspector.ScriptsPanel.prototype = {
this.sidebarPanes.watchExpressions.refreshExpressions();
if (!preserveItems) {
this.sidebarPanes.jsBreakpoints.reset();
- if (Preferences.nativeInstrumentationEnabled)
+ if (Preferences.nativeInstrumentationEnabled) {
this.sidebarPanes.domBreakpoints.reset();
+ this.sidebarPanes.xhrBreakpoints.reset();
+ }
this.sidebarPanes.workers.reset();
}
},
diff --git a/WebCore/inspector/front-end/WebKit.qrc b/WebCore/inspector/front-end/WebKit.qrc
index 8593c2a..4c66a47 100644
--- a/WebCore/inspector/front-end/WebKit.qrc
+++ b/WebCore/inspector/front-end/WebKit.qrc
@@ -164,6 +164,7 @@
<file>Images/largerResourcesButtonGlyph.png</file>
<file>Images/localStorage.png</file>
<file>Images/nodeSearchButtonGlyph.png</file>
+ <file>Images/paneAddButtons.png</file>
<file>Images/paneBottomGrow.png</file>
<file>Images/paneBottomGrowActive.png</file>
<file>Images/paneGrowHandleLine.png</file>
diff --git a/WebCore/inspector/front-end/inspector.css b/WebCore/inspector/front-end/inspector.css
index 6d8571c..56c5040 100644
--- a/WebCore/inspector/front-end/inspector.css
+++ b/WebCore/inspector/front-end/inspector.css
@@ -1677,6 +1677,29 @@ li.editing .swatch, li.editing .enabled-button, li.editing-sub-part .delete-but
color: black;
}
+.pane > .title > button.add {
+ float: right;
+ width: 23px;
+ height: 17px;
+ color: transparent;
+ background-color: transparent;
+ border: none;
+ background-image: url(Images/paneAddButtons.png);
+ background-repeat: no-repeat;
+ margin: 1px 0 0 0;
+ padding: 0;
+ -webkit-border-radius: 0;
+ -webkit-appearance: none;
+}
+
+.pane > .title > button.add:hover {
+ background-position: -23px 0px;
+}
+
+.pane > .title > button.add:active {
+ background-position: -46px 0px;
+}
+
.pane > .body {
position: relative;
display: none;
@@ -1701,6 +1724,14 @@ li.editing .swatch, li.editing .enabled-button, li.editing-sub-part .delete-but
display: block;
}
+.pane > .body .breakpoint-condition {
+ display: block;
+ margin-top: 4px;
+ margin-bottom: 4px;
+ margin-left: 25px;
+ margin-right: 10px;
+}
+
.pane.expanded:nth-last-of-type(1) {
border-bottom: 1px solid rgb(189, 189, 189);
}
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index 3e68d44..fe02cf4 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -219,6 +219,17 @@ var WebInspector = {
return pane;
},
+ createXHRBreakpointsSidebarPane: function()
+ {
+ var pane = new WebInspector.XHRBreakpointsSidebarPane();
+ function breakpointAdded(event)
+ {
+ pane.addBreakpoint(new WebInspector.XHRBreakpointItem(event.data));
+ }
+ WebInspector.breakpointManager.addEventListener("xhr-breakpoint-added", breakpointAdded);
+ return pane;
+ },
+
_createPanels: function()
{
var hiddenPanels = (InspectorFrontendHost.hiddenPanels() || "").split(',');
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list