PresShell misuses InsertRule()

RESOLVED FIXED in mozilla0.9.5

Status

()

Core
Layout
RESOLVED FIXED
17 years ago
17 years ago

People

(Reporter: bz, Assigned: bz)

Tracking

Trunk
mozilla0.9.5
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

PresShell has been misusing InsertRule() all along.  It was concatenating a
bunch of rules together and then calling InsertRule() on the whole string.  Now
that I've changed InsertRule() to only parse a single rule (this seems more in
keeping with the spec) this no longer works.  To test:

1)  Set "Use my colors and ignore the document's" preference in prefs
2)  Go to www.mozilla.org

Expected:  uses default color/background
Actual: uses page's color/background
ccing Marc and aaronl because they seems to have created this code....
ccing cls.  This should also fix the AIX bustage....

reviews?  I don't think any of those rules depend on exact ordering to cascade
correctly...
Status: NEW → ASSIGNED
Keywords: patch, review
Target Milestone: --- → mozilla0.9.5

Comment 4

17 years ago
Comment on attachment 48539 [details] [diff] [review]
Proposed patch

r=cls on the portion that's been tested to work on AIX.
Attachment #48539 - Flags: review+

Comment 5

17 years ago
[s]r=attinasi - I do not really understand why you changed InsertRule to only
parse a single rule in the input string though - why is that better? Shouldn't
it then return some kind of error if more than one rule is encountered? Anyway,
that work is done and approved, so this seems now necessary, and it looks good.
> Shouldn't it then return some kind of error if more than one rule is
> encountered?

One would think... The DOM spec makes no provision for that.  Only for "unable
to parse rule" whatever that means...
Comment on attachment 48539 [details] [diff] [review]
Proposed patch

r=dbaron, although you might want to combine the two rules with selector :root into a single rule.
Attachment #48539 - Flags: superreview+
Color rules for :root combined, and checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.