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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/components/DOMBreakpointsSidebarPane.js

Issue 2153153003: DevTools: remove dead code, disambiguate expand for sections. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lcean Created 4 years, 5 months 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 node.target().domdebuggerAgent().removeDOMBreakpoint(node.id, type); 341 node.target().domdebuggerAgent().removeDOMBreakpoint(node.id, type);
342 this._saveBreakpoints(); 342 this._saveBreakpoints();
343 }, 343 },
344 344
345 highlightBreakpoint: function(auxData) 345 highlightBreakpoint: function(auxData)
346 { 346 {
347 var breakpointId = this._createBreakpointId(auxData.nodeId, auxData.type ); 347 var breakpointId = this._createBreakpointId(auxData.nodeId, auxData.type );
348 var element = this._breakpointElements[breakpointId]; 348 var element = this._breakpointElements[breakpointId];
349 if (!element) 349 if (!element)
350 return; 350 return;
351 this.expand(); 351 this.expandPane();
352 element.classList.add("breakpoint-hit"); 352 element.classList.add("breakpoint-hit");
353 this._highlightedElement = element; 353 this._highlightedElement = element;
354 }, 354 },
355 355
356 clearBreakpointHighlight: function() 356 clearBreakpointHighlight: function()
357 { 357 {
358 if (this._highlightedElement) { 358 if (this._highlightedElement) {
359 this._highlightedElement.classList.remove("breakpoint-hit"); 359 this._highlightedElement.classList.remove("breakpoint-hit");
360 delete this._highlightedElement; 360 delete this._highlightedElement;
361 } 361 }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 } 446 }
447 447
448 /** 448 /**
449 * @constructor 449 * @constructor
450 * @extends {WebInspector.SidebarPane} 450 * @extends {WebInspector.SidebarPane}
451 * @param {!WebInspector.DOMBreakpointsSidebarPane} pane 451 * @param {!WebInspector.DOMBreakpointsSidebarPane} pane
452 * @param {!WebInspector.Panel} panel 452 * @param {!WebInspector.Panel} panel
453 */ 453 */
454 WebInspector.DOMBreakpointsSidebarPane.Proxy = function(pane, panel) 454 WebInspector.DOMBreakpointsSidebarPane.Proxy = function(pane, panel)
455 { 455 {
456 WebInspector.SidebarPane.call(this, pane.title()); 456 WebInspector.SidebarPane.call(this, WebInspector.UIString("DOM Breakpoints") );
457 this.registerRequiredCSS("components/breakpointsList.css"); 457 this.registerRequiredCSS("components/breakpointsList.css");
458 458
459 this._wrappedPane = pane; 459 this._wrappedPane = pane;
460 this._panel = panel; 460 this._panel = panel;
461 } 461 }
462 462
463 WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype = { 463 WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype = {
464 expand: function() 464 expandPane: function()
465 { 465 {
466 this._wrappedPane.expand(); 466 this._wrappedPane.expandPane();
467 }, 467 },
468 468
469 onContentReady: function() 469 onContentReady: function()
470 { 470 {
471 if (this._panel.isShowing()) 471 if (this._panel.isShowing())
472 this._reattachBody(); 472 this._reattachBody();
473 473
474 WebInspector.SidebarPane.prototype.onContentReady.call(this); 474 WebInspector.SidebarPane.prototype.onContentReady.call(this);
475 }, 475 },
476 476
477 wasShown: function() 477 wasShown: function()
478 { 478 {
479 WebInspector.SidebarPane.prototype.wasShown.call(this); 479 WebInspector.SidebarPane.prototype.wasShown.call(this);
480 this._reattachBody(); 480 this._reattachBody();
481 }, 481 },
482 482
483 _reattachBody: function() 483 _reattachBody: function()
484 { 484 {
485 if (this._wrappedPane.element.parentNode !== this.element) 485 if (this._wrappedPane.element.parentNode !== this.element)
486 this._wrappedPane.show(this.element); 486 this._wrappedPane.show(this.element);
487 }, 487 },
488 488
489 __proto__: WebInspector.SidebarPane.prototype 489 __proto__: WebInspector.SidebarPane.prototype
490 } 490 }
491 491
492 /** 492 /**
493 * @type {!WebInspector.DOMBreakpointsSidebarPane} 493 * @type {!WebInspector.DOMBreakpointsSidebarPane}
494 */ 494 */
495 WebInspector.domBreakpointsSidebarPane; 495 WebInspector.domBreakpointsSidebarPane;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698