Bug 6132 - Incorrect selection highlighting for ATSUI text when selected range is "CG-safe"
Summary: Incorrect selection highlighting for ATSUI text when selected range is "CG-safe"
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 5166
  Show dependency treegraph
 
Reported: 2005-12-18 09:21 PST by mitz
Modified: 2005-12-19 23:23 PST (History)
0 users

See Also:


Attachments
testcase (191 bytes, text/html)
2005-12-18 09:23 PST, mitz
no flags Details
patch (incl. layout test) (6.13 KB, patch)
2005-12-18 09:41 PST, mitz
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2005-12-18 09:21:18 PST
[Split off from bug 5166]
Summary: The selection highlight is partial or offset when the selection consists of "CG-safe" characters 
only but it is preceded by "need-ATSUI" characters.

To reproduce: double-click "dolor" in the testcase.

The position of the highlight rectangle depends on the width of all text before the selection, so the 
ATSUI code path should be used to draw the highlight even if the selected range itself does not require 
ATSUI.
The same applies to drawing text for the drag image when dragging a partial selection.

The fix for both is to change shouldUseATSU to always scan from the beginning. This should not affect 
layout and rendering performance, since run->from is zero anyway in all but the above two cases.
Comment 1 mitz 2005-12-18 09:23:16 PST
Created attachment 5133 [details]
testcase
Comment 2 mitz 2005-12-18 09:41:11 PST
Created attachment 5134 [details]
patch (incl. layout test)

Pixel mode required to detect regressions.
Comment 3 mitz 2005-12-18 14:14:02 PST
Comment on attachment 5134 [details]
patch (incl. layout test)

The code changes in this patch are identical to those in attachment 4965 [details].
Comment 4 Darin Adler 2005-12-18 14:31:50 PST
Comment on attachment 5134 [details]
patch (incl. layout test)

r=me