Bug 169517 - REGRESSION (r211382): Partial right-to-left text runs are painted at an offset (breaks Find indicators, Look Up, and custom ::selection style)
Summary: REGRESSION (r211382): Partial right-to-left text runs are painted at an offse...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P1 Normal
Assignee: Myles C. Maxfield
URL: data:text/html,<meta%20charset=utf-8>...
Keywords: InRadar, Regression
: 171658 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-03-11 20:20 PST by mitz
Modified: 2017-05-04 15:25 PDT (History)
10 users (show)

See Also:


Attachments
Patch (4.57 KB, patch)
2017-05-01 23:26 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews126 for ios-simulator-wk2 (11.30 MB, application/zip)
2017-05-02 01:03 PDT, Build Bot
no flags Details
Patch (5.41 KB, patch)
2017-05-02 10:19 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (5.30 KB, patch)
2017-05-02 10:36 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2017-03-11 20:20:43 PST
To reproduce this bug, navigate to the URL and then control-click the long word on the left, and choose Look Up “הסתבכויות” from the contextual menu. In the yellow lookup highlight, the word is offset to the right but about the width of the other word.
Comment 1 Radar WebKit Bug Importer 2017-03-11 20:25:59 PST
<rdar://problem/30996668>
Comment 2 mitz 2017-03-11 21:10:39 PST
I am pretty sure this was caused by the changes to FontCascade in r211382, but I haven’t confirmed it yet.
Comment 3 mitz 2017-03-11 22:01:27 PST
Caused by <https://trac.webkit.org/r211382>, the fix for bug 166013.
Comment 4 mitz 2017-03-13 19:26:30 PDT
Here is a test case you can use that doesn’t depend on lookup:

<style>
	::selection { color: green; }
</style>
<bdo id=target dir=rtl>neerg si noitceleS</bdo>
<script>
	let textNode = document.getElementById("target").firstChild;
	getSelection().setBaseAndExtent(textNode, 0, textNode, 5)
</script>
Comment 5 Tim Horton 2017-03-28 12:01:31 PDT
Radar is actually rdar://problem/30652443
Comment 6 Myles C. Maxfield 2017-05-01 23:26:26 PDT
Created attachment 308803 [details]
Patch
Comment 7 Build Bot 2017-05-02 01:03:11 PDT
Comment on attachment 308803 [details]
Patch

Attachment 308803 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/3656252

New failing tests:
fast/text/complex-text-selection.html
Comment 8 Build Bot 2017-05-02 01:03:12 PDT
Created attachment 308809 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.6
Comment 9 Myles C. Maxfield 2017-05-02 10:19:43 PDT
Created attachment 308828 [details]
Patch
Comment 10 Myles C. Maxfield 2017-05-02 10:36:54 PDT
Created attachment 308831 [details]
Patch
Comment 11 WebKit Commit Bot 2017-05-02 12:35:28 PDT
Comment on attachment 308831 [details]
Patch

Clearing flags on attachment: 308831

Committed r216088: <http://trac.webkit.org/changeset/216088>
Comment 12 WebKit Commit Bot 2017-05-02 12:35:30 PDT
All reviewed patches have been landed.  Closing bug.
Comment 13 Jon Lee 2017-05-04 15:25:42 PDT
*** Bug 171658 has been marked as a duplicate of this bug. ***