Closed Bug 111526 Opened 23 years ago Closed 17 years ago

link focus outline (invert) invisible on gray backgrounds

Categories

(Core Graveyard :: GFX, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED WORKSFORME
Future

People

(Reporter: jruderman, Unassigned)

References

Details

(4 keywords)

Attachments

(1 file)

The fix for bug 55676 made link focus visible on pages with black backgrounds, but didn't fix the problem for gray (#808080) backgrounds. Several possible ways to fix this bug: 1. Instead of using "invert" to show link focus, use the color of text in the paragraph containing the link. Text is black on most pages, always visible, and rarely the same color as links. 2. Make a new pseudocolor similar to "invert" that does something other than subtracting from #FFFFFF when the color is very close to #808080. 3. Change the meaning of "invert" as described in #2. This seems to be within the spirit of the CSS spec, which emphasizes that "invert" is supposed to make the border visible. From http://www.w3.org/TR/REC-CSS2/ui.html: "The 'outline-color' accepts all colors, as well as the keyword 'invert'. 'Invert' is expected to perform a color inversion on the pixels on the screen. This is a common trick to ensure the focus border is visible, regardless of color background."
Attached file testcase (deleted) —
->Compositor
Assignee: dbaron → kmcclusk
Component: Style System → Compositor
Keywords: access
QA Contact: ian → petersen
Keywords: fcc508
IE appears to suffer from the same problem, although the display is slightly different because the outline appears above the text whereas Mozilla draws the outline under the text (IMHO a bug). If you change the meaning of invert, I suggest using an XOR with 0x808080. This will provide a guaranteed level of contrast. If you want to see the effect (Windows only) download my ghostly cursors from http://www.nrr.co.uk/win95/
Reassigning to dcone.
Assignee: kmcclusk → dcone
Target Milestone: --- → mozilla1.2
Keywords: testcase
See also bug 56314, "reverse selection colors when page background is similar to default selection background".
Assignee: dcone → nobody
Blocks: css2outline
Keywords: css2
OS: Windows 98 → All
Hardware: PC → All
Target Milestone: mozilla1.2alpha → Future
(In reply to comment #3) > I suggest using an XOR with 0x808080. This will provide a guaranteed level of > contrast. To do that, we'd need to change all of the InvertRect implementations in gfx, for each OS. For example: http://lxr.mozilla.org/seamonkey/source/gfx/src/xlib/nsRenderingContextXlib.cpp#965 http://lxr.mozilla.org/seamonkey/source/gfx/src/windows/nsRenderingContextWin.cpp#2689 Am I understanding correctly that Cairo is going to become our new GFX backend eventually? If so, will that apply to all/most of the platforms we support now, and does it make sense to wait for Cairo before fixing this?
Tim, even though Cairo's far away, will it make this easier?
Masayuki, can your fix from bug 56314 be used to fix this? Also, I'd like to be able to set a specific color for the outline, and have it be changed only if there isn't sufficient difference with the background color.
Umm.. I don't have good idea...
Severity: normal → trivial
Firefox trunk now uses the text color for the focus outline rather than inverting the background color. So a purple link on a gray background gets a purple focus outline. This may change again; see bug 359497.
Blocks: 359497
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: