mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 470711 - Newly modernized tabs look cut off if the last one is hidden, r=josh r+sr=roc
This commit is contained in:
parent
6aa805f93b
commit
4ccec61031
@ -264,7 +264,13 @@ nsNativeTheme::IsFirstTab(nsIFrame* aFrame)
|
||||
if (!aFrame)
|
||||
return PR_FALSE;
|
||||
|
||||
return aFrame->GetContent()->HasAttr(kNameSpaceID_None, nsWidgetAtoms::firsttab);
|
||||
nsIFrame* first = aFrame->GetParent()->GetFirstChild(nsnull);
|
||||
while (first) {
|
||||
if (first->GetRect().width > 0 && first->GetContent()->Tag() == nsWidgetAtoms::tab)
|
||||
return (first == aFrame);
|
||||
first = first->GetNextSibling();
|
||||
}
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
PRBool
|
||||
@ -273,7 +279,11 @@ nsNativeTheme::IsLastTab(nsIFrame* aFrame)
|
||||
if (!aFrame)
|
||||
return PR_FALSE;
|
||||
|
||||
return aFrame->GetContent()->HasAttr(kNameSpaceID_None, nsWidgetAtoms::lasttab);
|
||||
while ((aFrame = aFrame->GetNextSibling())) {
|
||||
if (aFrame->GetRect().width > 0 && aFrame->GetContent()->Tag() == nsWidgetAtoms::tab)
|
||||
return PR_FALSE;
|
||||
}
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
PRBool
|
||||
|
@ -119,6 +119,7 @@ WIDGET_ATOM(state, "state")
|
||||
WIDGET_ATOM(step, "step")
|
||||
WIDGET_ATOM(Stop, "Stop")
|
||||
WIDGET_ATOM(_true, "true")
|
||||
WIDGET_ATOM(tab, "tab")
|
||||
WIDGET_ATOM(tree, "tree")
|
||||
WIDGET_ATOM(treecolpicker, "treecolpicker")
|
||||
WIDGET_ATOM(type, "type")
|
||||
|
Loading…
Reference in New Issue
Block a user