Bug 134336 - Text-decoration-style: dashed / dotted rendered as solid
Summary: Text-decoration-style: dashed / dotted rendered as solid
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-06-25 22:35 PDT by Philippe Wittenbergh
Modified: 2016-06-19 17:28 PDT (History)
13 users (show)

See Also:


Attachments
test case (693 bytes, text/html)
2014-06-25 22:35 PDT, Philippe Wittenbergh
no flags Details
Patch (15.23 KB, patch)
2016-06-07 16:45 PDT, Myles C. Maxfield
dino: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Wittenbergh 2014-06-25 22:35:09 PDT
Created attachment 233883 [details]
test case

test case: 
expected a dashed or dotted underline
actual: a solid underline

The Webkit inspector does seem to accept the values as valid / supported.

All other text-decoration-style values are supported and rendered correctly.
Comment 1 Radar WebKit Bug Importer 2016-06-02 17:17:44 PDT
<rdar://problem/26613669>
Comment 2 Myles C. Maxfield 2016-06-07 15:37:07 PDT
I can't figure out how this ever worked. We set the stroke style ever since r132076, but we've been filling the underline instead of stroking it since r23761. (So setting the stroke style is irrelevant.)
Comment 3 Myles C. Maxfield 2016-06-07 16:45:00 PDT
Created attachment 280746 [details]
Patch
Comment 4 Dean Jackson 2016-06-07 16:51:20 PDT
Comment on attachment 280746 [details]
Patch

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

> Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:1518
> +    float particleWidth = 0;
> +    switch (strokeStyle) {
> +    case DottedStroke:
> +        particleWidth = bounds.height();
> +        break;
> +    case DashedStroke:
> +        particleWidth = 2 * bounds.height();

I think this should be dashWidth.

> LayoutTests/ChangeLog:15
> +        * fast/css3-text/css3-text-decoration/text-decoration-dashed-expected-mismatch.html: Added.
> +        * fast/css3-text/css3-text-decoration/text-decoration-dashed.html: Added.
> +        * fast/css3-text/css3-text-decoration/text-decoration-dotted-dashed-expected-mismatch.html: Added.
> +        * fast/css3-text/css3-text-decoration/text-decoration-dotted-dashed.html: Added.
> +        * fast/css3-text/css3-text-decoration/text-decoration-dotted-expected-mismatch.html: Added.
> +        * fast/css3-text/css3-text-decoration/text-decoration-dotted.html: Added.

It's a shame we can't produce actual results to test against.
Comment 5 Myles C. Maxfield 2016-06-07 17:05:03 PDT
Committed r201777: <http://trac.webkit.org/changeset/201777>
Comment 6 Michael Catanzaro 2016-06-19 17:28:07 PDT
Note these layout tests are flaky on GTK, see bug #158918.