Closed
Bug 5818
Opened 25 years ago
Closed 25 years ago
problems setting properties via DOM over other properties
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
VERIFIED
INVALID
M9
People
(Reporter: dbaron, Assigned: peterl-retired)
References
()
Details
Attachments
(3 files)
This is DOM Level 2 (but that's not an official Component):
If the font property is set in a given ruleset in the stylesheet, and then I
set font-family through the DOM, the change doesn't do anything. If I instead
set font-family (and other longhand properties), things are fine.
As I said on www-dom, I think the statement now in Interface CSS2Properties on
shorthand properties should really be in setProperty and getPropertyValue. If
you go with that statement, this behavior is wrong.
Examples to be attached, both working and broken, since I'm going to change the
original page.
Reporter | ||
Comment 1•25 years ago
|
||
Reporter | ||
Comment 2•25 years ago
|
||
Aargh. It has nothing to do with the shorthand properties. I didn't do what I
thought I did when I was testing. It just doesn't work if the property is
already set in the element, whether shorthand or longhand.
Once this is fixed, you might want to use these examples to test the shorthand
properties, though. I'll still make the other attachments.
Summary: problems setting longhand properties over shorthand properties → problems setting properties via DOM over other properties
Reporter | ||
Comment 3•25 years ago
|
||
Reporter | ||
Comment 4•25 years ago
|
||
Reporter | ||
Comment 5•25 years ago
|
||
One last thing - to see the problem, type in a font name that is on your
system, and hit the "Display" button.
Updated•25 years ago
|
Status: NEW → ASSIGNED
Comment 6•25 years ago
|
||
Cc:ing Peter Linss. I'll take a look at it and see if there's anything I can do
before passing it on to Peter (who's away for the next 2 weeks).
Updated•25 years ago
|
Assignee: vidur → peterl
Status: ASSIGNED → NEW
Comment 7•25 years ago
|
||
Passing this along to Peter since it's a style system problem and I swamped with
my own.
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M9
Reporter | ||
Updated•25 years ago
|
Component: DOM Level 1 → DOM Level 2
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
Assignee | ||
Comment 8•25 years ago
|
||
The bug here is in the test case's script.
The section:
var j = 0;
while ( ( i < styleSheet.cssRules.length ) &&
(styleSheet.cssRules.item(j).type == 1) &&
(styleSheet.cssRules.item(j).selectorText == cssSelector)) {
j++;
}
should really be:
var j = 0;
while ( ( j < styleSheet.cssRules.length ) &&
(styleSheet.cssRules.item(j).type == 1) &&
(styleSheet.cssRules.item(j).selectorText != cssSelector)) {
j++;
}
Note the wrong index variable and reversed equality test of selectors.
The script is simply setting the font on the wrong style rule "div.contain"
rather than "div.contain p" so the setting is being overridden by the
"div.contain p" rule.
This can be verified by dumping the style sheets in viewer
Reporter | ||
Updated•25 years ago
|
Reporter | ||
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 9•25 years ago
|
||
Verified invalid, including the original report on shorthand properties.
Updated•24 years ago
|
Component: DOM Level 2 → DOM Other
Updated•24 years ago
|
Component: DOM Other → DOM Level 1
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•