Closed
Bug 99850
Opened 23 years ago
Closed 22 years ago
changing document.linkColor more than once has no effect
Categories
(Core :: CSS Parsing and Computation, defect, P1)
Tracking
()
VERIFIED
FIXED
mozilla1.4alpha
People
(Reporter: jruderman, Assigned: dbaron)
References
()
Details
(Keywords: testcase, Whiteboard: [CSS1-2.1][patch])
Attachments
(3 files)
933 bytes,
text/html
|
Details | |
1014 bytes,
text/html
|
Details | |
2.58 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
Steps to reproduce:
1. Drag the personal homepagify bookmarklet from
http://dmoz.org/Bookmarks/R/rpfuller/How_Not_to_Design_a_Web_Site/Bookmarklets/
onto your personal toolbar.
2. Go to http://www.cs.hmc.edu/~jruderma/s/
3. Click the bookmarklet a few times.
Result: the background and text colors keep changing, but the link colors and
visited-link colors get "stuck" on the color they were set to the first time
you activated the bookmarklet.
Changing the background color of a web page always works:
javascript:void(document.bgColor=Math.round(Math.random()*0x1000000));
But changing the link color only works the first time you do it:
javascript:void(document.linkColor=Math.round(Math.random()*0x1000000));
Assignee | ||
Comment 1•23 years ago
|
||
Assignee | ||
Comment 2•23 years ago
|
||
This is vaguely similar to some issues from bug 87674. I suspect the problem
here is that we need to invalidate some stuff in the rule tree when we change
one of the rules internally, as
HTMLStyleSheetImpl::Set{Link,VisitedLink,ActiveLink}Color do. I'm not sure why
we don't see this problem with
HTMLStyleSheetImpl::SetDocument{Foreground,Background}Color. hyatt?
Updated•23 years ago
|
Whiteboard: [CSS1-2.1]
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → Future
Comment 3•23 years ago
|
||
cc'ing myself
Comment 4•23 years ago
|
||
The modified script I am using modifies only the the linkColor attributes, then
sets the background of the DIVs to the colors the links are (it's pretty simple
if you look). The color _is_ getting set, but is having no effect on the
links. Weird.
Assignee | ||
Comment 5•23 years ago
|
||
It looks like the problem is that HTMLStyleSheetImpl::SetLinkColor needs to do
an appropriate ClearStyleData (probably via the document's StyleRuleChanged method).
Assignee | ||
Comment 6•22 years ago
|
||
This fixes the bug by moving towards style rule immutability -- it makes the
HTMLColorRule immutable.
Assignee | ||
Updated•22 years ago
|
Attachment #112873 -
Flags: superreview?(bzbarsky)
Attachment #112873 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•22 years ago
|
Whiteboard: [CSS1-2.1] → [CSS1-2.1][patch]
Target Milestone: Future → mozilla1.4alpha
Updated•22 years ago
|
Attachment #112873 -
Flags: superreview?(bzbarsky)
Attachment #112873 -
Flags: superreview+
Attachment #112873 -
Flags: review?(bzbarsky)
Attachment #112873 -
Flags: review+
Assignee | ||
Comment 7•22 years ago
|
||
Fix checked in to trunk, 2003-02-22 11:15 PST.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 8•22 years ago
|
||
verified with attachment 92012 [details] on winXP trunk build 2003-02-24-04
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 9•17 years ago
|
||
I added a set of reftests for document.linkColor and <body link>.
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•