Shadow of decoration is not drawn when shadow blur is applied if text is higher than the baseline

NEW
Unassigned

Status

()

Core
Layout: Text
3 years ago
a year ago

People

(Reporter: xidorn, Unassigned)

Tracking

(Blocks: 2 bugs)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

618 bytes, text/html
Details
(Reporter)

Description

3 years ago
Created attachment 8695036 [details]
testcase

See the attachment.

When there is any shadow blur, the shadow of decoration may not be drawn properly, when text has not intersection with the decoration line. This also affects text emphasis marks because text emphasis marks never have intersection with the original text.
This issue also happens with overline and subscript.
Created attachment 8827098 [details]
testcase

Add the case with overline and subscript.
Attachment #8695036 - Attachment is obsolete: true
I try to expand the height of shadowRect[1] by 3 times, and the shadow of underline is shown. But the overline is still missing.

[1]: http://searchfox.org/mozilla-central/source/layout/generic/nsTextFrame.cpp#6205-6208
Hi Xidon, do you know where is the code to calculate the position of decoration line? I think we try to get the position of decoration line first to create a larger draw target. And I'm also interested in the framePt[1]. What is it mean?

[1]: http://searchfox.org/mozilla-central/source/layout/generic/nsTextFrame.h#402
Flags: needinfo?(xidorn+moz)
s/What is it mean/What does it mean
(Reporter)

Comment 6

a year ago
(In reply to Tommy Kuo [:KuoE0] from comment #4)
> Hi Xidon, do you know where is the code to calculate the position of
> decoration line?

The calculation code is in nsTextFrame::GetTextDecorations.

> And I'm also interested in the framePt[1]. What is it mean?

IIRC, framePt is the start point of the baseline of the text, but I could be wrong.
Flags: needinfo?(xidorn+moz)
You need to log in before you can comment on or make changes to this bug.