Bug 156550

Summary: Text on compositing layer with negative letter-spacing is truncated.
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, koivisto, kondapallykalyan, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=263959
Attachments:
Description Flags
Patch
none
Patch none

Description zalan 2016-04-13 12:42:20 PDT
Visual overflow for the negative letter-spacing is not computed properly so we end up with a narrow layer for the text.
Comment 1 zalan 2016-04-13 12:42:53 PDT
rdar://problem/24212140
Comment 2 zalan 2016-04-13 12:51:29 PDT
Created attachment 276345 [details]
Patch
Comment 3 Antti Koivisto 2016-04-13 12:54:51 PDT
r=me
Comment 4 Simon Fraser (smfr) 2016-04-13 13:06:20 PDT
Comment on attachment 276345 [details]
Patch

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

> Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp:68
> +static FloatRect computeOverflow(const RenderBlockFlow& flow, const FloatRect& rect)

What is the rect that's passed in? It could use a better name.

> Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp:78
> +    if (letterSpacing >= 0)
> +        return overflowRect;
> +
> +    overflowRect.expand(-letterSpacing, 0);

Wouldn't this be clearer with a std::max(letterSpacing, 0)?
Comment 5 zalan 2016-04-13 14:09:01 PDT
Created attachment 276351 [details]
Patch
Comment 6 WebKit Commit Bot 2016-04-13 15:11:39 PDT
Comment on attachment 276351 [details]
Patch

Clearing flags on attachment: 276351

Committed r199516: <http://trac.webkit.org/changeset/199516>
Comment 7 WebKit Commit Bot 2016-04-13 15:11:43 PDT
All reviewed patches have been landed.  Closing bug.