[Webkit-unassigned] [Bug 65681] New: Find in Page highlights can clash with page text color.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 4 04:41:08 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=65681

           Summary: Find in Page highlights can clash with page text
                    color.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: mkosiba at chromium.org
                CC: johnme at chromium.org


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.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list