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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/dom_extension/DOMExtension.js

Issue 2702523003: [DevTools] Continue GlassPane refactoring. (Closed)
Patch Set: element Created 3 years, 10 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
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 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 var root = this.target && this.target.getComponentRoot(); 751 var root = this.target && this.target.getComponentRoot();
752 return root ? root.deepElementFromPoint(this.pageX, this.pageY) : null; 752 return root ? root.deepElementFromPoint(this.pageX, this.pageY) : null;
753 }; 753 };
754 754
755 /** 755 /**
756 * @param {number} x 756 * @param {number} x
757 * @param {number} y 757 * @param {number} y
758 * @return {?Node} 758 * @return {?Node}
759 */ 759 */
760 Document.prototype.deepElementFromPoint = function(x, y) { 760 Document.prototype.deepElementFromPoint = function(x, y) {
761 var node = this.elementFromPoint(x, y); 761 var container = this;
762 while (node && node.shadowRoot) 762 var node = null;
763 node = node.shadowRoot.elementFromPoint(x, y); 763 while (container) {
764 var innerNode = container.elementFromPoint(x, y);
765 if (!innerNode)
766 break;
767 node = innerNode;
768 container = node.shadowRoot;
769 }
764 return node; 770 return node;
765 }; 771 };
766 772
767 DocumentFragment.prototype.deepElementFromPoint = Document.prototype.deepElement FromPoint; 773 DocumentFragment.prototype.deepElementFromPoint = Document.prototype.deepElement FromPoint;
768 774
769 /** 775 /**
770 * @return {?Element} 776 * @return {?Element}
771 */ 777 */
772 Document.prototype.deepActiveElement = function() { 778 Document.prototype.deepActiveElement = function() {
773 var activeElement = this.activeElement; 779 var activeElement = this.activeElement;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 return event.keyCode !== 229 && event.key === 'Enter'; 811 return event.keyCode !== 229 && event.key === 'Enter';
806 } 812 }
807 813
808 /** 814 /**
809 * @param {!Event} event 815 * @param {!Event} event
810 * @return {boolean} 816 * @return {boolean}
811 */ 817 */
812 function isEscKey(event) { 818 function isEscKey(event) {
813 return event.keyCode === 27; 819 return event.keyCode === 27;
814 } 820 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/BUILD.gn ('k') | third_party/WebKit/Source/devtools/front_end/main/Main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698