Bug 144294

Summary: fast/text/ruby-justification-flush.html fails on safari-600.6-branch
Product: WebKit Reporter: Andy Estes <aestes>
Component: TextAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: mmaxfield
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: All   
Bug Depends on: 141732    
Bug Blocks:    
Attachments:
Description Flags
ruby-justification-flush-diff
none
Patch aestes: review+

Description Andy Estes 2015-04-27 17:04:05 PDT
fast/text/ruby-justification-flush.html has failed on safari-600.6-branch after it was introduced by merging r180278 in http://trac.webkit.org/changeset/180428.

The test says that it fails if the two black squares are not vertically aligned, which they are not.
Comment 1 Andy Estes 2015-04-27 17:07:48 PDT
Created attachment 251789 [details]
ruby-justification-flush-diff
Comment 2 Andy Estes 2015-04-27 18:15:06 PDT
Marked as ImageOnlyFailure in http://trac.webkit.org/changeset/183437
Comment 3 Myles C. Maxfield 2015-04-28 14:46:37 PDT
Created attachment 251889 [details]
Patch
Comment 4 Andy Estes 2015-04-28 15:30:17 PDT
Comment on attachment 251889 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=251889&action=review

r=me if you remove the code change. Thanks!

> Source/WebCore/rendering/RenderBlockLineLayout.cpp:767
> -                            opportunitiesInRun = Font::expansionOpportunityCount(renderText.characters8() + r->m_start, r->m_stop - r->m_start, r->box()->direction(), isAfterExpansion);
> +                            opportunitiesInRun = Font::expansionOpportunityCount(renderText.characters8(), renderText.textLength(), r->box()->direction(), isAfterExpansion);
>                          else
> -                            opportunitiesInRun = Font::expansionOpportunityCount(renderText.characters16() + r->m_start, r->m_stop - r->m_start, r->box()->direction(), isAfterExpansion);
> +                            opportunitiesInRun = Font::expansionOpportunityCount(renderText.characters16(), renderText.textLength(), r->box()->direction(), isAfterExpansion);

I'd create a separate bug for this, since it isn't necessary to fix the layout test, and we're not yet sure whether we want it in safari-600.6-branch.
Comment 5 Andy Estes 2015-04-28 15:43:29 PDT
Does this test need updating on trunk, too?
Comment 6 Myles C. Maxfield 2015-04-28 19:04:50 PDT
(In reply to comment #5)
> Does this test need updating on trunk, too?

Nope! This ruby stuff is pretty different on trunk.
Comment 7 Myles C. Maxfield 2015-04-29 09:17:11 PDT
http://trac.webkit.org/changeset/183549