Closed
Bug 889091
Opened 13 years ago
Closed 10 years ago
getComputedStyle does not provide aggregate styles for border, background etc.
Categories
(Core :: DOM: CSS Object Model, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 137688
People
(Reporter: amitamb, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20130701 Firefox/25.0 (Nightly/Aurora)
Build ID: 20130701031115
Steps to reproduce:
1. Create an HTML page with with an element(div#d1) having some styles
#d1{
background:Red;border:1px solid #444;
}
2. Check for computed style properties background and border for the element using getComputedStyle
http://jsbin.com/izocaj/6/edit
Actual results:
getComputedStyle returned with stylesheet object having blank values for background and border
Only constituent values of styles got set i.e. backgroundColor, borderTopWidth, borderTopColor, borderTopStyle and so on...
Expected results:
background should have aggregate values calculated from all assigned background properties which wold be "rgb(255, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box" here
border should have aggregate value of assigned border values wherever possible and here specifically it should have returned "1px solid rgb(68, 68, 68)" or shouldd set border<direction> property with aggregate values
| Reporter | ||
Comment 1•13 years ago
|
||
It works as expected in Chrome 27.0.1453.116
Updated•13 years ago
|
Component: Untriaged → DOM: CSS Object Model
Product: Firefox → Core
I thought the spec required that these be empty, but I can't find any such requirement, so I guess my memory was probably wrong.
Comment 3•13 years ago
|
||
Your memory is not quite wrong. getPropertyCSSValue is required to return null for these, and we implement getPropertyValue in terms of getPropertyCSSValue.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•