Bug 89775

Summary: RenderText’s minimum preferred width is incorrect when soft hyphens are used
Product: WebKit Reporter: mitz
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Include hyphen width in minimun preferred width, and ignore soft hyphens when 'hyphens' is 'none'
none
Include hyphen width in minimun preferred width, and ignore soft hyphens when 'hyphens' is 'none' simon.fraser: review+

Description mitz 2012-06-22 11:40:53 PDT
The minimum preferred width computed in RenderText::computePreferredLogicalWidths does not include the width of the hyphenation string were hyphenation to occur at a soft hyphen. In addition to that, it behaves as if hyphenation can occur at a soft hyphen even when the 'hyphens' property is set to 'none'.
Comment 1 mitz 2012-06-22 11:48:49 PDT
Created attachment 149076 [details]
Include hyphen width in minimun preferred width, and ignore soft hyphens when 'hyphens' is 'none'
Comment 2 mitz 2012-06-22 11:55:13 PDT
Created attachment 149079 [details]
Include hyphen width in minimun preferred width, and ignore soft hyphens when 'hyphens' is 'none'
Comment 3 Simon Fraser (smfr) 2012-06-22 12:05:17 PDT
Comment on attachment 149079 [details]
Include hyphen width in minimun preferred width, and ignore soft hyphens when 'hyphens' is 'none'

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

> Source/WebCore/rendering/RenderText.cpp:972
> +        } else if (c == softHyphen && styleToUse->hyphens() != HyphensNone) {

Maybe add RenderStyle::usesHyphens() to make this easier to read?
Comment 4 mitz 2012-06-22 13:11:33 PDT
Fixed in <http://trac.webkit.org/r121050>.