зеркало из https://github.com/mozilla/pjs.git
Bug 470711 - Newly modernized tabs look cut off if the last one is hidden, r=josh r+sr=roc
This commit is contained in:
Родитель
fab4800071
Коммит
7e7fec38f0
|
@ -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")
|
||||
|
|
Загрузка…
Ссылка в новой задаче