Summary: | Switching layer to invisible leaves artifacts | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Sebastian Kügler <sebas> |
Component: | khtml renderer | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 3.4.1 | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Shows the artifacts that are left |
Description
Sebastian Kügler
2005-07-26 01:33:21 UTC
Created attachment 11927 [details]
Shows the artifacts that are left
The layer is already gone again (mouse has moved away), but some of the menu
(it's created by using div's) is still there.
http://www.dhtmlcentral.com/projects/coolmenus/ is the source of these menus, and you can see the bug on that page as well. In the top menu bar, point to the right-most menu item (dhtmlcentral, 7 items high) and then move the mouse directly left to the "resources" menu (only 3 items high). Notice that the bottom four items of the menu that was just closed are still visible. After the last update, konqi doesn't crash anymore. Argh. Closed the wrong bug. :/ SVN commit 552596 by ggarand: .layers with clipping need a repaint with old style on style change .make RenderObject::setStyle a tad more efficient BUG: 109612 M +29 -22 render_object.cpp M +1 -0 render_style.h --- branches/KDE/3.5/kdelibs/khtml/rendering/render_object.cpp #552595:552596 @@ -1242,22 +1242,38 @@ //qDebug("m_style: %p new style, diff=%d", m_style, d); - if ( d == RenderStyle::Visible && m_parent && m_style && - m_style->outlineWidth() > style->outlineWidth() ) - repaint(); + if (m_style) { + if ( d >= RenderStyle::Visible && !isText() && m_parent && + ( m_style->outlineWidth() > style->outlineWidth() || + ( m_style->hasClip() && !(m_style->clip() == style->clip()) ) ) ) { + // schedule a repaint with the old style + if (layer() && !isInlineFlow()) + layer()->repaint(); + else + repaint(); + } - if ( m_style && - ( ( isFloating() && m_style->floating() != style->floating() ) || - ( isPositioned() && m_style->position() != style->position() && - style->position() != ABSOLUTE && style->position() != FIXED ) ) ) - removeFromObjectLists(); + if ( ( isFloating() && m_style->floating() != style->floating() ) || + ( isPositioned() && m_style->position() != style->position() && + style->position() != ABSOLUTE && style->position() != FIXED ) ) + removeFromObjectLists(); - // reset style flags - m_floating = false; - m_positioned = false; - m_relPositioned = false; - m_paintBackground = false; + if ( layer() ) { + if ( ( m_style->hasAutoZIndex() != style->hasAutoZIndex() || + m_style->zIndex() != style->zIndex() || + m_style->visibility() != style->visibility() ) ) { + layer()->stackingContext()->dirtyZOrderLists(); + layer()->dirtyZOrderLists(); + } + } + // reset style flags + m_floating = false; + m_positioned = false; + m_relPositioned = false; + m_paintBackground = false; + } + // only honour z-index for non-static objects // ### and objects with opacity if ( style->position() == STATIC ) { @@ -1267,15 +1283,6 @@ style->setHasAutoZIndex(); } - if ( layer() && style && m_style ) { - if ( ( m_style->hasAutoZIndex() != style->hasAutoZIndex() || - m_style->zIndex() != style->zIndex() || - m_style->visibility() != style->visibility() ) ) { - layer()->stackingContext()->dirtyZOrderLists(); - layer()->dirtyZOrderLists(); - } - } - RenderStyle *oldStyle = m_style; m_style = style; --- branches/KDE/3.5/kdelibs/khtml/rendering/render_style.h #552595:552596 @@ -1089,6 +1089,7 @@ Length clipRight() const { return visual->clip.right; } Length clipTop() const { return visual->clip.top; } Length clipBottom() const { return visual->clip.bottom; } + LengthBox clip() const { return visual->clip; } bool hasClip() const { return noninherited_flags.f._hasClip; } EUnicodeBidi unicodeBidi() const { return noninherited_flags.f._unicodeBidi; } |