Bug 97164 - [Chromium] Improve glyph selection of HarfBuzzShaper
Summary: [Chromium] Improve glyph selection of HarfBuzzShaper
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kenichi Ishibashi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-19 20:43 PDT by Kenichi Ishibashi
Modified: 2012-09-21 00:17 PDT (History)
4 users (show)

See Also:


Attachments
Patch (10.15 KB, patch)
2012-09-19 21:05 PDT, Kenichi Ishibashi
no flags Details | Formatted Diff | Diff
Patch (10.83 KB, patch)
2012-09-20 00:27 PDT, Kenichi Ishibashi
no flags Details | Formatted Diff | Diff
Patch for landing (10.74 KB, patch)
2012-09-20 15:29 PDT, Kenichi Ishibashi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenichi Ishibashi 2012-09-19 20:43:13 PDT
In complex text, a character can correspond with zero, one, or multiple glyphs. Similarly, a glyph can correspond with zero, one, or multiple characters. I noticed that HarfBuzzShaper doesn't handle selection correctly for some cases.

It seems that we should return character index like below:

       +--- cluster 0 --+--- cluster 1 --+-----+---- cluster n-2 ---+---- cluster n-1 ---+
Glyphs | c_0 | .. | c_0 | c_1 | .. | c_1 | ... | c_n-2 | .. | c_n-2 | c_n-1 | .. | c_n-1 |
       +----------------+----------------+-----+--------------------+--------------------+
CharacterIndex to be returned:
LTR         0   |      c_1      |    ...    |    c_n-2   |       c_n-1        |     n
RTL         n   |      c_0      |    c_1    |     ...    |       c_n-2        |     0

(A cluster is the character index which correspond with a glyph)
Comment 1 Kenichi Ishibashi 2012-09-19 21:05:51 PDT
Created attachment 164833 [details]
Patch
Comment 2 Kenichi Ishibashi 2012-09-19 21:07:49 PDT
Hi Tony,
could you take a look?
Comment 3 WebKit Review Bot 2012-09-19 23:11:45 PDT
Comment on attachment 164833 [details]
Patch

Attachment 164833 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/13951080

New failing tests:
fast/text/international/hebrew-selection.html
http/tests/css/link-css-disabled-value-with-slow-loading-sheet.html
Comment 4 Kenichi Ishibashi 2012-09-20 00:27:02 PDT
Created attachment 164852 [details]
Patch
Comment 5 Tony Chang 2012-09-20 10:16:54 PDT
Comment on attachment 164852 [details]
Patch

I like your ref test.
Comment 6 Kenichi Ishibashi 2012-09-20 15:29:47 PDT
Created attachment 164994 [details]
Patch for landing
Comment 7 Kenichi Ishibashi 2012-09-20 15:30:08 PDT
(In reply to comment #5)
> (From update of attachment 164852 [details])
> I like your ref test.

Thank you for review!
Comment 8 WebKit Review Bot 2012-09-20 16:15:56 PDT
Comment on attachment 164994 [details]
Patch for landing

Clearing flags on attachment: 164994

Committed r129175: <http://trac.webkit.org/changeset/129175>
Comment 9 WebKit Review Bot 2012-09-20 16:15:59 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Yury Semikhatsky 2012-09-20 23:21:01 PDT
The test is failing with image diff on Windows too. Looking at the image output I didn't see expected selection so I updated the expectations to mark the test as failing on Win instead of providing Win-specific expectations:
http://trac.webkit.org/changeset/129194


Link to the flakiness dashboard:
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=fast%2Ftext%2Finternational%2Fhebrew-selection.html

Also reopening the bug as it was specified in TestExpectations. You should either file another bug for tracking the failure or keep this one open.
Comment 11 Kenichi Ishibashi 2012-09-20 23:33:02 PDT
(In reply to comment #10)
> The test is failing with image diff on Windows too. Looking at the image output I didn't see expected selection so I updated the expectations to mark the test as failing on Win instead of providing Win-specific expectations:
> http://trac.webkit.org/changeset/129194
> 
> 
> Link to the flakiness dashboard:
> http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=fast%2Ftext%2Finternational%2Fhebrew-selection.html
> 
> Also reopening the bug as it was specified in TestExpectations. You should either file another bug for tracking the failure or keep this one open.

Thanks for the heads-up. I created a bug for tracking the failure.
Comment 12 Yury Semikhatsky 2012-09-21 00:17:09 PDT
(In reply to comment #11)
> (In reply to comment #10)
> > The test is failing with image diff on Windows too. Looking at the image output I didn't see expected selection so I updated the expectations to mark the test as failing on Win instead of providing Win-specific expectations:
> > http://trac.webkit.org/changeset/129194
> > 
> > 
> > Link to the flakiness dashboard:
> > http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=fast%2Ftext%2Finternational%2Fhebrew-selection.html
> > 
> > Also reopening the bug as it was specified in TestExpectations. You should either file another bug for tracking the failure or keep this one open.
> 
> Thanks for the heads-up. I created a bug for tracking the failure.

Thanks!