Bug 298889 - iframe invisible when window is transparent; r+sr=roc

This commit is contained in:
XiaoXiaoHU 2009-02-24 17:53:32 +01:00
Родитель 311f3714fd
Коммит 0dddf58b3e
4 изменённых файлов: 30 добавлений и 18 удалений

Просмотреть файл

@ -2226,7 +2226,7 @@ DocumentViewerImpl::MakeWindow(const nsSize& aSize)
if (container) {
container->GetSameTypeParent(getter_AddRefs(sameTypeParent));
}
if (!sameTypeParent) {
if (!sameTypeParent && mParentWidget->GetTransparencyMode() != eTransparencyTransparent) {
containerView = nsnull;
}
}

Просмотреть файл

@ -525,7 +525,8 @@ void nsScrollPortView::Scroll(nsView *aScrolledView, nsPoint aTwipsDelta, nsIntP
nsRegion updateRegion;
PRBool canBitBlit = scrollWidget &&
((mScrollProperties & NS_SCROLL_PROPERTY_ALWAYS_BLIT) ||
mViewManager->CanScrollWithBitBlt(aScrolledView, aTwipsDelta, &updateRegion));
mViewManager->CanScrollWithBitBlt(aScrolledView, aTwipsDelta, &updateRegion)) &&
scrollWidget->GetTransparencyMode() != eTransparencyTransparent;
if (canBitBlit) {
// We're going to bit-blit. Let the viewmanager know so it can

Просмотреть файл

@ -554,6 +554,10 @@ void nsViewManager::AddCoveringWidgetsToOpaqueRegion(nsRegion &aRgn, nsIDeviceCo
return;
}
if (widget->GetTransparencyMode() == eTransparencyTransparent) {
return;
}
for (nsIWidget* childWidget = widget->GetFirstChild();
childWidget;
childWidget = childWidget->GetNextSibling()) {
@ -813,6 +817,7 @@ nsViewManager::UpdateWidgetArea(nsView *aWidgetView, const nsRegion &aDamagedReg
// accumulate the union of all the child widget areas, or at least
// some subset of that.
nsRegion children;
if (widget->GetTransparencyMode() != eTransparencyTransparent) {
for (nsIWidget* childWidget = widget->GetFirstChild();
childWidget;
childWidget = childWidget->GetNextSibling()) {
@ -832,6 +837,7 @@ nsViewManager::UpdateWidgetArea(nsView *aWidgetView, const nsRegion &aDamagedReg
}
}
}
}
nsRegion leftOver;
leftOver.Sub(intersection, children);

Просмотреть файл

@ -8507,6 +8507,11 @@ void nsWindow::SetWindowTranslucencyInner(nsTransparencyMode aMode)
style |= topWindow->WindowStyle();
exStyle |= topWindow->WindowExStyle();
if (aMode == eTransparencyTransparent) {
style &= ~(WS_CAPTION | WS_THICKFRAME | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX);
exStyle &= ~(WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE);
}
VERIFY_WINDOW_STYLE(style);
::SetWindowLongPtrW(hWnd, GWL_STYLE, style);
::SetWindowLongPtrW(hWnd, GWL_EXSTYLE, exStyle);