removal of display-sanity checking

Dirk Mueller mueller at kde.org
Sun Nov 2 15:38:26 CET 2003


On Saturday 25 October 2003 23:19, David Hyatt wrote:

> The root fixup is now done in cssstyleselector.cpp in
> adjustRenderStyle.  Since the fixup for the root element as specified
> in CSS2.1 is identical to the fixup done for floating/positioned
> elements, I consolidated all of that code in one place.

Ok. However I don't get why you added this code to RenderBox::setStyle():

    // Frames and framesets never honor position:relative or 
position:absolute.  This is necessary to
    // fix a crash where a site tries to position these objects.
    if (element() && (element()->id() == ID_FRAME || element()->id() == 
ID_FRAMESET)) {
        setPositioned(false);
        setRelPositioned(false);
    }
    

A general rule was that id() checks never crop up in the rendering/ tree, to 
keep the code clean. 

Why was this not moved to adjustRenderStyle, similiar to: 

    if (e->id() == ID_FRAME || e->id() == ID_FRAMESET)
        style->setPosition( STATIC );

-- 
> Looking for a KDE-related EMail-Alias ? Get one at kdemail.net for FREE! <


More information about the Khtml-devel mailing list