Closed
Bug 58638
Opened 24 years ago
Closed 8 years ago
DOM-CSS should support retrieval of shorthand properties
Categories
(Core :: DOM: CSS Object Model, defect, P3)
Core
DOM: CSS Object Model
Tracking
()
RESOLVED
DUPLICATE
of bug 137688
Future
People
(Reporter: buster, Assigned: glazou)
References
()
Details
(Keywords: css2, dom2, Whiteboard: [firebug-p3])
Attachments
(2 obsolete files)
using WinNT debug build, branch candidate 2 (with limbo bug fixes)
mouse over links in the "select category" box
get this assertion:
###!!! ASSERTION: can't query for shorthand properties: 'Error',
file S:\mozilla\layout\html\style\src\nsCSSDeclaration.cpp, line 3906
The result seems to be that links get highlighted but not de-hilighted.
Comment 1•24 years ago
|
||
The assertions show that some DOM-CSS script using CSS shorthand properties is
not supported. Reassigned to myself and updated the summary line (it was
"assertion mousing over link").
For more info, see bug 49174 that I shouldn't have closed without first reading
the spec at:
http://www.w3.org/TR/2000/CR-DOM-Level-2-20000307/css.html#CSS-CSS2Properties
Assignee: attinasi → pierre
OS: Windows NT → All
Hardware: PC → All
Summary: assertion mousing over link → DOM-CSS should support shorthand properties
Target Milestone: --- → Future
Updated•24 years ago
|
Status: NEW → ASSIGNED
Comment 2•24 years ago
|
||
Newer W3C document:
http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/css.html#CSS-
CSS2Properties
Comment 3•24 years ago
|
||
Netscape's standard compliance QA team reorganised itself once again, so taking
remaining non-tables style bugs. Sorry about the spam. I tried to get this done
directly at the database level, but apparently that is "not easy because of the
shadow db", "plus it screws up the audit trail", so no can do...
QA Contact: chrisd → ian
Comment 6•23 years ago
|
||
Is this still valid? Which shorthand properties are we talking about, here? And
this is so in the wrong component...
Component: Style System → DOM Style
Comment 8•23 years ago
|
||
Christopher, please don't reassign a bug when you don't know what the bug is for.
Instead, you can ask something like "shouldn't this bug be reassigned to jst?".
Daniel was working on related problems lately. Back to him.
Assignee: jst → glazman
Comment 9•21 years ago
|
||
Could someone make an attachment (I'll try to make one ASAP if nobody beated
me), I have the feeling this is fixed.
Comment 10•21 years ago
|
||
My patch for bug 125246 implemented retrieval of shorthand properties (which is
what this bug is about, I guess). Daniel Glazman also did most of the work for
serialization to shorthand properties, which is a separate issue (although
there's still a bug open for the 'font' shorthand, and 'background' could use
some improvement).
There are still some issues with nsCSSDeclaration::GetValue(nsCSSProperty,
nsAString&), though, but they should probably be separate bugs.
A testcase would be nice, though...
Comment 11•21 years ago
|
||
Now I'm not sure if I understand it correctly, but if I did, this is the test
case we need.
Comment 12•21 years ago
|
||
Comment on attachment 137802 [details]
simple test case
No, this was about retrieval, not setting.
Attachment #137802 -
Attachment is obsolete: true
Updated•21 years ago
|
Summary: DOM-CSS should support shorthand properties → DOM-CSS should support retrieval of shorthand properties
Comment 13•21 years ago
|
||
Let's try that again. If this is wrong again, I'm probably not the person to
write JS test cases...
Comment 14•21 years ago
|
||
Comment on attachment 137804 [details]
simple test case
This is far more specific than it should be. You shouldn't rely on an exact
string being returned to test this bug. (We probably return "0pt" instead of
"0".)
Attachment #137804 -
Attachment is obsolete: true
Comment 15•17 years ago
|
||
"border-color" is retrieved, but only when all four values are equal.
getComputedStyle(document.getElementById("footer"),'').getPropertyValue('borer-color');
Fails, returning the empty string.
getComputedStyle(document.getElementById("footer"),'').getPropertyValue('border-bottom-color')
Other values don't return anything. Padding: 10px - getComputedStyle(el,'').getPropertyValue('padding');
Returns the empty string.
This makes it very cumbersome to do javascript style transitions.
Style transition:
1) read an element's style
2) make a transition to styles of a new object, over time.
{ padding: "100px", margin : "20px" }
It's step (1) that fails here.
The expected result could be like what you get in IE:
javascript:alert(document.body.currentStyle.padding)
one of:
"0";
"10px 0 0"; // padding top is "10" padding left/bottom are "0"
"10px 0 0 11px"; // padding top is "10" padding left is "11"
IE gives the simplest string possible.
Or it could be a non-shorthand value, always using all four values:
"0pt 0pt 0pt 0pt"
Comment 16•17 years ago
|
||
(In reply to comment #15)
> "border-color" is retrieved, but only when all four values are equal.
Sorry ,that's wrong.
Updated•16 years ago
|
Whiteboard: [firebug-p3]
Updated•15 years ago
|
QA Contact: ian → general
Comment 18•15 years ago
|
||
Wanted to add, that this would be needed for the Style Side Panel in Firebug.
See therefore http://code.google.com/p/fbug/issues/detail?id=1189.
Updated•14 years ago
|
QA Contact: general → style-system
Comment 19•8 years ago
|
||
I think this bug is a mix of:
* duplicate of bug 125246 (fixed long ago)
* duplicate of bug 137688
* invalid (i.e., things that the spec requires)
If there are specific shorthands where we don't serialize them correctly even when we should, they should get bugs for each one. (I believe layout/style/test/test_value_storage.html tests this for every shorthand value in layout/style/test/property_database.js, so we have pretty good test coverage. In particular, see the tests that isnot(step1val, "", "...") and is(gDeclaration.getPropertyValue(property), step1val, "parse+serialize should be idempotent for ...").)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Comment 20•8 years ago
|
||
(Also duplicate of the various bugs fixed while making test_value_storage.html's tests pass.)
You need to log in
before you can comment on or make changes to this bug.
Description
•