Closed Bug 181336 Opened 18 years ago Closed 15 years ago

small-caps are drawn in underline colour

Categories

(Core :: Layout: Text and Fonts, defect, P1)

x86
Windows 2000
defect

Tracking

()

RESOLVED FIXED
mozilla1.7alpha

People

(Reporter: ian, Assigned: dbaron)

References

()

Details

(Keywords: testcase, Whiteboard: [patch])

Attachments

(2 files)

Testcase: http://www.hixie.ch/tests/adhoc/css/fonts/variant/001.xml

If you have font-variant: small-caps set with text-decoration: underline, the
colour of the small caps (not the big caps) is drawn the colour of the
underline, not the colour of the text (like the big caps).
I'm guessing one chunk of code is doing a SetColor on a rendering context and
not undoing it, and another chunk of code is relying on the color not being changed.
yeah nsTextFrame::RenderString never sets the color on the rendering context
(this is called from PaintTextSlowly) unliks PaintAsciiText, which does set the
color.
Priority: -- → P3
Target Milestone: --- → Future
Taking.
Assignee: font → dbaron
Priority: P3 → P1
Whiteboard: [patch]
Target Milestone: Future → mozilla1.4alpha
Attached file testcase
OK, this needs a new testcase, since it's now quirks-only, since bug 1777 never
triggers this ickiness.

The issue is that RenderString calls DrawString and DrawTextDecorations in a
loop one after the other.  So the calls to SetColor before the call into
RenderString are not enough; the color needs to be set before every DrawString
in RenderString
Actually, not that simple.  Those SetColor() calls _used_ to be there. Then
anthonyd removed them as "redundant" and "breaking selection colors".  Too bad
there's no bug number cited and no steps to reproduce.... (see
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&root=/cvsroot&subdir=mozilla/layout/html/base/src&command=DIFF_FRAMESET&file=nsTextFrame.cpp&rev2=1.247&rev1=1.246)
*** Bug 6574 has been marked as a duplicate of this bug. ***
Attached patch patchSplinter Review
selection colors look fine to me
Attachment #139752 - Flags: superreview?(bz-vacation)
Attachment #139752 - Flags: review?(bz-vacation)
Comment on attachment 139752 [details] [diff] [review]
patch

Yeah, if selection colors are still good, r+sr=bzbarsky.
Attachment #139752 - Flags: superreview?(bz-vacation)
Attachment #139752 - Flags: superreview+
Attachment #139752 - Flags: review?(bz-vacation)
Attachment #139752 - Flags: review+
Target Milestone: mozilla1.4alpha → mozilla1.7alpha
Fix checked in to trunk, 2004-02-03 10:27 -0800.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Hmm.. In a current build if I select the text "HAS: PASS" in that testcase, the
selection colors are off -- the "HAS:" is green while the "PASS" is white.  The
"HAS:" is white up until I select the "P".

Similarly, if I select the "SE" in "PASSED", the "PAS" is painted in white (so
it's white on white).

Reopening; that patch is no good...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Selection problem mentioned in comment 10 is bug 235101. Adding dependency.
Depends on: 235101
(In reply to comment #11)
> Selection problem mentioned in comment 10 is bug 235101. Adding dependency.

...so this bug is still fixed.
Status: REOPENED → RESOLVED
Closed: 16 years ago15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.