Bug 1715748 - Don't use NS_SAME_AS_FOREGROUND_COLOR on android for -moz-nativehyperlinktext color. r=agi a=orange

This shouldn't have a meaningful behavior change, as the default link
color right now is taken from the browser.anchor_color pref.

Returning this color from -moz-nativehyperlinktext makes no sense, and
it wasn't being handled correctly before: On GeckoView this color was
transparent.

The other patches in this bug cause NS_SAME_AS_FOREGROUND_COLOR to be
handled correctly, as currentColor, and cause a test failure on android
which asserts that -moz-nativehyperlinktext doesn't return the initial
value.

This color is supposed to be internal, but is has been historically
exposed to the web. Will try to unship these on a follow-up bug.

MANUAL PUSH: Orange fix on a CLOSED TREE

Differential Revision: https://phabricator.services.mozilla.com/D117674
This commit is contained in:
Emilio Cobos Álvarez 2021-06-14 18:51:48 +02:00
parent 5241083599
commit 14e9ec13ca

View File

@ -287,7 +287,7 @@ nsresult nsLookAndFeel::NativeGetColor(ColorID aID, ColorScheme,
aColor = NS_TRANSPARENT;
break;
case ColorID::MozNativehyperlinktext:
aColor = NS_SAME_AS_FOREGROUND_COLOR;
aColor = NS_RGB(0, 0, 0xee);
break;
case ColorID::MozMenubartext:
aColor = mSystemColors.colorForeground;