mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 508134. Stop managing the visibility of views from SyncFrameViewProperties, except for nsSubdocumentFrames. r=dbaron
--HG-- extra : rebase_source : 8cda020494dfaec55076a4bf865e848ffb59656b
This commit is contained in:
parent
85e1db093e
commit
7edc6663cd
@ -597,37 +597,13 @@ nsContainerFrame::SyncFrameViewProperties(nsPresContext* aPresContext,
|
||||
aStyleContext = aFrame->GetStyleContext();
|
||||
}
|
||||
|
||||
// Make sure visibility is correct
|
||||
if (0 == (aFlags & NS_FRAME_NO_VISIBILITY)) {
|
||||
// Make sure visibility is correct. This only affects nsSubdocumentFrame.
|
||||
if (0 == (aFlags & NS_FRAME_NO_VISIBILITY) &&
|
||||
!aFrame->SupportsVisibilityHidden()) {
|
||||
// See if the view should be hidden or visible
|
||||
PRBool viewIsVisible = PR_TRUE;
|
||||
|
||||
if (!aStyleContext->GetStyleVisibility()->IsVisible() &&
|
||||
!aFrame->SupportsVisibilityHidden()) {
|
||||
// If it's a subdocument frame or a plugin, hide the view and
|
||||
// any associated widget.
|
||||
// These are leaf elements so this is OK, no descendant can be
|
||||
// visibility:visible.
|
||||
viewIsVisible = PR_FALSE;
|
||||
} else if (IsMenuPopup(aFrame)) {
|
||||
// if the view is for a popup, don't show the view if the popup is closed
|
||||
nsIWidget* widget = aView->GetWidget();
|
||||
if (widget) {
|
||||
nsWindowType windowType;
|
||||
widget->GetWindowType(windowType);
|
||||
if (windowType == eWindowType_popup) {
|
||||
widget->IsVisible(viewIsVisible);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// widgets for popups can be created later when the popup is opened,
|
||||
// so if there is no widget, the popup won't be open.
|
||||
viewIsVisible = PR_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
vm->SetViewVisibility(aView, viewIsVisible ? nsViewVisibility_kShow :
|
||||
nsViewVisibility_kHide);
|
||||
vm->SetViewVisibility(aView,
|
||||
aStyleContext->GetStyleVisibility()->IsVisible()
|
||||
? nsViewVisibility_kShow : nsViewVisibility_kHide);
|
||||
}
|
||||
|
||||
// See if the frame is being relatively positioned or absolutely
|
||||
|
@ -94,7 +94,6 @@ public:
|
||||
return nsObjectFrameSuper::IsFrameOfType(aFlags & ~(nsIFrame::eReplaced));
|
||||
}
|
||||
|
||||
virtual PRBool SupportsVisibilityHidden() { return PR_FALSE; }
|
||||
virtual PRBool NeedsView() { return PR_TRUE; }
|
||||
virtual nsresult CreateWidgetForView(nsIView* aView);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user