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 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 node = node.shadowRoot.elementFromPoint(this.pageX, this.pageY); | 925 node = node.shadowRoot.elementFromPoint(this.pageX, this.pageY); |
926 return node; | 926 return node; |
927 } | 927 } |
928 | 928 |
929 /** | 929 /** |
930 * @return {?Element} | 930 * @return {?Element} |
931 */ | 931 */ |
932 Event.prototype.deepActiveElement = function() | 932 Event.prototype.deepActiveElement = function() |
933 { | 933 { |
934 var activeElement = this.target && this.target.ownerDocument ? this.target.o
wnerDocument.activeElement : null; | 934 var activeElement = this.target && this.target.ownerDocument ? this.target.o
wnerDocument.activeElement : null; |
935 while (activeElement && activeElement.shadowRoot) | 935 while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot
.activeElement) |
936 activeElement = activeElement.shadowRoot.activeElement; | 936 activeElement = activeElement.shadowRoot.activeElement; |
937 return activeElement; | 937 return activeElement; |
938 } | 938 } |
939 | 939 |
940 /** | 940 /** |
941 * @param {number} x | 941 * @param {number} x |
942 * @param {number} y | 942 * @param {number} y |
943 * @return {?Node} | 943 * @return {?Node} |
944 */ | 944 */ |
945 Document.prototype.deepElementFromPoint = function(x, y) | 945 Document.prototype.deepElementFromPoint = function(x, y) |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 { | 987 { |
988 window.removeEventListener("DOMContentLoaded", windowLoaded, false); | 988 window.removeEventListener("DOMContentLoaded", windowLoaded, false); |
989 callback(); | 989 callback(); |
990 } | 990 } |
991 | 991 |
992 if (document.readyState === "complete" || document.readyState === "interacti
ve") | 992 if (document.readyState === "complete" || document.readyState === "interacti
ve") |
993 callback(); | 993 callback(); |
994 else | 994 else |
995 window.addEventListener("DOMContentLoaded", windowLoaded, false); | 995 window.addEventListener("DOMContentLoaded", windowLoaded, false); |
996 } | 996 } |
OLD | NEW |