Bug 1492582 - Use XUL inspector highlighter for HTML docs without scroll frames. r=bgrins

The devtools highlighter is broken with browser.xhtml when scroll frames
are disabled.

Differential Revision: https://phabricator.services.mozilla.com/D52104

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Brendan Dahl 2019-11-08 23:34:10 +00:00
Родитель a3a9d09976
Коммит a88f425e61
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -102,7 +102,14 @@ ClassList.prototype = {
* @return {Boolean}
*/
function isXUL(window) {
return window.document.documentElement.namespaceURI === XUL_NS;
// XXX: We temporarily return true for HTML documents if the document disables
// scroll frames since the regular highlighter is broken in this case. This
// should be removed when bug 1594587 is fixed.
return (
window.document.documentElement.namespaceURI === XUL_NS ||
(window.isChromeWindow &&
window.document.documentElement.getAttribute("scrolling") === "false")
);
}
exports.isXUL = isXUL;