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

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

Issue 340513003: DevTools: Add JSDoc for static methods, fix JSDoc types and induced errors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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) 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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 break; 485 break;
486 486
487 curElement = curWindow.frameElement; 487 curElement = curWindow.frameElement;
488 curWindow = curWindow.parent; 488 curWindow = curWindow.parent;
489 } 489 }
490 490
491 return elementOffset; 491 return elementOffset;
492 } 492 }
493 493
494 /** 494 /**
495 * @param {!Window} targetWindow 495 * @param {!Window=} targetWindow
496 * @return {!AnchorBox} 496 * @return {!AnchorBox}
497 */ 497 */
498 Element.prototype.boxInWindow = function(targetWindow) 498 Element.prototype.boxInWindow = function(targetWindow)
499 { 499 {
500 targetWindow = targetWindow || this.ownerDocument.defaultView; 500 targetWindow = targetWindow || this.ownerDocument.defaultView;
501 501
502 var anchorBox = this.offsetRelativeToWindow(window); 502 var anchorBox = this.offsetRelativeToWindow(window);
503 anchorBox.width = Math.min(this.offsetWidth, window.innerWidth - anchorBox.x ); 503 anchorBox.width = Math.min(this.offsetWidth, window.innerWidth - anchorBox.x );
504 anchorBox.height = Math.min(this.offsetHeight, window.innerHeight - anchorBo x.y); 504 anchorBox.height = Math.min(this.offsetHeight, window.innerHeight - anchorBo x.y);
505 505
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 */ 673 */
674 function isEnterKey(event) { 674 function isEnterKey(event) {
675 // Check if in IME. 675 // Check if in IME.
676 return event.keyCode !== 229 && event.keyIdentifier === "Enter"; 676 return event.keyCode !== 229 && event.keyIdentifier === "Enter";
677 } 677 }
678 678
679 function consumeEvent(e) 679 function consumeEvent(e)
680 { 680 {
681 e.consume(); 681 e.consume();
682 } 682 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698