UNCONFIRMED 65681
Find in Page highlights can clash with page text color.
https://bugs.webkit.org/show_bug.cgi?id=65681
Summary Find in Page highlights can clash with page text color.
Martin Kosiba
Reported 2011-08-04 04:41:08 PDT
Overview: When searching for text in a page if the text color is the same (or close to) the TextMatch highlight color, the text becomes illegible. Repro: 1. Go to the following URL: data:text/html,<body style="background:black"><div style="color:#ff9632">FIND ME</div><div style="color:#ffff00">FIND ME</div></body> 2. Search for "find". What is the expected output? What do you see instead? The active match is orange text on an orange background, hence illegible, and the inactive match is yellow text on a yellow background, hence illegible. While this reduced testcase is a worse case scenario, this is a real issue when using Find in Page on pages with white text (on dark backgrounds), as you get white text on yellow backgrounds for inactive matches, which is still pretty illegible. Instead when highlighting find results if the foreground (text) color does not contrast sufficiently with the background (highlight) color the foreground color should be changed to a contrasting color such as black. Additional Information: Looks like WebCore::InlineTextBox already handles this for text highlight (look for paintSelectedTextSeparately). The current solution assumes there is only a single selection and would need to be expanded to handle more than one piece of text being rendered with separate foreground color.
Attachments
Screenshot (93.63 KB, image/png)
2011-08-04 10:50 PDT, John Mellor
no flags
Alexey Proskuryakov
Comment 1 2011-08-04 10:16:40 PDT
What platform are you seeing this on? There is no such problem in Safari on Mac OS X.
John Mellor
Comment 2 2011-08-04 10:50:06 PDT
Created attachment 102944 [details] Screenshot It occurs in Chromium (all platforms). Safari isn't affected as it has a custom rendering for Find in Page match highlights. Other webkit-based browsers may be affected; I haven't tested any.
Note You need to log in before you can comment on or make changes to this bug.