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

Side by Side Diff: Source/devtools/front_end/timeline/CountersGraph.js

Issue 662793002: [DevTools] Replace usages of document with custom functions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 } 518 }
519 } 519 }
520 520
521 521
522 /** 522 /**
523 * @constructor 523 * @constructor
524 * @extends {WebInspector.Object} 524 * @extends {WebInspector.Object}
525 */ 525 */
526 WebInspector.SwatchCheckbox = function(title, color) 526 WebInspector.SwatchCheckbox = function(title, color)
527 { 527 {
528 this.element = document.createElement("div"); 528 this.element = createElement("div");
529 this._swatch = this.element.createChild("div", "swatch"); 529 this._swatch = this.element.createChild("div", "swatch");
530 this.element.createChild("span", "title").textContent = title; 530 this.element.createChild("span", "title").textContent = title;
531 this._color = color; 531 this._color = color;
532 this.checked = true; 532 this.checked = true;
533 533
534 this.element.addEventListener("click", this._toggleCheckbox.bind(this), true ); 534 this.element.addEventListener("click", this._toggleCheckbox.bind(this), true );
535 } 535 }
536 536
537 WebInspector.SwatchCheckbox.Events = { 537 WebInspector.SwatchCheckbox.Events = {
538 Changed: "Changed" 538 Changed: "Changed"
(...skipping 15 matching lines...) Expand all
554 }, 554 },
555 555
556 _toggleCheckbox: function(event) 556 _toggleCheckbox: function(event)
557 { 557 {
558 this.checked = !this.checked; 558 this.checked = !this.checked;
559 this.dispatchEventToListeners(WebInspector.SwatchCheckbox.Events.Changed ); 559 this.dispatchEventToListeners(WebInspector.SwatchCheckbox.Events.Changed );
560 }, 560 },
561 561
562 __proto__: WebInspector.Object.prototype 562 __proto__: WebInspector.Object.prototype
563 } 563 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698