background-clip:text interacts poorly with opacity (and blur) in text-shadow

RESOLVED FIXED in Firefox 50

Status

()

RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jfkthame, Assigned: u459114)

Tracking

Trunk
mozilla50
Points:
---

Firefox Tracking Flags

(firefox50 fixed)

Details

Attachments

(4 attachments)

(Reporter)

Description

2 years ago
Created attachment 8772314 [details]
testcase combining text-shadow and background-clip:text

See testcase. The rendering of the text-shadow's blur (wherever its opacity is < 1.0) is spoiled by interaction with the background color, which should have been restricted to appearing within the clip path of the text.
(Reporter)

Updated

2 years ago
Attachment #8772314 - Attachment mime type: text/plain → text/html
(Reporter)

Comment 1

2 years ago
CJ, I guess this is connected to the implementation of background-clip from bug 1269971. Do you have time to look into it?
Blocks: 1269971
Flags: needinfo?(cku)
(Reporter)

Updated

2 years ago
Version: 44 Branch → Trunk
(Assignee)

Comment 2

2 years ago
Created attachment 8772418 [details]
Bug 1287705 - Part 1. Do not paint text shadow while generating text mask.

Review commit: https://reviewboard.mozilla.org/r/65236/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/65236/
(Assignee)

Comment 3

2 years ago
Created attachment 8772419 [details]
Bug 1287705 - Part 2. Add more comments and construct PaintState in PaintTextParams.

Review commit: https://reviewboard.mozilla.org/r/65238/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/65238/
(Assignee)

Comment 4

2 years ago
Created attachment 8772420 [details]
Bug 1287705 - Part 3. reftest for text shadow.

Review commit: https://reviewboard.mozilla.org/r/65240/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/65240/
(Assignee)

Updated

2 years ago
Assignee: nobody → cku
Flags: needinfo?(cku)
(Assignee)

Updated

2 years ago
Attachment #8772418 - Flags: review?(jfkthame)
Attachment #8772419 - Flags: review?(jfkthame)
Attachment #8772420 - Flags: review?(jfkthame)
Comment hidden (spam)
(Reporter)

Comment 6

2 years ago
Comment on attachment 8772418 [details]
Bug 1287705 - Part 1. Do not paint text shadow while generating text mask.

https://reviewboard.mozilla.org/r/65236/#review62300
Attachment #8772418 - Flags: review?(jfkthame) → review+
(Reporter)

Comment 7

2 years ago
Comment on attachment 8772419 [details]
Bug 1287705 - Part 2. Add more comments and construct PaintState in PaintTextParams.

https://reviewboard.mozilla.org/r/65238/#review62302

::: layout/generic/nsTextFrame.cpp:6014
(Diff revision 1)
>      aParams.textBaselinePt.x - aParams.framePt.x;
>    gfxFloat iOffset, hyphenWidth;
>    Range range; // in transformed string
>    TextRangeStyle rangeStyle;
>    // Draw background colors
> -  if (anyBackgrounds && (!aParams.generateTextMask ||
> +  if (anyBackgrounds && (!aParams.IsGenerateTextMask())) {

You can drop the parens around !aParams.IsGenerateTextMask() here, now that it's not a two-term || expression.
Attachment #8772419 - Flags: review?(jfkthame) → review+
(Reporter)

Comment 8

2 years ago
Comment on attachment 8772420 [details]
Bug 1287705 - Part 3. reftest for text shadow.

https://reviewboard.mozilla.org/r/65240/#review62304

LGTM. Thanks for the instant fix here! :)
Attachment #8772420 - Flags: review?(jfkthame) → review+
(Assignee)

Comment 9

2 years ago
Comment on attachment 8772418 [details]
Bug 1287705 - Part 1. Do not paint text shadow while generating text mask.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/65236/diff/1-2/
(Assignee)

Comment 10

2 years ago
Comment on attachment 8772419 [details]
Bug 1287705 - Part 2. Add more comments and construct PaintState in PaintTextParams.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/65238/diff/1-2/
(Assignee)

Comment 11

2 years ago
Comment on attachment 8772420 [details]
Bug 1287705 - Part 3. reftest for text shadow.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/65240/diff/2-3/

Comment 12

2 years ago
Pushed by cku@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/14bb443d532d
Part 1. Do not paint text shadow while generating text mask. r=jfkthame
https://hg.mozilla.org/integration/autoland/rev/0f248b2827af
Part 2. Add more comments and construct PaintState in PaintTextParams. r=jfkthame
https://hg.mozilla.org/integration/autoland/rev/9be24f375ba6
Part 3. reftest for text shadow. r=jfkthame

Comment 13

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/14bb443d532d
https://hg.mozilla.org/mozilla-central/rev/0f248b2827af
https://hg.mozilla.org/mozilla-central/rev/9be24f375ba6
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox50: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.