Bug 156550 - Text on compositing layer with negative letter-spacing is truncated.
Summary: Text on compositing layer with negative letter-spacing is truncated.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-04-13 12:42 PDT by zalan
Modified: 2023-11-01 10:15 PDT (History)
7 users (show)

See Also:


Attachments
Patch (6.84 KB, patch)
2016-04-13 12:51 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (6.93 KB, patch)
2016-04-13 14:09 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 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.