we need the body as anchor for relative CSS rules

This commit is contained in:
gorhill 2015-03-19 12:54:17 -04:00
parent aa9bea2e76
commit 99774f4d19
1 changed files with 1 additions and 1 deletions

View File

@ -446,7 +446,7 @@ var cosmeticFilterFromElement = function(elem, out) {
var filtersFromElement = function(elem) { var filtersFromElement = function(elem) {
netFilterCandidates.length = 0; netFilterCandidates.length = 0;
cosmeticFilterCandidates.length = 0; cosmeticFilterCandidates.length = 0;
while ( elem && elem !== document.body ) { while ( elem && elem !== document.documentElement ) {
netFilterFromElement(elem, netFilterCandidates); netFilterFromElement(elem, netFilterCandidates);
cosmeticFilterFromElement(elem, cosmeticFilterCandidates); cosmeticFilterFromElement(elem, cosmeticFilterCandidates);
elem = elem.parentNode; elem = elem.parentNode;