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

Side by Side Diff: Source/devtools/front_end/source_frame/GoToLineDialog.js

Issue 367093003: DevTools: More code reduce via using document.createElementWithClass and document.createChild. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 19 matching lines...) Expand all
30 30
31 /** 31 /**
32 * @constructor 32 * @constructor
33 * @extends {WebInspector.DialogDelegate} 33 * @extends {WebInspector.DialogDelegate}
34 * @param {!WebInspector.SourceFrame} sourceFrame 34 * @param {!WebInspector.SourceFrame} sourceFrame
35 */ 35 */
36 WebInspector.GoToLineDialog = function(sourceFrame) 36 WebInspector.GoToLineDialog = function(sourceFrame)
37 { 37 {
38 WebInspector.DialogDelegate.call(this); 38 WebInspector.DialogDelegate.call(this);
39 39
40 this.element = document.createElement("div"); 40 this.element = document.createElementWithClass("div", "go-to-line-dialog");
41 this.element.className = "go-to-line-dialog";
42
43 this.element.createChild("label").textContent = WebInspector.UIString("Go to line: "); 41 this.element.createChild("label").textContent = WebInspector.UIString("Go to line: ");
44 42
45 this._input = this.element.createChild("input"); 43 this._input = this.element.createChild("input");
46 this._input.setAttribute("type", "text"); 44 this._input.setAttribute("type", "text");
47 this._input.setAttribute("size", 6); 45 this._input.setAttribute("size", 6);
48 46
49 this._goButton = this.element.createChild("button"); 47 this._goButton = this.element.createChild("button");
50 this._goButton.textContent = WebInspector.UIString("Go"); 48 this._goButton.textContent = WebInspector.UIString("Go");
51 this._goButton.addEventListener("click", this._onGoClick.bind(this), false); 49 this._goButton.addEventListener("click", this._onGoClick.bind(this), false);
52 50
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 this._sourceFrame.revealPosition(lineNumber, 0, true); 104 this._sourceFrame.revealPosition(lineNumber, 0, true);
107 }, 105 },
108 106
109 onEnter: function() 107 onEnter: function()
110 { 108 {
111 this._applyLineNumber(); 109 this._applyLineNumber();
112 }, 110 },
113 111
114 __proto__: WebInspector.DialogDelegate.prototype 112 __proto__: WebInspector.DialogDelegate.prototype
115 } 113 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/elements/Spectrum.js ('k') | Source/devtools/front_end/sources/TargetsToolbar.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698