Bug 137611 - AdBlock changes the DOM layout and breaks frameset rendering
Summary: AdBlock changes the DOM layout and breaks frameset rendering
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 3.5
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 134406 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-11-20 11:57 UTC by Apollon Oikonomopoulos
Modified: 2012-06-18 18:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Apollon Oikonomopoulos 2006-11-20 11:57:40 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Unspecified Linux
Compiler:          gcc 4.1.1 
OS:                Linux

Suppose there is a webpage with the following html code:

!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
   "http://www.w3.org/TR/html4/frameset.dtd">
<HTML>
<HEAD>
<TITLE>A title here</TITLE>
</HEAD>
<FRAMESET rows="42,*">
        <FRAME src="banner1.html">
        <FRAME src="content.html">
        <NOFRAMES>
            <p>This page uses frames, but your browser doesn't support them.</p>
        </NOFRAMES>
</FRAMESET>
</HTML>

This page would normaly have a 42px-high frame on top, displaying banner1.html and another underneath it, spanning the rest of the screen's height. However, if you have a rule in AdBlock blocking - say - *banner?*, konqueror seems to discard the whole element (<FRAME src="banner1.html"> in our case) from the DOM. This means that for khtml the frameset only contains "content.html", which is treated as the first frame and rendered in the upper frame of the frameset. This leads to a malformed rendering of the page, since contents.html is rendered in the 42px-high area destined for banner1.html. IMHO it would be a much more senseful approach to set the src property of the offending frame to NULL, instead of discarding the whole element.

As a side-note i would like to add that both frames are actually visible in the DOM Tree viewer (I suppose the DOM viewer gets the pre-AdBlock DOM).

As a "live" demonstration, you can visit http://www.poseidon.ncmr.gr/greek/weather_forecast.html (beware, it's in Greek) and then set an AdBlock filter for *banner?* and reload the page.
Comment 1 Ivor Hewitt 2006-11-23 02:13:40 UTC
*** Bug 134406 has been marked as a duplicate of this bug. ***
Comment 2 Médéric Boquien 2008-05-18 20:27:56 UTC
Thank you for the bug report. It appears the KDE SVN trunk (r809157) exhibits the correct behaviour now.
Comment 3 Myriam Schweingruber 2012-06-18 18:18:22 UTC
Closing based on comment #2