mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Revert temporary landing of 130078
This commit is contained in:
parent
06af911885
commit
b4fc7982d0
@ -2388,11 +2388,17 @@ DocumentViewerImpl::FindContainerView()
|
||||
{
|
||||
nsIView* containerView = nsnull;
|
||||
|
||||
if (mContainer) {
|
||||
nsCOMPtr<nsIDocShellTreeItem> docShellItem = do_QueryReferent(mContainer);
|
||||
nsCOMPtr<nsPIDOMWindow> pwin(do_GetInterface(docShellItem));
|
||||
if (pwin) {
|
||||
nsCOMPtr<nsIContent> containerElement = do_QueryInterface(pwin->GetFrameElementInternal());
|
||||
nsCOMPtr<nsIContent> containerElement;
|
||||
nsCOMPtr<nsIDocShellTreeItem> docShellItem = do_QueryReferent(mContainer);
|
||||
nsCOMPtr<nsPIDOMWindow> pwin(do_GetInterface(docShellItem));
|
||||
if (pwin) {
|
||||
containerElement = do_QueryInterface(pwin->GetFrameElementInternal());
|
||||
}
|
||||
|
||||
if (mParentWidget) {
|
||||
containerView = nsIView::GetViewFor(mParentWidget);
|
||||
} else {
|
||||
if (mContainer) {
|
||||
nsCOMPtr<nsIPresShell> parentPresShell;
|
||||
if (docShellItem) {
|
||||
nsCOMPtr<nsIDocShellTreeItem> parentDocShellItem;
|
||||
@ -2430,7 +2436,32 @@ DocumentViewerImpl::FindContainerView()
|
||||
}
|
||||
}
|
||||
|
||||
return containerView;
|
||||
if (!containerView)
|
||||
return nsnull;
|
||||
|
||||
if (containerElement &&
|
||||
containerElement->HasAttr(kNameSpaceID_None, nsGkAtoms::transparent))
|
||||
return containerView;
|
||||
|
||||
nsIWidget* outerWidget = containerView->GetNearestWidget(nsnull);
|
||||
if (outerWidget &&
|
||||
outerWidget->GetTransparencyMode() == eTransparencyTransparent)
|
||||
return containerView;
|
||||
|
||||
// If the parent container is a chrome shell and we are a content shell
|
||||
// then we won't hook into its view
|
||||
// tree. This will improve performance a little bit (especially given scrolling/painting perf bugs)
|
||||
// but is really just for peace of mind. This check can be removed if we want to support fancy
|
||||
// chrome effects like transparent controls floating over content, transparent Web browsers, and
|
||||
// things like that, and the perf bugs are fixed.
|
||||
nsCOMPtr<nsIDocShellTreeItem> container(do_QueryReferent(mContainer));
|
||||
if (container) {
|
||||
nsCOMPtr<nsIDocShellTreeItem> sameTypeParent;
|
||||
container->GetSameTypeParent(getter_AddRefs(sameTypeParent));
|
||||
if (sameTypeParent)
|
||||
return containerView;
|
||||
}
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -963,6 +963,15 @@ nsSubDocumentFrame::CreateViewAndWidget(nsContentType aContentType)
|
||||
mInnerView = innerView;
|
||||
viewMan->InsertChild(outerView, innerView, nsnull, PR_TRUE);
|
||||
|
||||
if (aContentType == eContentTypeContent) {
|
||||
// widget needed.
|
||||
nsresult rv = innerView->CreateWidget(nsnull,
|
||||
PR_TRUE, PR_TRUE, aContentType);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Couldn't create widget for frame.");
|
||||
mInnerView = nsnull;
|
||||
}
|
||||
}
|
||||
return mInnerView;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user