Closed Bug 188465 Opened 22 years ago Closed 22 years ago

DOM computed style doesn't handle border-color:transparent

Categories

(Core :: DOM: CSS Object Model, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla1.3beta

People

(Reporter: dbaron, Assigned: dbaron)

References

()

Details

(Whiteboard: [patch])

Attachments

(3 files)

The DOM computed style (and thus DOM inspector on the above URL) doesn't handle
border-color: transparent.  It shows garbage data (random numbers?) instead. 
Patch coming.
Attached patch patchSplinter Review
This is a diff -uw.  I indented the stuff in the middle. :-)
Comment on attachment 111138 [details] [diff] [review]
patch

This is my first attempt at touching computed style stuff, I think.  Do make
sure I'm doing it right.  (SetIdent with a literal string is the right thing
here, no?  GetBackgroundColor does a table lookup to get the string
"transparent", but that seems silly.)
Attachment #111138 - Flags: superreview?(bzbarsky)
Attachment #111138 - Flags: review?(caillon-obsolete)
Attachment #111138 - Flags: review?(caillon-obsolete) → review?(caillon)
Status: NEW → ASSIGNED
Priority: -- → P3
Whiteboard: [patch]
Target Milestone: --- → mozilla1.3beta
Comment on attachment 111138 [details] [diff] [review]
patch

yep, doing a table lookup here seems silly.
Attachment #111138 - Flags: superreview?(bzbarsky) → superreview+
Comment on attachment 111138 [details] [diff] [review]
patch

Yep, looks good.  Is 'transparent' a legal value for one of the
-moz-border-*-colors properties?  I don't think we handle that there either, if
it is.
Attachment #111138 - Flags: review?(caillon) → review+
(Why are nsBorderColors::mColor and mTransparent not protected members to
prevent this direct access like this?)
Attachment #111182 - Flags: superreview?(bzbarsky)
Attachment #111182 - Flags: review?(caillon)
Attachment #111182 - Flags: review?(caillon) → review+
Comment on attachment 111182 [details] [diff] [review]
patch for -moz-border-*-colors

yup.
Attachment #111182 - Flags: superreview?(bzbarsky) → superreview+
What I meant with comment 6 was: do we want to create a GetBorderColor() on
nsBorderColors like we do for nsStyleBorder?  No big deal, really.  The patch is
fine as-is and if we do want to change that, it should fall under the auspices
of another bug, but just curious.
Fix checked in to trunk, 2002-01-10 11:49 PDT.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: