Closed
Bug 652268
Opened 14 years ago
Closed 14 years ago
dynamic changes to link state of root element don't cause correct restyling
Categories
(Core :: CSS Parsing and Computation, defect, P4)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla6
People
(Reporter: dbaron, Assigned: dbaron)
Details
Attachments
(1 file)
3.55 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
Either bz pointed out this bug during reviews of some of the :visited work (bug 147777, etc.), or I noticed it while addressing comments. I wrote a patch to fix it ages ago, but never got around to writing a test, which I just did.
In any case, when a style change on the root element includes a change only to the link visitedness or to link-ness, the style change doesn't take effect correctly because it's defeated by an incorrect check in the style context sharing code.
This patch fixes it. I confirmed that the test fails without the patch and passes with it.
Attachment #527885 -
Flags: review?(bzbarsky)
![]() |
||
Comment 1•14 years ago
|
||
Comment on attachment 527885 [details] [diff] [review]
patch
I'm pretty sure I didn't point this out, but it certainly makes sense! r=me
Attachment #527885 -
Flags: review?(bzbarsky) → review+
![]() |
||
Comment 2•14 years ago
|
||
I wonder whether we can widen this optimization, by the way. Seems like it should be valid any time oldContext and newContext have the same parent, whether that parent is null or not. Though I don't know how often this situation arises.....
Assignee | ||
Comment 3•14 years ago
|
||
We already have the optimization for the other cases through sibling sharing, as long as we haven't blown past the cache length (currently 10). See nsStyleContext::FindChildWithRules.
![]() |
||
Comment 4•14 years ago
|
||
Oh, right. OK, then!
Assignee | ||
Comment 5•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•