Skip to content
Permalink
Browse files
Web Inspector: DOM Debugger: remove left padding when the last DOM br…
…eakpoint is removed

https://bugs.webkit.org/show_bug.cgi?id=195522

Reviewed by Matt Baker.

* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView.prototype._updateBreakpointStatus):
* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype.get hasBreakpoint): Added.


Canonical link: https://commits.webkit.org/209939@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
dcrousso committed Mar 12, 2019
1 parent 9eda92a commit 92eb2b108a800d5b8e5fc5adc287dc750c4ed188
Showing 3 changed files with 24 additions and 7 deletions.
@@ -1,3 +1,15 @@
2019-03-12 Devin Rousso <drousso@apple.com>

Web Inspector: DOM Debugger: remove left padding when the last DOM breakpoint is removed
https://bugs.webkit.org/show_bug.cgi?id=195522

Reviewed by Matt Baker.

* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView.prototype._updateBreakpointStatus):
* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype.get hasBreakpoint): Added.

2019-03-12 Devin Rousso <drousso@apple.com>

Web Inspector: Canvas: export recording as HTML
@@ -771,15 +771,15 @@ WI.DOMTreeContentView = class DOMTreeContentView extends WI.ContentView
}

let breakpoints = WI.domDebuggerManager.domBreakpointsForNode(domNode);
if (!breakpoints.length) {
if (breakpoints.length) {
if (breakpoints.some((item) => item.disabled))
treeElement.breakpointStatus = WI.DOMTreeElement.BreakpointStatus.DisabledBreakpoint;
else
treeElement.breakpointStatus = WI.DOMTreeElement.BreakpointStatus.Breakpoint;
} else
treeElement.breakpointStatus = WI.DOMTreeElement.BreakpointStatus.None;
return;
}

this.breakpointGutterEnabled = true;

let disabled = breakpoints.some((item) => item.disabled);
treeElement.breakpointStatus = disabled ? WI.DOMTreeElement.BreakpointStatus.DisabledBreakpoint : WI.DOMTreeElement.BreakpointStatus.Breakpoint;
this.breakpointGutterEnabled = this._domTreeOutline.children.some((child) => child.hasBreakpoint);
}

_restoreBreakpointsAfterUpdate()
@@ -72,6 +72,11 @@ WI.DOMTreeElement = class DOMTreeElement extends WI.TreeElement

// Public

get hasBreakpoint()
{
return this._breakpointStatus !== WI.DOMTreeElement.BreakpointStatus.None || this._subtreeBreakpointCount > 0;
}

get breakpointStatus()
{
return this._breakpointStatus;

0 comments on commit 92eb2b1

Please sign in to comment.