Closed Bug 389406 Opened 18 years ago Closed 17 years ago

initial value for 'quotes' property is stored incorrectly and not reachable by -moz-initial

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dbaron, Assigned: zwol)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file, 1 obsolete file)

(Filed per bug 80887 comment 18. Please do not confuse with bug 16206; this is about how we implement the initial value, not about what it is.) The initial value for the 'quotes' property is currently stored in ua.css (in a rule matching the root). This means it's not accessible via the -moz-initial value. We should implement the initial value in C++ (in nsStyleQuotes::nsStyleQuotes) and make it accessible via -moz-initial (in nsRuleNode::ComputeQuotesData).
Attached patch (rev 1) proposed patch (obsolete) — Splinter Review
I noticed this bug mentioned in code I was looking at for other reasons, and it seemed like a simple enough change, so here's a patch. I'm not sure what dbaron had in mind when he wrote "Implement eCSSUnit_Initial (correctly, unlike style structs)" but this works and doesn't duplicate the information in two places.
Assignee: nobody → zweinberg
Status: NEW → ASSIGNED
Attachment #333481 - Flags: superreview?(dbaron)
Attachment #333481 - Flags: review?(dbaron)
Comment on attachment 333481 [details] [diff] [review] (rev 1) proposed patch You should need to remove some known fails in the mochitests in layout/style/test/. Once you do that, r+sr=dbaron if the mochitests pass. (Review doesn't stand if the tests fail, or if there are no known fails to remove, since I'm pretty sure fixing this bug should fix some.)
Attachment #333481 - Flags: superreview?(dbaron)
Attachment #333481 - Flags: superreview+
Attachment #333481 - Flags: review?(dbaron)
Attachment #333481 - Flags: review+
Yep, there was one mochitest that had a TODO for quotes:-moz-initial. Another one caught an actual bug in the code: SetInitial() was calling AllocateQuotes(4) when it should have been calling AllocateQuotes(2). The addition of another variant to property_database.js is not strictly necessary but it helped me see what was actually wrong, so I figured I'd leave it. Am running the full mochitest now, and will mark this checkin-needed if it passes.
Attachment #333481 - Attachment is obsolete: true
full mochitest successful.
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Keywords: checkin-needed
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: