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

Side by Side Diff: Source/devtools/front_end/common/DOMExtension.js

Issue 362273002: DevTools: Reduce code 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/resources/ResourcesPanel.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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 { 432 {
433 return this.totalOffset().left; 433 return this.totalOffset().left;
434 } 434 }
435 435
436 /** 436 /**
437 * @return {number} 437 * @return {number}
438 */ 438 */
439 Element.prototype.totalOffsetTop = function() 439 Element.prototype.totalOffsetTop = function()
440 { 440 {
441 return this.totalOffset().top; 441 return this.totalOffset().top;
442
443 } 442 }
444 443
445 /** 444 /**
446 * @return {!{left: number, top: number}} 445 * @return {!{left: number, top: number}}
447 */ 446 */
448 Element.prototype.totalOffset = function() 447 Element.prototype.totalOffset = function()
449 { 448 {
450 var rect = this.getBoundingClientRect(); 449 var rect = this.getBoundingClientRect();
451 return { left: rect.left, top: rect.top }; 450 return { left: rect.left, top: rect.top };
452 } 451 }
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 */ 743 */
745 function isEnterKey(event) { 744 function isEnterKey(event) {
746 // Check if in IME. 745 // Check if in IME.
747 return event.keyCode !== 229 && event.keyIdentifier === "Enter"; 746 return event.keyCode !== 229 && event.keyIdentifier === "Enter";
748 } 747 }
749 748
750 function consumeEvent(e) 749 function consumeEvent(e)
751 { 750 {
752 e.consume(); 751 e.consume();
753 } 752 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/resources/ResourcesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698