Bug 97164

Summary: [Chromium] Improve glyph selection of HarfBuzzShaper
Product: WebKit Reporter: Kenichi Ishibashi <bashi>
Component: PlatformAssignee: Kenichi Ishibashi <bashi>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, tony, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch for landing none

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!