Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(862)

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/InlineBreakpoint.js

Issue 2500493003: [DevTools] make breakpoints better (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/ui/InlineBreakpoint.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/InlineBreakpoint.js b/third_party/WebKit/Source/devtools/front_end/ui/InlineBreakpoint.js
new file mode 100644
index 0000000000000000000000000000000000000000..811fa90aa420df1ac714c947f9073a95a077527e
--- /dev/null
+++ b/third_party/WebKit/Source/devtools/front_end/ui/InlineBreakpoint.js
@@ -0,0 +1,47 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @unrestricted
+ */
+WebInspector.InlineBreakpoint = class extends HTMLSpanElement {
+ constructor() {
+ super();
+ }
+
+ /**
+ * @return {!WebInspector.InlineBreakpoint}
+ */
+ static create() {
+ if (!WebInspector.InlineBreakpoint._constructor)
+ WebInspector.InlineBreakpoint._constructor =
+ registerCustomElement('span', 'inline-breakpoint', WebInspector.InlineBreakpoint.prototype);
+ return /** @type {!WebInspector.InlineBreakpoint} */ (new WebInspector.InlineBreakpoint._constructor());
+ }
+
+ setEnabled(enabled) {
+ if (!enabled)
+ this._swatchInner.classList.add('breakpoint-disabled');
+ else
+ this._swatchInner.classList.remove('breakpoint-disabled');
+ }
+
+ setConditional(conditional) {
+ // different type for never pause here (condition === "false")
+ if (conditional)
+ this._swatchInner.classList.add('inline-condition-breakpoint');
+ else
+ this._swatchInner.classList.remove('inline-condition-breakpoint');
+ }
+
+ /**
+ * @override
+ */
+ createdCallback() {
+ var root = WebInspector.createShadowRootWithCoreStyles(this, 'ui/inlineBreakpoint.css');
+ this._swatchInner = root.createChild('span', 'inline-breakpoint');
+ this._swatchInner.addEventListener('dblclick', (e) => e.consume(), false);
+ this._swatchInner.addEventListener('mousedown', (e) => e.consume(), false);
+ }
+};

Powered by Google App Engine
This is Rietveld 408576698