color setting on one element is bleeding into another element

RESOLVED INVALID

Status

()

Core
Graphics
RESOLVED INVALID
11 years ago
11 years ago

People

(Reporter: jtd, Unassigned)

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

11 years ago
Created attachment 284589 [details]
testcase blending with opacity and rgba colors

In the attached page, the rgba color specified for one div is leaking into the color used another div that follows.

Steps:

Open the attached webpage.  There are two lines of text that begin with "Using...".  The first is rendered inside a div with color set to rgba(0,0,0,0.5).  The second is rendered in a div that should inherit the color setting from the body, it should be black.  Since the second div has opacity set to 0.5, the color of both text items should end up the same but it appears that the second one is blended twice.  

Explicitly adding color: black to the style for the second div corrects the problem.

I'm guessing that we're forgetting to restore opacity to 1.0 somewhere.
(Reporter)

Comment 1

11 years ago
Created attachment 284590 [details]
testcase screenshot

Specifically, the h2 element contained in the div with id=blendlayer appears to be using color: rgba(0,0,0,0.5) rather than black, which should have been inherited from body.

Occurs also on Windows, so this is not a Mac only problem.
(Reporter)

Updated

11 years ago
Assignee: jdaggett → nobody
Component: GFX: Mac → GFX: Thebes
OS: Mac OS X → All
QA Contact: mac → thebes
(Reporter)

Comment 2

11 years ago
Argh, testcase is not valid HTML, div elements cannot be empty elements.  Replacing <div /> with <div></div> fixes the problem.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.