| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |