Closed Bug 374765 Opened 19 years ago Closed 19 years ago

selection colors are sometimes wrong

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.9alpha4

People

(Reporter: masayuki, Assigned: MatsPalmgren_bugz)

References

()

Details

(Keywords: testcase)

Attachments

(5 files, 1 obsolete file)

Attached image screenshot #1 —
Sometimes, maybe if an image is existing and there are text around it, the selection text colors are wrong. I think that this is a regression of cairo build. But I don't know the regression point. See the screenshots.
Attached image screenshot #3 —
after invalidate, it is drawn normally.
(In reply to comment #0) > Sometimes, maybe if an image is existing and there are text around it, the > selection text colors are wrong. i also see this even on selection without image (e.g. bug is also present on bugzilla search result)
Attached file Testcase #1 —
STEPS TO REPRODUCE 1. left-click-and-hold in the middle of the first paragraph 2. drag up and down a few times (selecting/deselecting the text) ACTUAL RESULT The text in the last line of the first paragraph sometimes have a light-blue foreground color (it should be white on blue, on Linux). Occasionally there is a light-blue stripe between the paragraphs. EXPECTED RESULT All selected text should have the same foreground/background color. No light-blue stripe between the paragraphs. The bug occurs in Firefox nightly 20070321 on Linux, but not in a SeaMonkey nightly build of the same date.
Keywords: testcase
OS: Windows XP → All
Attached patch Patch rev. 1 (obsolete) — — Splinter Review
This fixes it for me on Linux, I haven't tested it on Windows...
Assignee: nobody → mats.palmgren
Status: NEW → ASSIGNED
Blocks: 360793
testcase #1 is WFM using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a3pre) Gecko/20070321 Minefield/3.0a3pre ID:2007032115 [cairo]
The patch also fixes the URL/testcase on Windows XP for me.
Comment on attachment 259285 [details] [diff] [review] Patch rev. 1 The problem seems to be a missing "ctx->NewPath()" in nsDisplaySelectionOverlay::Paint http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/layout/generic/nsFrame.cpp&rev=3.713&root=/cvsroot&mark=926,965-966,971-972#926 However, there is a nsIRenderingContext::FillRect() that does what we want: http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/gfx/src/thebes/nsThebesRenderingContext.cpp&rev=1.42&root=/cvsroot&mark=666,672,702-704#665 It also seems to have a workaround for a cairo bug and it has logging... so unless there is a specific reason to use thebes context directly I suggest we use FillRect() instead.
Attachment #259285 - Flags: superreview?(pavlov)
Attachment #259285 - Flags: review?(pavlov)
Comment on attachment 259285 [details] [diff] [review] Patch rev. 1 we're getting rid of nsIRenderingContext so it would be good not to add more code using it.
Attachment #259285 - Flags: review?(pavlov) → review-
Attached patch Patch rev. 2 — — Splinter Review
Ok, here's the missing line then.
Attachment #259285 - Attachment is obsolete: true
Attachment #259294 - Flags: superreview?(pavlov)
Attachment #259294 - Flags: review?(pavlov)
Attachment #259285 - Flags: superreview?(pavlov)
Attachment #259294 - Flags: superreview?(pavlov)
Attachment #259294 - Flags: superreview+
Attachment #259294 - Flags: review?(pavlov)
Attachment #259294 - Flags: review+
Whiteboard: [checkin needed]
Checked in to trunk at 2007-03-24 02:21 PST. -> FIXED
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Hardware: PC → All
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Flags: in-testsuite?
-> v. Thank you, Mats!
Status: RESOLVED → VERIFIED
Target Milestone: --- → mozilla1.9alpha4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: