Closed
Bug 374907
Opened 18 years ago
Closed 18 years ago
make rule nodes know their level in the cascade
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
People
(Reporter: dbaron, Assigned: dbaron)
References
Details
(Whiteboard: [patch])
Attachments
(1 file, 4 obsolete files)
|
13.27 KB,
patch
|
Details | Diff | Splinter Review |
I'd like to make rule nodes know their level in the cascade. This would be useful for bug 240117, and perhaps other things. (I don't think the rules should know, since a style sheet could technically occur at multiple levels. I'm not sure how real a possibility that is, but I don't want to rule it out. But this does mean we need to make the level part of the equality test for rule nodes when building the lexicographic tree.)
I have a very preliminary partial patch. I stopped partway through and filed bug 374906; depending on whether that's fixed affects how I should continue.
| Assignee | ||
Updated•18 years ago
|
Whiteboard: [patch]
| Assignee | ||
Comment 1•18 years ago
|
||
Compiles and runs; not tested beyond that.
Attachment #259309 -
Attachment is obsolete: true
| Assignee | ||
Comment 2•18 years ago
|
||
Oops, forgot the hashKey callback!
Attachment #259880 -
Attachment is obsolete: true
| Assignee | ||
Comment 3•18 years ago
|
||
This one is updated to the trunk, and actually works.
Note that an alternative approach would be making rules know their level and importance. I considered that, but I think we'd break it if we ever did presentational hint stuff correctly (which would involve having an html-preshint.css that went in at the *appropriate* pres-hint level, plus making some of the the mapped attribute rules UA-level).
Attachment #259914 -
Attachment is obsolete: true
Attachment #264971 -
Flags: superreview?(bzbarsky)
Attachment #264971 -
Flags: review?(bzbarsky)
Comment 4•18 years ago
|
||
Comment on attachment 264971 [details] [diff] [review]
patch
>+++ b/layout/style/nsRuleNode.h
>+ // It's probably better to allocate the table itself using malloc and
>+ // free rather than the pres shell's arena because the table doesn't
This seems to be missing the end of the sentence...
>+++ b/layout/style/nsRuleWalker.h
>@@ -49,23 +49,27 @@ public:
>+ if (mCurrent) {
That's to handle OOM on previous calls, right? Maybe document that?
r+sr=bzbarsky with the nits.
Attachment #264971 -
Flags: superreview?(bzbarsky)
Attachment #264971 -
Flags: superreview+
Attachment #264971 -
Flags: review?(bzbarsky)
Attachment #264971 -
Flags: review+
| Assignee | ||
Comment 5•18 years ago
|
||
The comment in nsRuleNode.h was accidental copy-paste; I added a comment in nsRuleWalker.
Attachment #264971 -
Attachment is obsolete: true
| Assignee | ||
Comment 6•18 years ago
|
||
Checked in to trunk.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Updated•18 years ago
|
Flags: in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•