Closed Bug 240766 Opened 21 years ago Closed 21 years ago

[FIX]GetAttributeDependentStyle assumes the class attribute is "class"

Categories

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

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla1.8alpha1

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(1 file, 1 obsolete file)

This is probably a safe assumption for now, but it's not that hard to fix it...
Attached patch This would fix it (obsolete) — Splinter Review
Comment on attachment 146331 [details] [diff] [review]
This would fix it

David, what do you think?  Note that I'm OK with just wontfixing this,
especially if we feel that it's not worth the footprint or perf (though I don't
think either is really an issue here).
Attachment #146331 - Flags: superreview?(dbaron)
Attachment #146331 - Flags: review?(dbaron)
Priority: -- → P3
Summary: GetAttributeDependentStyle assumes the class attribute is "class" → [FIX]GetAttributeDependentStyle assumes the class attribute is "class"
Target Milestone: --- → mozilla1.8alpha
Comment on attachment 146331 [details] [diff] [review]
This would fix it

The first chunk of the patch is wrong.	You can't have an if-else chain, since
you need to do all 3 parts.  (Whether you need to do both of the first two is
questionable, but you definitely need the first and third together or second
and third together.)

Aren't there other places that make similar assumptions, or is this the only
one?
Attachment #146331 - Flags: superreview?(dbaron)
Attachment #146331 - Flags: superreview-
Attachment #146331 - Flags: review?(dbaron)
Attachment #146331 - Flags: review-
> The first chunk of the patch is wrong.

Indeed.  Thanks for catching that.

> Aren't there other places that make similar assumptions,

No, we've fixed the rest. This was the last one.
then this does seem worth doing
I don't see much benefit to chaining out a simple comparison there, and this
code is clearer, so I left open the possibility (admittedly remote) that ID and
class are the same attribute name (possibly in different namespaces?  OK,
remote.... ;) ).
Attachment #146331 - Attachment is obsolete: true
Attachment #146605 - Flags: superreview?(dbaron)
Attachment #146605 - Flags: review?(dbaron)
Attachment #146605 - Flags: superreview?(dbaron)
Attachment #146605 - Flags: superreview+
Attachment #146605 - Flags: review?(dbaron)
Attachment #146605 - Flags: review+
Checked in for 1.8a.
Status: NEW → RESOLVED
Closed: 21 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: