Closed
Bug 1031149
Opened 10 years ago
Closed 10 years ago
nsStyleContext::FindChildWithRules cache is passed an incorrect aRelevantLinkVisited parameter
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: dbaron, Assigned: dbaron)
References
Details
Attachments
(1 file)
(deleted),
patch
|
heycam
:
review+
|
Details | Diff | Splinter Review |
nsStyleSet::GetContext passes nsStyleContext::FindChildWithRules an incorrect aRelevantLinkVisited parameter. This parameter should correspond to whether RelevantLinkVisited() will be set on the style context, since that's what FindChildWithRules assumes it means for the cache lookup. However, GetContext hasn't yet completed the computation of whether that will be set on the style context, so it can be incorrect for descendants of links. Some of GetContext's callers fix the value up correctly, but the primary one (ResolveStyleFor) doesn't. See patch to be attached. This might lead to some styling confusion.
I should investigate whether this fixes any of: bug 554630, bug 557579, bug 575675, bug 618792, bug 868975, bug 931627, bug 952328.
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Comment 2•10 years ago
|
||
Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8447632 -
Flags: review?(cam)
Comment 4•10 years ago
|
||
Comment on attachment 8447632 [details] [diff] [review]
Consistently pass correct aRelevantLinkVisited to nsStyleContext::FindChildWithRules
Review of attachment 8447632 [details] [diff] [review]:
-----------------------------------------------------------------
Should we move the
if (aOldStyle->RelevantLinkVisited()) {
flags |= eIsVisitedLink;
}
block in nsStyleSet::ResolveStyleForRules into the
if (aOldStyle->IsLinkContext())
block?
Attachment #8447632 -
Flags: review?(cam) → review+
Assignee | ||
Comment 5•10 years ago
|
||
Bug 996796 patch 9 removes that function entirely (and later patches in that bug fix various bugs in it), so I'd rather not mess with it.
Comment 6•10 years ago
|
||
Fair enough.
Assignee | ||
Comment 7•10 years ago
|
||
And, er, actually, bug 996796 patch 11 does exactly that, in the moved code. (I wrote this patch while working on that part of the patch series there.)
Assignee | ||
Comment 8•10 years ago
|
||
Comment 9•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
QA Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•