зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1732966 - [devtools] Fix using node picker on content element in MBT. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D126908
This commit is contained in:
Родитель
185e3c90b0
Коммит
557777fb27
|
@ -50,12 +50,6 @@ class NodePicker {
|
|||
* @return {Boolean}
|
||||
*/
|
||||
_isEventAllowed({ target, view }) {
|
||||
// Allow "non multiprocess" browser toolbox to inspect documents loaded in the parent
|
||||
// process (e.g. about:robots)
|
||||
if (view instanceof Ci.nsIDOMChromeWindow) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// If the picked node is a remote browser element, then we need to let the event through,
|
||||
// since there's a highlighter actor in that sub-frame also picking.
|
||||
// ⚠️ This means we will not handle events made on the padding area of the <browser>
|
||||
|
@ -67,6 +61,12 @@ class NodePicker {
|
|||
return false;
|
||||
}
|
||||
|
||||
// Allow "non multiprocess" browser toolbox to inspect documents loaded in the parent
|
||||
// process (e.g. about:robots)
|
||||
if (view instanceof Ci.nsIDOMChromeWindow) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return this._targetActor.windows.includes(view);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче