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

Side by Side Diff: Source/devtools/front_end/common/DOMExtension.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
« no previous file with comments | « no previous file | Source/devtools/front_end/components/FlameChart.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 */ 419 */
420 Element.prototype.createTextChildren = function(var_args) 420 Element.prototype.createTextChildren = function(var_args)
421 { 421 {
422 for (var i = 0, n = arguments.length; i < n; ++i) 422 for (var i = 0, n = arguments.length; i < n; ++i)
423 this.createTextChild(arguments[i]); 423 this.createTextChild(arguments[i]);
424 } 424 }
425 425
426 DocumentFragment.prototype.createTextChildren = Element.prototype.createTextChil dren; 426 DocumentFragment.prototype.createTextChildren = Element.prototype.createTextChil dren;
427 427
428 /** 428 /**
429 * @param {...!Element} var_args
430 */
431 Element.prototype.appendChildren = function(var_args)
432 {
433 for (var i = 0, n = arguments.length; i < n; ++i)
434 this.appendChild(arguments[i]);
435 }
436
437 /**
429 * @return {number} 438 * @return {number}
430 */ 439 */
431 Element.prototype.totalOffsetLeft = function() 440 Element.prototype.totalOffsetLeft = function()
432 { 441 {
433 return this.totalOffset().left; 442 return this.totalOffset().left;
434 } 443 }
435 444
436 /** 445 /**
437 * @return {number} 446 * @return {number}
438 */ 447 */
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 */ 752 */
744 function isEnterKey(event) { 753 function isEnterKey(event) {
745 // Check if in IME. 754 // Check if in IME.
746 return event.keyCode !== 229 && event.keyIdentifier === "Enter"; 755 return event.keyCode !== 229 && event.keyIdentifier === "Enter";
747 } 756 }
748 757
749 function consumeEvent(e) 758 function consumeEvent(e)
750 { 759 {
751 e.consume(); 760 e.consume();
752 } 761 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/components/FlameChart.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698