Closed Bug 3720 Opened 26 years ago Closed 25 years ago

LABEL element problematic

Categories

(Core :: Layout, defect, P3)

x86
Windows 98
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: kcanders, Assigned: pollmann)

References

()

Details

(Whiteboard: (04/09) 3jrgm@qlink.queensu.ca -- reviewed)

Attachments

(2 files)

I know Kipp opened a bug on a similar topic, but I believe this is slightly different.... The problem with the rendering in this case is that the LABEL element makes the text that is the label be entirely rendered over by a big white box. The element didn't do this when the bug that didn't allow black backgrounds to work correctly was unresolved, but now that that bug is long since plugged, the element is rendering entirely incorrectly (white boxes overwriting the text which would normally be white on the black background).
Assignee: troy → karnaze
Status: NEW → ASSIGNED
Whiteboard: (04/09) 3jrgm@qlink.queensu.ca -- reviewed
Pasting this test case in from bug #2736. As noted above, the LABELs for the FORMs show up as white squares on the black background. Example: <html><BODY BGCOLOR="#000000" TEXT="#FFFFFF"> <FORM method=post action="whatever"> <TABLE> <TR> <TD ALIGN=LEFT><I><LABEL for="siteid">Site ID:</LABEL></I></TD> <TD><INPUT type="text" name="id" size=20 id="siteid" tabindex="16"></TD> </TR> <TR> <TD ALIGN=LEFT> </TD> <TD ALIGN=CENTER><INPUT type="submit" value="Edit" tabindex="18"> <INPUT type="reset" value="Clear" tabindex="19"></TD> </TR> </TABLE> </FORM> </body></html> The problem appears to be that the LABELs background is not inheriting from the BODY (and, in this case, 'white' text on 'white' shows no text). However if you play with the colors, you can see that the text is there, but the background color does not inherit.
Target Milestone: M6
Moving to M6.
Moving to M8.
This problem is incredibly easy to fix. Remove this line: http://lxr.mozilla.org/mozilla/source/layout/html/document/src/ua.css#696 i.e., remove the "background-color: white;" declaration for the LABEL element in the ua.css file.
*** Bug 6151 has been marked as a duplicate of this bug. ***
Assignee: karnaze → pollmann
Status: ASSIGNED → NEW
Reassigning to Eric.
Status: NEW → ASSIGNED
Attached file Minimized Test Case (deleted) —
I just tested py8ieh's fix to the bug and can confirm that it is both simple and effective. Unfortunately, it has the unintended side-effect of making the labels in Example 8 look "smeared" when the page is scrolled. I also tried setting the playing with the display: value (no effect) and setting background-color to "inherit" but this had the same effect as not specifying it. Chris, according to cvsblame, you added the line "background-color: white" to ua.css. Is there a way to achieve the "opaqueness" this line gives, but let the color inherit from the parent?
Attached patch Proposed fix (deleted) — Splinter Review
Ah, it seems we weren't telling the view system that the label view has some 'transparent' pixels in it. I added this to nsLabelFrame's Reflow method immediately after the view is initialized: view->SetContentTransparency(PR_TRUE); When done in addition to py8ieh's change to ua.css, the label element inherits the background color properly, and repaints properly as well. Chris, I'm not 100% familiar with this code. Is this a reasonable fix?
Your fix is probably ok, but I'm CCing Peter just to make sure.
Sounds good to me. The label should nit have a background unless the author gives it one.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Just checked in a fix.
Status: RESOLVED → VERIFIED
Fixed in the June 14th Build.
*** Bug 7779 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: