Bug 1501433 - Remove nsNativeTheme::GetScrollbar{Face,Track}Color. r=jmathies

The functions were introduced in bug 1460456 as part of the initial impl
of scrollbar color properties, and then got moved to nsNativeTheme in
bug 1464722 to be shared with cocoa impl.

Its usage is later removed in bug 1494607 and bug 1498216 as we turn to
rely on native blending instead, and these functions become unused.

Differential Revision: https://phabricator.services.mozilla.com/D9596

--HG--
extra : source : 02ce40d9ca40eba4485cf6e0db33b726ad531a89
This commit is contained in:
Xidorn Quan 2018-10-24 07:21:51 +11:00
Родитель 941e7bafcc
Коммит 15e72a9b0c
2 изменённых файлов: 0 добавлений и 49 удалений

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

@ -818,48 +818,3 @@ nsNativeTheme::IsWidgetScrollbarPart(StyleAppearance aAppearance)
return false;
}
}
static nscolor
GetOpaqueBackgroundColor(ComputedStyle* aStyle)
{
nscolor color = aStyle->StyleBackground()->BackgroundColor(aStyle);
if (NS_GET_A(color) == 255) {
return color;
}
// Compose white background with the background color.
return NS_ComposeColors(NS_RGB(255, 255, 255), color);
}
nscolor
nsNativeTheme::GetScrollbarFaceColor(ComputedStyle* aStyle,
AutoColorGetter aAutoGetter)
{
StyleComplexColor complexColor = aStyle->StyleUI()->mScrollbarFaceColor;
if (complexColor.IsAuto()) {
return aAutoGetter(aStyle);
}
nscolor color = complexColor.CalcColor(aStyle);
if (NS_GET_A(color) == 255) {
return color;
}
nscolor bgColor = GetOpaqueBackgroundColor(aStyle);
return NS_ComposeColors(bgColor, color);
}
nscolor
nsNativeTheme::GetScrollbarTrackColor(ComputedStyle* aStyle,
AutoColorGetter aAutoGetter)
{
StyleComplexColor complexColor = aStyle->StyleUI()->mScrollbarTrackColor;
nscolor color;
if (complexColor.IsAuto()) {
color = aAutoGetter(aStyle);
} else {
color = complexColor.CalcColor(aStyle);
}
if (NS_GET_A(color) == 255) {
return color;
}
nscolor bgColor = GetOpaqueBackgroundColor(aStyle);
return NS_ComposeColors(bgColor, color);
}

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

@ -189,10 +189,6 @@ class nsNativeTheme : public nsITimerCallback, public nsINamed
// custom scrollbar
typedef nscolor (*AutoColorGetter)(mozilla::ComputedStyle*);
bool IsWidgetScrollbarPart(mozilla::StyleAppearance aAppearance);
nscolor GetScrollbarFaceColor(mozilla::ComputedStyle* aStyle,
AutoColorGetter aAutoGetter);
nscolor GetScrollbarTrackColor(mozilla::ComputedStyle* aStyle,
AutoColorGetter aAutoGetter);
private:
uint32_t mAnimatedContentTimeout;