Closed Bug 460664 Opened 16 years ago Closed 16 years ago

[FIX]fix for bug 395623 didn't change inheritance when all properties in struct are 'inherit'

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dbaron, Assigned: bzbarsky)

References

Details

(Keywords: verified1.9.0.5, Whiteboard: [sg:critical?])

Attachments

(1 file, 1 obsolete file)

Bug 395623 attempted to change what we inherit from for 'property:inherit' when property is a non-inherited property. However, testcases written during the CSS meeting (using background:inherit vs. background-color: inherit) showed that this behavior change doesn't work when all of the properties in a struct are explicitly 'inherit'. This may be a security bug, given that bug 395623 was.
Ugh. Right. That's what the assert right there is all about...
Attached patch Fix (obsolete) — Splinter Review
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #343832 - Flags: superreview?(dbaron)
Attachment #343832 - Flags: review?(dbaron)
Summary: fix for bug 395623 didn't change inheritance when all properties in struct are 'inherit' → [FIx]fix for bug 395623 didn't change inheritance when all properties in struct are 'inherit'
Summary: [FIx]fix for bug 395623 didn't change inheritance when all properties in struct are 'inherit' → [FIX]fix for bug 395623 didn't change inheritance when all properties in struct are 'inherit'
Comment on attachment 343832 [details] [diff] [review] Fix r+sr=dbaron Please also add tests for the case where we're looking at the first line of <div><p>this paragraph</p></div> where there is both a div:first-line and a p:first-line rule. The spec says the pseudo-markup for that case should involve nesting <div:first-line><p:first-line>. I don't think we do that now, but your current code will be insufficient for that when we do (since it would cause inheriting from the div::first-line). (For both cases, the original one and the one this bug fixes.) You might also want to add a comment at both places where we have this code pointing to the other place.
Attachment #343832 - Flags: superreview?(dbaron)
Attachment #343832 - Flags: superreview+
Attachment #343832 - Flags: review?(dbaron)
Attachment #343832 - Flags: review+
Added that test, and changed the adjustment code (in both places) to be: while (parentContext && parentContext->GetPseudoType() == nsCSSPseudoElements::firstLine) { parentContext = parentContext->GetParent(); } to be more future-proof. Pushed as changeset a407bdae5ea8.
Attached patch Patch as pushedSplinter Review
Attachment #343832 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Comment on attachment 343922 [details] [diff] [review] Patch as pushed Probably good to fix this on branch too.
Attachment #343922 - Flags: approval1.9.0.4?
Had to add a "background: green" to the <p> in the new test as well.
Comment on attachment 343922 [details] [diff] [review] Patch as pushed Won't have enough time for trunk testing first for this cycle, we'll catch it next time.
Attachment #343922 - Flags: approval1.9.0.4? → approval1.9.0.5?
Attachment #343922 - Flags: approval1.9.0.5? → approval1.9.0.5+
Comment on attachment 343922 [details] [diff] [review] Patch as pushed approved for 1.9.0.5, a=dveditz for release-drivers (please watch tinderbox for the tree to open before landing)
Whiteboard: [sg:critical?]
Assuming that this doesn't apply to the 1.8 branch, like bug 395623
Flags: wanted1.8.1.x-
That's correct. This doesn't apply to 1.8.
Fixed on 1.9.0 branch.
Keywords: fixed1.9.0.5
Verified for 1.9.0.5 with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5pre) Gecko/2008120105 GranParadiso/3.0.5pre using the reftest (http://mxr.mozilla.org/mozilla/source/layout/reftests/first-line/parent-style-2.html?ctype=text/html&raw=1).
Flags: wanted1.8.0.x-
Group: core-security
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: