Open Bug 1299906 Opened 9 years ago Updated 3 years ago

InfoBackground named CSS colour wrong in Windows (InfoBackground doesn't match to tooltip color)

Categories

(Core :: Widget: Win32, defect, P4)

48 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: public, Unassigned)

Details

(Whiteboard: tpi:+)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:48.0) Gecko/20100101 Firefox/48.0 Build ID: 20160817112116 Steps to reproduce: Simplest way to check, is to open any page with a plain white background (e.g. Google search) and type into the address bar: javascript:void(document.body.style.backgroundColor="InfoBackground"); Then hold the cursor over a toolbar button, such that a tooltip appears just above the page (or partially overlapping with the page). Actual results: InfoBackground is "vintage" yellow colour, like you'd see in Windows 2000 or older. Modern versions of Windows all seem to have white tooltips: I think I always saw white tooltips in XP, and they're white in Windows 10. Firefox seems to have hard-coded the shade instead of deriving it from the OS theme settings. Expected results: InfoBackground should appear the same colour as that selected by Windows, as well as by the XUL side of Firefox, which does seem to get the colour right (hence the mismatch between a page using InfoBackground, and a toolbar tooltip).
Firefox is using the result of `GetSysColor(COLOR_INFOBK)` for InfoBackground, and `GetSysColor(COLOR_INFOBK)` returns `RGB(0xFF, 0xFF, 0xE1)`, that is yellow, even on Windows 10. https://dxr.mozilla.org/mozilla-central/rev/dbe4b47941c7b3d6298a0ead5e40dd828096c808/widget/windows/nsLookAndFeel.cpp#217 > nsresult > nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor) > { > nsresult res = NS_OK; > > int idx; > switch (aID) { > ... > case eColorID_infobackground: > idx = COLOR_INFOBK; > break; > case eColorID > ... > } > DWORD color = ::GetSysColor(idx); > aColor = COLOREF_2_NSRGB(color); > > return res; > } Looks like the value is from `HKEY_CURRENT_USER\Control Panel\Colors\InfoWindow` or `HKEY_CURRENT_USER\Control Panel\Desktop\Colors\InfoWindow`, that values are "255 255 225" (note that last number is 225, not 255), and when I change them and reboot the PC, I confirmed the color of "InfoBackground" is changed on Firefox, so surely Firefox is using the color selected by Windows. Also, the same color is used for InfoBackground on Edge, and tooltip for titlebar buttons (maximize, minimize, close) of Edge window also use the color. So using the yellow color for InfoBackground seems to be reasonable. Moving to "Widget: Win32" for now, but this may be the issue of tooltip's style on XUL or somewhere.
QA Whiteboard: [bugday-20160905]
Component: Untriaged → Widget: Win32
Product: Firefox → Core
Summary: InfoBackground named CSS colour wrong in Windows → InfoBackground named CSS colour wrong in Windows (InfoBackground doesn't match to tooltip color)
Curious ... Firefox is still inconsistent with itself though, as its own tooltips are the "correct" colour (correct per actual practice, regardless of Windows citing the wrong colour when asked!)
Priority: -- → P4
Whiteboard: tpi:+
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.