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+

mitz
Reported 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'.
Attachments
Include hyphen width in minimun preferred width, and ignore soft hyphens when 'hyphens' is 'none' (6.72 KB, patch)
2012-06-22 11:48 PDT, mitz
no flags
Include hyphen width in minimun preferred width, and ignore soft hyphens when 'hyphens' is 'none' (6.73 KB, patch)
2012-06-22 11:55 PDT, mitz
simon.fraser: review+
mitz
Comment 1 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'
mitz
Comment 2 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'
Simon Fraser (smfr)
Comment 3 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?
mitz
Comment 4 2012-06-22 13:11:33 PDT
Note You need to log in before you can comment on or make changes to this bug.