Closed
Bug 42417
Opened 24 years ago
Closed 5 years ago
[meta] Supporting all CSS2 properties with getComputedStyle()
Categories
(Core :: DOM: CSS Object Model, defect, P5)
Core
DOM: CSS Object Model
Tracking
()
RESOLVED
FIXED
People
(Reporter: jst, Unassigned)
References
(Depends on 2 open bugs)
Details
(4 keywords, Whiteboard: [Hixie-PF] [ngdriver/domcss])
Attachments
(3 files)
getComputedStyle() is currently implemented in mozilla but so far only a very
small set of properties are computed and properly supported, this is a tracking
bug intended to track the implementation of the various CSS properties that can
be gequested from the computed style.
The currently implemented properties are:
left, top, right, bottom, width, hieght and display.
The DOM Level 2 CSS spec defines about 125 different properties but most of them
should be trivial to implement, and some are not supposed to be supported, like
"margin", in stead "margin-left", "margin-top", ... should be used.
The DOM Level 2 CSS spec is at
http://www.w3.org/TR/DOM-Level-2/css.html
And the CSS2 spec is at
http://www.w3.org/TR/REC-CSS2/
If you have spcial interest in some spcific property or a spcific set of
properties please file them as separate bugs and mark that this bug depends on
the new bug you file.
(the bug for getting getComputedStyle() into mozilla was bug 32169, and this bug
was split out from bug 39892)
Reporter | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Updated•24 years ago
|
Keywords: mozilla1.0
QA Contact: vidur → ian
Comment 2•24 years ago
|
||
I'd really like to see this bug fixed to work with all css properties. Is there
anything I can do that isn't C code to help with this one? I could create a
testcase for all of the properties, and file a bug for each, but I don't want to
flood bugzilla with them. Maybe a few large testcases/bugs for each category?
Let me know.
Reporter | ||
Comment 3•24 years ago
|
||
Dylan, you could write testecases for this, that would be greatly appreciated, a
HTML page that usess all the CSS2 styles on some elements and some JS that
checks that getComputedStyle() returns the right thing and document.write()'s
out the result would be great! (please use Netscape 6.01 to do this since
mozilla builds crash if you try to use getComputedStyle(), the crash is well
known and will be fixed)
Harish is currently working on this so I'm handing this bug over to him.
Assignee: jst → harishd
Status: ASSIGNED → NEW
Comment 4•24 years ago
|
||
Comment 5•24 years ago
|
||
I posted a testcase which shows the computedStyle for all CSS2 properties which
are applicable for a block level element. I will do the same for the other
display types as time permits. All styles are default. It may be more
appropriate to apply this type of testcase to a css test suite, with styles that
test proper cascading and inheritance
Updated•24 years ago
|
Component: DOM Level 2 → DOM Style
Comment 6•24 years ago
|
||
Taking QA Contact on all open or unverified DOM Style bugs...
Comment 7•24 years ago
|
||
Comment 8•24 years ago
|
||
Comment 9•24 years ago
|
||
Note that color and background-color are now returning values with px units,
which is incorrect. padding and border widths are now returning correct values
in the 2001030505 build.
Comment 10•24 years ago
|
||
Nominating this bug for nsbeta1 on behalf of gerardok@netscape.com.
Keywords: nsbeta1
Updated•24 years ago
|
Depends on: 83119
Updated•23 years ago
|
Comment 11•23 years ago
|
||
Updating the dependencies. See also bug 73525 for the issue of null vs. "" wrt
the testcases...
Comment 12•23 years ago
|
||
Handing over getComputedStyle to bzbarsky. Thanks Boris.
Assignee: harishd → bzbarsky
Updated•23 years ago
|
Status: NEW → ASSIGNED
Updated•23 years ago
|
Comment 13•23 years ago
|
||
At least in the following example getComputedStyle returns "auto" for the "left"
property. It should return the actual pixel value. I'm using nightly build
2002041521 and IIRC this has worked in previous builds.
<html>
<head>
<title>mozbug</title>
<script type="text/javascript">
function bug()
{
var view = document.defaultView;
var span = document.getElementById('span');
var style = view.getComputedStyle(span, null);
alert(style.getPropertyValue('left'));
}
</script>
</head>
<body onload="bug()">
<p>text <span id="span">span</span> text</p>
</body>
</html>
Comment 14•23 years ago
|
||
> It should return the actual pixel value.
It should absolutely not, since the element is not positioned and thus the
"left" property does not apply. See bug 109523.
Furthermore, this is a tracking bug.... please raise issues with computed style
in new bugs that you file that block this one.
Comment 15•22 years ago
|
||
*** Bug 160619 has been marked as a duplicate of this bug. ***
Updated•22 years ago
|
Keywords: helpwanted
Priority: P3 → P5
Comment 16•21 years ago
|
||
No plans to work on this any time in the foreseeable future, so to default owner.
Assignee: bz-vacation → general
Status: ASSIGNED → NEW
Updated•21 years ago
|
Priority: P5 → --
Target Milestone: Future → ---
Comment 17•19 years ago
|
||
This bug depends on 317340, but I do not have sufficient privilege to add it to the depends list.
https://bugzilla.mozilla.org/show_bug.cgi?id=317340
I have included a sample HTML file that demonstrates this problem.
getPropertyValue is broken for CSS2.
Updated•15 years ago
|
Assignee: general → nobody
QA Contact: ian → general
Updated•14 years ago
|
QA Contact: general → style-system
Comment 18•6 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven't been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Comment 19•5 years ago
|
||
No activity for 15 years, closing
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Summary: Supporting all CSS2 properties with getComputedStyle() → [meta] Supporting all CSS2 properties with getComputedStyle()
You need to log in
before you can comment on or make changes to this bug.
Description
•