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-07 16:21:30 +00:00
parent 8b82bb6134
commit 4726520941

View File

@ -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;