<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [Content Extensions] Content blocking rules are not consulted for pings (<a ping>)"
href="https://bugs.webkit.org/show_bug.cgi?id=149873#c10">Comment # 10</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [Content Extensions] Content blocking rules are not consulted for pings (<a ping>)"
href="https://bugs.webkit.org/show_bug.cgi?id=149873">bug 149873</a>
from <span class="vcard"><a class="email" href="mailto:roop+webkit@roopc.net" title="Roopesh Chander <roop+webkit@roopc.net>"> <span class="fn">Roopesh Chander</span></a>
</span></b>
<pre>Thanks everyone for the encouraging feedback.
I didn't quite know earlier what the other 2 methods in PingLoader were doing. This is what I understand to be the purpose of the 3 methods:
1. loadImage(): Loading images in unload / beforeunload / pagehide handlers
2. sendPing(): Sending <a ping> pings
3. sendViolationReport(): Sending CSP violation / X-XSS-Protection reports
They all do different things, but they are all in PingLoader because all are fire-and-forget scenarios - we need not bother to wait for the response.
I can see that content blocking rules should be consulted for 1 & 2 definitely. I'm not sure about 3, but I'll submit a new patch that covers all 3 based on Alex's and Benjamin's comments.
(In reply to <a href="show_bug.cgi?id=149873#c8">comment #8</a>)
<span class="quote">> (In reply to <a href="show_bug.cgi?id=149873#c4">comment #4</a>)
> > I don't see how "css-display-none" can apply to pings.
> Making a request to a url (or trying to make a blocked request to a url)
> that matches a css-display-none rule should hide content on the page. This
> probably already works, but it would be a good test case to add.</span >
I don't understand this part.
Let's say we have a rule like this:
{
"trigger": { "url-filter": "ping_url" },
"action": { "type": "css-display-none", "selector": ".foo" }
}
Per my understanding, this rule says: When the frame URL matches "ping_url", add ".foo { display: none }" style to the stylesheet engine.
How would this rule affect any of the three fire-and-forget scenarios mentioned above? There wouldn't be any loaded webpage to apply the ".foo { display: none }" style, right?
Or are we talking about the case where the selector for a "css-display-none" rule is "a[ping='ping_url']"?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>