зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
a8368390cd
Коммит
7b128069cd
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче