Bug 89775 - RenderText’s minimum preferred width is incorrect when soft hyphens are used
Summary: RenderText’s minimum preferred width is incorrect when soft hyphens are used
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: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-22 11:40 PDT by mitz
Modified: 2012-06-22 13:11 PDT (History)
2 users (show)

See Also:


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 Details | Formatted Diff | Diff
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+
Details | Formatted Diff | Diff

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