Bug 146884

Summary: iOS 9 Beta 3 Content Blocker Extension - Enable CSS Display Inline
Product: WebKit Reporter: Dean Murphy <deano.uk>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Enhancement CC: achristensen, benjamin, bfulgham, deano.uk
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: iPhone / iPad   
OS: Other   

Description Dean Murphy 2015-07-11 15:20:16 PDT
Hi team,

I have been working to create a content blocker but have found that some websites hide content when they detect particular elements have been blocked by using "display: none" within the CSS on particular elements.

We have access to the selector css-display-none to hide our own elements, but it would be great if we can also have access to css-display-inline and/or css-display-block to un-hide elements.
Comment 1 Alex Christensen 2015-07-13 10:00:50 PDT
(In reply to comment #0)
> Hi team,
> 
> I have been working to create a content blocker but have found that some
> websites hide content when they detect particular elements have been blocked
> by using "display: none" within the CSS on particular elements.
Could you post or at least send me an example of this? Couldn't you just add rules to skip hiding those particular elements?
> 
> We have access to the selector css-display-none to hide our own elements,
> but it would be great if we can also have access to css-display-inline
> and/or css-display-block to un-hide elements.
I do think this might be useful, but I don't think that this would prevent websites from detecting if content has been blocked.
Comment 2 Benjamin Poulain 2015-07-13 13:02:22 PDT
(In reply to comment #1)
> > We have access to the selector css-display-none to hide our own elements,
> > but it would be great if we can also have access to css-display-inline
> > and/or css-display-block to un-hide elements.
> I do think this might be useful, but I don't think that this would prevent
> websites from detecting if content has been blocked.

We could also make CSSOM lie about the element. Reporting the display as if the user stylesheet was not installed.

But I don't think that would work either. There are many visible side effects to content blocker, they would just move on to the next one.

Dean, can you give us your example of website that break with your content blocker? If it cannot be shared publicly here, feel free to email it to Alex and myself.
Comment 3 Dean Murphy 2015-07-13 19:35:47 PDT
> Could you post or at least send me an example of this? Couldn't you just add
> rules to skip hiding those particular elements?

> > We have access to the selector css-display-none to hide our own elements,
> > but it would be great if we can also have access to css-display-inline
> > and/or css-display-block to un-hide elements.
> I do think this might be useful, but I don't think that this would prevent
> websites from detecting if content has been blocked.

Hi, I have emailed an example to both of you (Alex & Ben).
Comment 4 Brent Fulgham 2022-07-14 14:31:42 PDT
@Alex: Was there further action needed here?
Comment 5 Alex Christensen 2022-07-14 16:11:14 PDT
I don't recall.  I haven't seen other requests similar to this, though.