[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.0/kdelibs/khtml/rendering
From: Germain Garand <germain () ebooksfrance ! org>
Date: 2008-03-12 8:42:15
Message-ID: 1205311335.965779.1241.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 784729 by ggarand:
automatically merged revision 784122:
ameliorate the algorithm computing z-order mask for external
widgets so that it also walk parent stacking contexts.
This should take care of all remaining cases of dhtml menus being
displayed behind Flash/Java widgets.
BUG: 158759
M +41 -4 render_layer.cpp
--- branches/KDE/4.0/kdelibs/khtml/rendering/render_layer.cpp #784728:784729
@@ -363,18 +363,55 @@
if (hasOverlaidWidgets() && !renderer()->canvas()->pagedMode()) {
updateZOrderLists();
uint count = m_posZOrderList ? m_posZOrderList->count() : 0;
- bool needUpdate = (count || !m_region.isEmpty());
+ bool needUpdate = false;
+ KHTMLView* sa = 0;
if (count) {
- KHTMLView* sa = m_object->element()->getDocument()->view();
+ sa = m_object->element()->getDocument()->view();
m_region = QRect(0,0,sa->contentsWidth(),sa->contentsHeight());
-
for (uint i = 0; i < count; i++) {
RenderLayer* child = m_posZOrderList->at(i);
if (child->zIndex() == 0 && child->renderer()->style()->position() == STATIC)
continue; // we don't know the widget's exact stacking position within flow
m_region -= child->paintedRegion(rootLayer);
}
- } else {
+ }
+ needUpdate |= count;
+ RenderLayer* sc = this;
+ int zx = zIndex();
+ while (sc = sc->stackingContext()) {
+ sc->updateZOrderLists();
+ bool found = false;
+ if (zx < 0) {
+ count = sc->m_negZOrderList ? sc->m_negZOrderList->count() : 0;
+ needUpdate |= count;
+ for (uint i = 0; i < count; i++) {
+ found |= sc->m_negZOrderList->at(i)->zIndex() > zx;
+ if (found) {
+ if (!sa) {
+ sa = m_object->element()->getDocument()->view();
+ m_region = QRect(0,0,sa->contentsWidth(),sa->contentsHeight());
+ }
+ m_region -= sc->m_negZOrderList->at(i)->paintedRegion(rootLayer);
+ }
+ }
+ }
+ if ( count = sc->m_posZOrderList ? sc->m_posZOrderList->count() : 0 ) {
+ needUpdate = true;
+ for (uint i = 0; i < count; i++) {
+ found |= sc->m_posZOrderList->at(i)->zIndex() > zx;
+ if (found) {
+ if (!sa) {
+ sa = m_object->element()->getDocument()->view();
+ m_region = QRect(0,0,sa->contentsWidth(),sa->contentsHeight());
+ }
+ m_region -= sc->m_posZOrderList->at(i)->paintedRegion(rootLayer);
+ }
+ }
+ }
+ zx = sc->zIndex();
+ }
+ if (!needUpdate) {
+ needUpdate |= !m_region.isEmpty();
m_region = QRegion();
}
if (needUpdate)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic