in function
nsContainerFrame::SyncWindowProperties(nsPresContext* aPresContext,
nsIFrame* aFrame,
nsView* aView,
nsRenderingContext* aRC)
Element* rootElement = aPresContext->Document()->GetRootElement();
if (!rootElement || !rootElement->IsXUL()) {
// Scrollframes use native widgets which don't work well with
// translucent windows, at least in Windows XP. So if the document
// has a root scrollrame it's useless to try to make it transparent,
// we'll just get something broken.
// nsCSSFrameConstructor::ConstructRootFrame constructs root
// scrollframes whenever the root element is not a XUL element, so
// we test for that here. We can't just call
// presShell->GetRootScrollFrame() since that might not have
// been constructed yet.
// We can change this to allow translucent toplevel HTML documents
// (e.g. to do something like Dashboard widgets), once we
// have broad support for translucent scrolled documents, but be
// careful because apparently some Firefox extensions expect
// openDialog("something.html") to produce an opaque window
// even if the HTML doesn't have a background-color set.
return;
}
I want to remove rootElement->IsXUL() check for supporting
transparent root html window, is that OK?
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform