AdguardTeam / AdguardTeam/CoreLibs

Generic cosmetic rules are not applied to some iframes

Đang mở
#1,721 6 bình luận 0 reaction 0 người được giao Xem trên GitHub
Priority: P4 Resolution: Done Status: Done
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
52
Fork
10
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

It looks like the generic cosmetic rules are not applied if the `iframe` `height`/`width` is less than a certain value.

Steps to reproduce:
1. Add this rule:
```adblock
##h1
```
2. Go to - https://example.org/
3. Run in browser console:
```js
(() => {
const frame = document.createElement('iframe');
frame.src = 'https://example.com/';
frame.width = '500px';
frame.height = '200px';
document.body.appendChild(frame);
})();
```
`h1` element with text `Example Domain` should be hidden by this rule - `##h1`, but it doesn't work.
It seems that it works correctly if the value of `height` is greater than `200`, like `201`, or `width` is greater than `500`, like `501`.

Screenshots

![image](https://user-images.githubusercontent.com/29142494/214830968-7c395001-f258-4aae-89f2-c18217d35929.png)

![image](https://user-images.githubusercontent.com/29142494/214831000-8c902ebd-1148-43ec-b4d6-d1321b89777a.png)

AdGuard for Windows version 7.12 nightly 10 (build 4171, CL 1.10.189)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.