Closed
Bug 39642
Opened 26 years ago
Closed 26 years ago
Changing HTML attributes does not cause style update
Categories
(Core :: CSS Parsing and Computation, defect, P2)
Core
CSS Parsing and Computation
Tracking
()
VERIFIED
FIXED
M16
People
(Reporter: attinasi, Assigned: shaver)
References
Details
(Whiteboard: [nsbeta2+][6/15][5/30: going in today when tree opens])
Attachments
(2 files)
Changing some HTML attributes (like bgcolor) via the DOM is not causing the
style to change. This is due to shaver's recent changes that look for attrivutes
that are relevant to rules - well, many HTML attributes are implicitly mapped to
CSS and are thus relevant, even though they may not appear in selectors.
I have a patch that fixes this by restricting shaver's changes to XML content
and not HTML content.
This is critical because many basic HTML attribute changes are not doing
anything.
| Assignee | ||
Comment 1•26 years ago
|
||
Yeah, this is sucky. Let's fix it. =)
| Reporter | ||
Comment 2•26 years ago
|
||
| Reporter | ||
Comment 3•26 years ago
|
||
Marking nsbeta2: this is going to affect a lot of HTML pages. The fix is also
pretty simple and low-risk. I strongly urge fixing this for beta2.
Status: NEW → ASSIGNED
Keywords: nsbeta2
| Reporter | ||
Updated•26 years ago
|
Priority: P3 → P2
Whiteboard: reviewed fix in hand, hoping to get approval for nsbeta2 :)
Target Milestone: --- → M16
| Assignee | ||
Comment 4•26 years ago
|
||
| Assignee | ||
Comment 5•26 years ago
|
||
I think we need my patch, too. Marc, do you agree?
| Reporter | ||
Comment 6•26 years ago
|
||
We need shaver's patch too because class and ID selectors will apply to XUL
elements (since they implement nsIStyledContent), so we need to consider those
attributes as relevant.
Shaver, for XML elements the ID attribute does not have to be called 'ID' - the
XML DTD defines what the identifier attribute is, so the patch is not as general
as it could be. I don't know how to get to the attribute name for the XML
element's identifier, though :( Also, according to the CSS spec (5.8.3) class
selectors are only for HTML documents. We apply them to XML docs too though.
| Reporter | ||
Comment 7•26 years ago
|
||
Just a nsbeta2 reminder: this is a big problem as it is - changing HTML
attributes via script will not cause the element's style to be updated.
| Reporter | ||
Comment 8•26 years ago
|
||
Adding dogfood kwd.
This is a pretty smelly problem that prevents many DHTML pages from being
rendered properly (any that change HTML presentational attributes, like bgcolor,
background, align to name a few).
Keywords: dogfood
| Reporter | ||
Comment 9•26 years ago
|
||
This bug needs some attention!
It is a recent regression, we have a fix, and this affects all kinds of
regression tests (ones that modify HTML attributes), and it will break 99% of
DHTML pages on the web.
What does a poor engineer have to do to get an important fix approved? I'm
cc'ing everybody I can think of to get some visibility...
Whiteboard: reviewed fix in hand, hoping to get approval for nsbeta2 :) → [fix in hand]
Comment 10•26 years ago
|
||
PDT team -- I recommend [nsbeta2][6/15]. The attributes are HTML 3.2, and they
should be settable from JavaScript, with effect, through DOM1.
Marc -- I think the PDT team has probably just fallen behind on the nominations.
Thanks for pushing to get this in!
Comment 11•26 years ago
|
||
Putting on [nsbeta2+][6/15] radar.
Whiteboard: [fix in hand] → [nsbeta2+][6/15][fix in hand]
| Reporter | ||
Comment 12•26 years ago
|
||
I checked in the AttributeAffectsStyle change.
Shaver, can you check in your patch now so we can close this puppy?
Assignee: attinasi → shaver
Status: ASSIGNED → NEW
| Assignee | ||
Updated•26 years ago
|
Whiteboard: [nsbeta2+][6/15][fix in hand] → [nsbeta2+][6/15][5/30: going in today when tree opens]
| Assignee | ||
Comment 14•26 years ago
|
||
In the tree.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Comment 15•26 years ago
|
||
Related/dup of bug 40178?
Marc, Mike: setting the bgcolor via JavaScript doesn't work, as of the 2000-06-
01-20/21-M16 builds. Setting the background via similar methods does appear to
work.
Check out:
http://voodoolady/bugzilla/nobgcolor.html for bgcolor testcase
http://voodoolady/bugzilla/nobackground.html for background testcase
Re-opening.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 16•26 years ago
|
||
Argh.
Bad HTML on my part should *not* constitute an emergency on your part.
The bgcolor file I pointed you guys to had a typo. Pardon my zeal in re-opening.
Marking VERIFIED FIXED on:
- MacOS9 2000-06-01-20-M16 Commercial Build
- Linux6 2000-06-01-20-M16 Commercial Build
- Win98 2000-06-01-20-M16 Commercial Build
Status: REOPENED → RESOLVED
Closed: 26 years ago → 26 years ago
Resolution: --- → FIXED
Comment 18•26 years ago
|
||
*** Bug 40178 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•