Closed
Bug 111815
Opened 23 years ago
Closed 23 years ago
tweak nsRuleNode::WalkRuleTree
Categories
(Core :: CSS Parsing and Computation, defect, P2)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla0.9.7
People
(Reporter: dbaron, Assigned: dbaron)
Details
(Whiteboard: [whitebox])
Attachments
(5 files, 1 obsolete file)
(deleted),
text/html
|
Details | |
(deleted),
text/html
|
Details | |
(deleted),
text/html
|
Details | |
(deleted),
patch
|
hewitt
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
waterson
:
superreview+
|
Details | Diff | Splinter Review |
I was reading nsRuleNode to try and understand how it works a little better, and
I started tweaking nsRuleNode::WalkRuleTree. I changed a few little things that
I think might make it a little faster -- I'll attach a patch. There are still
two things I don't understand:
1) Why do we need to check that |detail == eRuleNone| before skipping rule
nodes that have the inherit bit set for the struct? Doesn't having the inherit
bit set for a struct mean that they have nothing to contribute? (I noticed
removing this check messed up table borders.) This is noted with an XXXldb in
the patch.
2) [Unrelated to this patch] All of the Compute*Data functions begin with a
check that means parent* isn't set correctly when aRuleDetail == eRuleFullMixed.
How does this manage to work correctly when some of the properties are inherited?
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla0.9.7
Assignee | ||
Comment 1•23 years ago
|
||
Comment 2•23 years ago
|
||
I can explain better in person (want to spare my hands).
Assignee | ||
Comment 3•23 years ago
|
||
Assignee | ||
Comment 4•23 years ago
|
||
Assignee | ||
Comment 5•23 years ago
|
||
Assignee | ||
Comment 6•23 years ago
|
||
Hyatt couldn't figure out the answer to #1, and we found bugs when looking into
#2.
Assignee | ||
Comment 7•23 years ago
|
||
I'm wondering if #1 is related to the table element's attribute mapping function.
Assignee | ||
Comment 8•23 years ago
|
||
Attachment #59089 -
Attachment is obsolete: true
Assignee | ||
Comment 9•23 years ago
|
||
I still need to investigate issue #1, but I'd be interested in review on this patch.
Comment 10•23 years ago
|
||
sr=hyatt
Assignee | ||
Comment 11•23 years ago
|
||
I made one more comment tweak in the patch:
@@ -1423,16 +1447,23 @@
}
else if (!startStruct && ((!isReset && (detail == eRuleNone || detail ==
eRulePartialInherited))
|| detail == eRuleFullInherited)) {
- // We specified no non-inherited information and neither did any of our
parent rules. We set a bit
- // along the branch from the highest node down to our node indicating that
no non-inherited data
- // was specified.
+ // We specified no non-inherited information and neither did any of
+ // our parent rules.
+
+ // We set a bit along the branch from the highest node (ruleNode)
+ // down to our node (this) indicating that no non-inherited data was
+ // specified. This bit is guaranteed to be set already on the path
+ // from the highest node to the root node. (We can only set this
+ // bit if detail == eRuleNone because an explicit inherit value
+ // could override a non-inherited value higher in the rule tree.)
if (detail == eRuleNone)
PropagateNoneBit(bit, ruleNode);
Comment 12•23 years ago
|
||
Comment on attachment 59476 [details] [diff] [review]
patch fixing bugs above and adding more comments
r=hewitt
Attachment #59476 -
Flags: review+
Assignee | ||
Comment 13•23 years ago
|
||
Assignee | ||
Comment 14•23 years ago
|
||
Fix checked in 2001-12-01 16:44 PDT. Split off issue #1 into bug 114100.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 15•23 years ago
|
||
Comment on attachment 60060 [details] [diff] [review]
patch to fix leak (and other) regression from previous patch
sr=waterson
Attachment #60060 -
Flags: superreview+
Assignee | ||
Comment 16•23 years ago
|
||
For the record, the performance optimization of lazy calls to the parent
context's GetStyleData was restored in bug 113098.
Assignee | ||
Comment 17•23 years ago
|
||
Also, for the record, someone actually discovered this bug without reading the code:
http://groups.google.com/groups?selm=k84q8.369%24Np3.51315%40news2-win.server.ntlworld.com
Updated•22 years ago
|
Whiteboard: [whitebox]
You need to log in
before you can comment on or make changes to this bug.
Description
•