Fix regression where select dropdowns would not draw on Linux if native theme support was enabled (bug 170672). Only call WidgetStateChanged() if the theme claims to support the widget in question; fix an incorrect frame being passed to WidgetStateChanged. r=hewitt, sr=hyatt.

This commit is contained in:
bryner%netscape.com 2002-09-25 10:07:40 +00:00
Родитель a068886905
Коммит 2bd00f21bb
2 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -10450,7 +10450,7 @@ nsCSSFrameConstructor::ContentStatesChanged(nsIPresContext* aPresContext,
nsCOMPtr<nsITheme> theme;
aPresContext->GetTheme(getter_AddRefs(theme));
PRBool repaint = PR_FALSE;
if (theme)
if (theme && theme->ThemeSupportsWidget(aPresContext, primaryFrame1, app1))
theme->WidgetStateChanged(primaryFrame1, app1, nsnull, &repaint);
if (repaint)
ApplyRenderingChangeToTree(aPresContext, primaryFrame1, nsnull);
@ -10464,8 +10464,8 @@ nsCSSFrameConstructor::ContentStatesChanged(nsIPresContext* aPresContext,
nsCOMPtr<nsITheme> theme;
aPresContext->GetTheme(getter_AddRefs(theme));
PRBool repaint = PR_FALSE;
if (theme)
theme->WidgetStateChanged(primaryFrame1, app2, nsnull, &repaint);
if (theme && theme->ThemeSupportsWidget(aPresContext, primaryFrame2, app2))
theme->WidgetStateChanged(primaryFrame2, app2, nsnull, &repaint);
if (repaint)
ApplyRenderingChangeToTree(aPresContext, primaryFrame2, nsnull);
}

Просмотреть файл

@ -10450,7 +10450,7 @@ nsCSSFrameConstructor::ContentStatesChanged(nsIPresContext* aPresContext,
nsCOMPtr<nsITheme> theme;
aPresContext->GetTheme(getter_AddRefs(theme));
PRBool repaint = PR_FALSE;
if (theme)
if (theme && theme->ThemeSupportsWidget(aPresContext, primaryFrame1, app1))
theme->WidgetStateChanged(primaryFrame1, app1, nsnull, &repaint);
if (repaint)
ApplyRenderingChangeToTree(aPresContext, primaryFrame1, nsnull);
@ -10464,8 +10464,8 @@ nsCSSFrameConstructor::ContentStatesChanged(nsIPresContext* aPresContext,
nsCOMPtr<nsITheme> theme;
aPresContext->GetTheme(getter_AddRefs(theme));
PRBool repaint = PR_FALSE;
if (theme)
theme->WidgetStateChanged(primaryFrame1, app2, nsnull, &repaint);
if (theme && theme->ThemeSupportsWidget(aPresContext, primaryFrame2, app2))
theme->WidgetStateChanged(primaryFrame2, app2, nsnull, &repaint);
if (repaint)
ApplyRenderingChangeToTree(aPresContext, primaryFrame2, nsnull);
}