Closed Bug 557584 Opened 12 years ago Closed 12 years ago

when combining :link/:visited colors, don't use the color components of 'transparent'

Categories

(Core :: CSS Parsing and Computation, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9.3a4

People

(Reporter: dbaron, Assigned: dbaron)

References

Details

Attachments

(1 file)

With the patch to bug 147777, I noticed an issue on the WBS forms used by the W3C for voting (no public example, I think).  The issue is essentially that some links are styled with what boils down to:
  :link { background: white }
  :visited { background: transparent }

The current rule for combining colors is to use the R, G, and B components of the appropriate color and the A component of the color-if-unvisited.  In this case, it produces bad results, because 'transparent' has R, G, and B components that are black, so we end up with visited links having a black background.

This is relatively straightforward to fix, though... I think it would improve things if, when the :visited color is rgba(0, 0, 0, 0), we don't bother switching to its r, g, b components when the relevant link is visited.

I have a patch to do this.
Attached patch patchSplinter Review
Attachment #437390 - Flags: review?(bzbarsky)
Comment on attachment 437390 [details] [diff] [review]
patch

r=bzbarsky
Attachment #437390 - Flags: review?(bzbarsky) → review+
http://hg.mozilla.org/mozilla-central/rev/1adc864a08ce
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Priority: -- → P2
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a4
You need to log in before you can comment on or make changes to this bug.