mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 394406 with gfx.color_management turned ON inconsistent behaviour for selection colours. r+sr+a=roc
This commit is contained in:
parent
4d8bad0607
commit
d669e6f624
@ -431,6 +431,29 @@ nsXPLookAndFeel::~nsXPLookAndFeel()
|
||||
{
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsXPLookAndFeel::IsSpecialColor(const nsColorID aID, nscolor &aColor)
|
||||
{
|
||||
switch (aID) {
|
||||
case eColor_TextSelectForeground:
|
||||
return (aColor == NS_DONT_CHANGE_COLOR);
|
||||
case eColor_IMESelectedRawTextBackground:
|
||||
case eColor_IMESelectedConvertedTextBackground:
|
||||
case eColor_IMERawInputBackground:
|
||||
case eColor_IMEConvertedTextBackground:
|
||||
case eColor_IMESelectedRawTextForeground:
|
||||
case eColor_IMESelectedConvertedTextForeground:
|
||||
case eColor_IMERawInputForeground:
|
||||
case eColor_IMEConvertedTextForeground:
|
||||
case eColor_IMERawInputUnderline:
|
||||
case eColor_IMEConvertedTextUnderline:
|
||||
case eColor_IMESelectedRawTextUnderline:
|
||||
case eColor_IMESelectedConvertedTextUnderline:
|
||||
return NS_IS_IME_SPECIAL_COLOR(aColor);
|
||||
}
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
//
|
||||
// All these routines will return NS_OK if they have a value,
|
||||
// in which case the nsLookAndFeel should use that value;
|
||||
@ -545,7 +568,7 @@ nsXPLookAndFeel::GetColor(const nsColorID aID, nscolor &aColor)
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(NativeGetColor(aID, aColor))) {
|
||||
if (gfxPlatform::IsCMSEnabled()) {
|
||||
if (gfxPlatform::IsCMSEnabled() && !IsSpecialColor(aID, aColor)) {
|
||||
cmsHTRANSFORM transform = gfxPlatform::GetCMSInverseRGBTransform();
|
||||
if (transform) {
|
||||
PRUint8 color[3];
|
||||
|
@ -118,6 +118,7 @@ protected:
|
||||
void InitFromPref(nsLookAndFeelFloatPref* aPref, nsIPrefBranch* aPrefBranch);
|
||||
void InitColorFromPref(PRInt32 aIndex, nsIPrefBranch* aPrefBranch);
|
||||
virtual nsresult NativeGetColor(const nsColorID aID, nscolor& aColor) = 0;
|
||||
PRBool IsSpecialColor(const nsColorID aID, nscolor &aColor);
|
||||
|
||||
static PRBool sInitialized;
|
||||
static nsLookAndFeelIntPref sIntPrefs[];
|
||||
|
Loading…
Reference in New Issue
Block a user