[Rejected] Future of "Collapse blocked elements" o

Various discussions related to Adblock Plus development
Locked
Wladimir Palant

[Rejected] Future of "Collapse blocked elements" o

Post by Wladimir Palant »

I recently (re-)discovered that "collapse blocked elements" is the default in Firefox 3. The browser will already do what Adblock Plus had to do "manually" so far, blocked elements will get the "display:none" style automatically. This means that I will be able to remove ugly and problematic code that does the collapsing in Adblock Plus right now. The new code won't work in Firefox 2 which means that I will do this change only once ~90% of the users switched to Firefox 3 (fortunately, AMO gives me that info now).

Now what should happen to the "collapse blocked elements" option? Browser's "display:none" can be overridden by the web page. So I see three alternatives right now:

1. "Collapse blocked elements" option stays and switches on "extra strong collapsing" - one that the web page cannot override. Disadvantages: flipping this option will not show any real effect, generally its usefulness will be very limited since websites have little reason to force blocked elements to occupy space.

2. Adblock Plus always makes sure that the web page cannot override "display:none" for blocked elements, without any options.

3. We just say that browser's default is good enough for us and Adblock Plus shouldn't do anything in addition.

Note that it won't be possible to target individual elements, so "only do the extra strong collapsing if the filter has a $collapse option" won't work.

I tend towards the third option since I don't see what a website would gain from overriding browser's default - other than preventing its layout from breaking, in which case we should let it override.

Opinions?
Last edited by Wladimir Palant on Fri Apr 24, 2009 8:10 pm, edited 1 time in total.
Ares2
Posts: 1275
Joined: Fri Feb 15, 2008 12:47 pm

Re: Future of "Collapse blocked elements" option

Post by Ares2 »

Wladimir Palant wrote:I recently (re-)discovered that "collapse blocked elements" is the default in Firefox 3. The browser will already do what Adblock Plus had to do "manually" so far, blocked elements will get the "display:none" style automatically.
Should this already work if I disable the option in FF 3.0b4 or is this a new function (trunk)?
Wladimir Palant

Post by Wladimir Palant »

No, not a new function at all - introduced two years ago. So if you disable "Collapse blocked items" in any Firefox 3 beta you should already see this feature at work.
Ares2
Posts: 1275
Joined: Fri Feb 15, 2008 12:47 pm

Post by Ares2 »

Just want to be sure :wink: . So here are some quick examples where it doesn't work without the option (and won't break the layout if collapsed).

Example 1 - Shows a broken image where the counter was if you block .tophits4u.

Example 2 - Some ads covered in iframes leave white spaces without the option

Example 3 - Same here: Ads in iframes blocked, but the frames are not hidden

=> I don't like option 3. :roll:
Wladimir Palant

Post by Wladimir Palant »

Ok, I guess I should have checked a little more. Apparently, the browser will only hide if the content policy claims to reject based on the server - and then only for some HTML tags (img, input, object, embed, applet).

I changed Adblock Plus to trigger this feature and uploaded a new development build to http://adblockplus.org/devbuilds/ - please check whether Option 3 is viable now. And I'll file a bug about frames not being collapsed.
IceDogg
Posts: 909
Joined: Fri Jun 09, 2006 11:22 pm

Post by IceDogg »

Ok on Cybernet new the bottom sponsors on the right hand side doesn't collapse if I don't check that option.

Firefox: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b5pre) Gecko/2008032505 Minefield/3.0b5pre

ABP: ...2008032513 (I updated just before finding this to the latest dev build)
Wladimir Palant

Post by Wladimir Palant »

Yes, that's because it is a frame - I already filed bug 424970 on that.
IceDogg
Posts: 909
Joined: Fri Jun 09, 2006 11:22 pm

Post by IceDogg »

Ok, I read over it again and I misunderstood what you had said before. My mistake. Thanks for your reply and not pointing out my oversight. :)
Ares2
Posts: 1275
Joined: Fri Feb 15, 2008 12:47 pm

Post by Ares2 »

Wladimir Palant wrote:I changed Adblock Plus to trigger this feature and uploaded a new development build to http://adblockplus.org/devbuilds/ - please check whether Option 3 is viable now. And I'll file a bug about frames not being collapsed.
So I will have to wait for the bug being fixed until I can change my mind. :)
shareasus
Posts: 1
Joined: Fri Feb 06, 2009 9:38 am
Contact:

Post by shareasus »

Is there any "collapse blocked elements" default in Firefox 3? Think not.
Wladimir Palant

Post by Wladimir Palant »

There is - Firefox 3 will collapse the elements even if Adblock Plus doesn't do it ("collapse blocked elements" is off). This doesn't work for frames however.
Wladimir Palant

Post by Wladimir Palant »

My impression in the end - the change in Firefox is meant to solve a different problem and isn't a good match for Adblock Plus. So "Collapse blocked elements" should stay for now.
Locked