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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/screencast/ScreencastView.js

Issue 2763913002: Allow DOM.getNodeForLocation to skip to nearest non-shadow ancestor (Closed)
Patch Set: Use Common.moduleSettings value to in/exclude UA shadow dom Created 3 years, 9 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 this._simulateTouchForMouseEvent(event); 224 this._simulateTouchForMouseEvent(event);
225 event.preventDefault(); 225 event.preventDefault();
226 if (event.type === 'mousedown') 226 if (event.type === 'mousedown')
227 this._canvasElement.focus(); 227 this._canvasElement.focus();
228 return; 228 return;
229 } 229 }
230 230
231 var position = this._convertIntoScreenSpace(event); 231 var position = this._convertIntoScreenSpace(event);
232 this._domModel.nodeForLocation( 232 this._domModel.nodeForLocation(
233 Math.floor(position.x / this._pageScaleFactor + this._scrollOffsetX), 233 Math.floor(position.x / this._pageScaleFactor + this._scrollOffsetX),
234 Math.floor(position.y / this._pageScaleFactor + this._scrollOffsetY), ca llback.bind(this)); 234 Math.floor(position.y / this._pageScaleFactor + this._scrollOffsetY),
235 Common.moduleSetting('showUAShadowDOM').get(), callback.bind(this));
peleg 2017/03/23 02:37:40 this works, but is there anywhere else we need to
pfeldman 2017/03/23 17:26:03 module dependencies are defined in module.json fil
235 236
236 /** 237 /**
237 * @param {?SDK.DOMNode} node 238 * @param {?SDK.DOMNode} node
238 * @this {Screencast.ScreencastView} 239 * @this {Screencast.ScreencastView}
239 */ 240 */
240 function callback(node) { 241 function callback(node) {
241 if (!node) 242 if (!node)
242 return; 243 return;
243 if (event.type === 'mousemove') { 244 if (event.type === 'mousemove') {
244 this.highlightDOMNode(node, this._inspectModeConfig); 245 this.highlightDOMNode(node, this._inspectModeConfig);
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 if (this._maxDisplayedProgress >= progress) 865 if (this._maxDisplayedProgress >= progress)
865 return; 866 return;
866 this._maxDisplayedProgress = progress; 867 this._maxDisplayedProgress = progress;
867 this._displayProgress(progress); 868 this._displayProgress(progress);
868 } 869 }
869 870
870 _displayProgress(progress) { 871 _displayProgress(progress) {
871 this._element.style.width = (100 * progress) + '%'; 872 this._element.style.width = (100 * progress) + '%';
872 } 873 }
873 }; 874 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698