Bug 144879 - Text is misplaced when custom font does not have space glyph.
Summary: Text is misplaced when custom font does not have space glyph.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-11 11:34 PDT by zalan
Modified: 2015-05-11 21:03 PDT (History)
8 users (show)

See Also:


Attachments
Patch (15.16 KB, patch)
2015-05-11 12:06 PDT, zalan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-mavericks (845.32 KB, application/zip)
2015-05-11 12:43 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews106 for mac-mavericks-wk2 (1018.47 KB, application/zip)
2015-05-11 12:45 PDT, Build Bot
no flags Details
Patch (30.72 KB, patch)
2015-05-11 15:58 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (30.08 KB, patch)
2015-05-11 18:39 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.