Closed Bug 5425 Opened 25 years ago Closed 25 years ago

inset/outset borders not quite right

Categories

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

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: karnaze, Assigned: dcone)

Details

The outset border in the table cell below is not drawn correctly. It looks like the right and bottom edge are not either not getting painted or are getting painted the wrong color. The outset border on the table is not quite like Nav4.5 either. There is very little contrast between the edges. <html><head></head><body> <table border=3 cellspacing=5><tr><td bgcolor=yellow>foo</table> </body></html> Also, nsCSSRendering::PaintBorder has a rounding problem in the following lines aPresContext.GetPixelsToTwips(&p2t);/* XXX */ twipsPerPixel = (nscoord) p2t;/* XXX */ They should probably be: aPresContext.GetScaledPixelsToTwips(&p2t); twipsPerPixel = NSIntPixelsToTwips(1, p2t);
Don, go ahead and fix the rounding error, but please don't touch the border color computations code until Chris and I work this out. I believe his problem is that he should be using "-moz-bg-inset" and "-moz-bg-outset" styles instead of "inset" and "outset". There already was a lot of work put in to compute border colors correctly.
Here are some more comments from Peter. The table code was using the recommended border styles, so there still is a problem. Harish did some work a while back to make inset and outset borders compatible with Nav4.5. As I recall, there were conflicts with the intent of the CSS spec and the legacy behavior, so we introduced two new border styles: -moz-bg-inset & -moz-bg-outset, in CSS; or NS_STYLE_BORDER_STYLE_BG_INSET & NS_STYLE_BORDER_STYLE_BG_OUTSET, in code. The "BG" versions compute the inset/outset colors with respect to the background color so they're compatible with what Nav did. The CSS code computes the inset/ouset colors relative to the specified border color only. Your table style mapping code is probably using the CSS inset/outset instead of the BG inset/outset. Try changing it to use the BG versions.
Status: NEW → ASSIGNED
Target Milestone: M6
Target Milestone: M6 → M7
Target Milestone: M7 → M9
Target Milestone: M9 → M11
Target Milestone: M11 → M10
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fixed rounding problem
Status: RESOLVED → VERIFIED
Using 9/16 Apprunner, table looks okay. Verifying bug fixed. ChrisK - please reopen if you disagree.
You need to log in before you can comment on or make changes to this bug.