Bug 144879

Summary: Text is misplaced when custom font does not have space glyph.
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, commit-queue, esprehn+autocc, glenn, koivisto, kondapallykalyan, mmaxfield, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews100 for mac-mavericks
none
Archive of layout-test-results from ews106 for mac-mavericks-wk2
none
Patch
none
Patch none

Description zalan 2015-05-11 11:34:20 PDT
BreakingContext and RenderText::computePreferredLogicalWidths() pre-calculates space width and if the associated font does not have space glyph we initiate a fallback font even if the text does not need it. Since both the primary and the fallback fonts are used to figure out ascent/descent information for lines, if the fallback fonts' ascent/descent values are bigger, the line gets misplaced. (as opposed to where it would be placed, if the primary font had space glyph)
Comment 1 zalan 2015-05-11 12:06:51 PDT
Created attachment 252882 [details]
Patch
Comment 2 Build Bot 2015-05-11 12:43:25 PDT
Comment on attachment 252882 [details]
Patch

Attachment 252882 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5717670238355456

New failing tests:
fast/ruby/ruby-expansion-cjk-3.html
fast/ruby/ruby-expansion-cjk.html
fast/ruby/ruby-expansion-cjk-5.html
platform/mac/svg/fonts/svg-font-general.html
fast/ruby/ruby-expansion-cjk-2.html
fast/ruby/ruby-expansion-cjk-4.html
Comment 3 Build Bot 2015-05-11 12:43:28 PDT
Created attachment 252884 [details]
Archive of layout-test-results from ews100 for mac-mavericks

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-mavericks  Platform: Mac OS X 10.9.5
Comment 4 Build Bot 2015-05-11 12:45:46 PDT
Comment on attachment 252882 [details]
Patch

Attachment 252882 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/4591770331512832

New failing tests:
fast/ruby/ruby-expansion-cjk-3.html
fast/ruby/ruby-expansion-cjk.html
fast/ruby/ruby-expansion-cjk-5.html
platform/mac/svg/fonts/svg-font-general.html
fast/ruby/ruby-expansion-cjk-2.html
fast/ruby/ruby-expansion-cjk-4.html
Comment 5 Build Bot 2015-05-11 12:45:49 PDT
Created attachment 252885 [details]
Archive of layout-test-results from ews106 for mac-mavericks-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-mavericks-wk2  Platform: Mac OS X 10.9.5
Comment 6 Myles C. Maxfield 2015-05-11 14:25:52 PDT
Comment on attachment 252882 [details]
Patch

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

> Source/WebCore/rendering/line/BreakingContext.h:86
> +    enum WordTrailingSpaceState { Uninitialized, Computed };

enum class
Comment 7 zalan 2015-05-11 15:58:30 PDT
Created attachment 252902 [details]
Patch
Comment 8 zalan 2015-05-11 16:19:26 PDT
(In reply to comment #5)
> Created attachment 252885 [details]
> Archive of layout-test-results from ews106 for mac-mavericks-wk2
> 
> The attached test failures were seen while running run-webkit-tests on the
> mac-wk2-ews.
> Bot: ews106  Port: mac-mavericks-wk2  Platform: Mac OS X 10.9.5

Progressions.
Comment 9 zalan 2015-05-11 18:39:15 PDT
Created attachment 252919 [details]
Patch
Comment 10 WebKit Commit Bot 2015-05-11 21:03:16 PDT
Comment on attachment 252919 [details]
Patch

Clearing flags on attachment: 252919

Committed r184150: <http://trac.webkit.org/changeset/184150>
Comment 11 WebKit Commit Bot 2015-05-11 21:03:22 PDT
All reviewed patches have been landed.  Closing bug.