Closed
Bug 137686
Opened 24 years ago
Closed 15 years ago
getPropertyPriority does not work for shorthand properties
Categories
(Core :: DOM: CSS Object Model, defect, P4)
Tracking
()
RESOLVED
FIXED
Future
People
(Reporter: bzbarsky, Assigned: dbaron)
Details
(Keywords: testcase, Whiteboard: Spec clarification needed)
Attachments
(1 file)
|
1.01 KB,
text/html
|
Details |
nsDOMCSSDeclaration::GetPropertyPriority uses
nsCSSDeclaration::GetValueIsImportant, which uses nsCSSDeclaration::GetValue,
which does not handle shorthand properties. So the priority of a shorthand
property always seems to be "normal".
Since a shorthand can fail to have a well-defined priority, I feel that this
part of the spec could use some clarification....
Comment 1•24 years ago
|
||
| Reporter | ||
Comment 2•24 years ago
|
||
oops. This was supposed to go to glazou
Assignee: jst → glazman
Whiteboard: Spec clarification needed
> Since a shorthand can fail to have a well-defined priority, I feel that this
> part of the spec could use some clarification....
I disagree with that. A shorthand is "specified" is all the corresponding longhands
are set with all same priority. In that case, the priority is the common priority
of the longhands. If all corresponding longhands are not set or have different
priorities, then the shorthand is not set and its priority has no meaning.
Anyway, accepting bug.
Status: NEW → ASSIGNED
Priority: -- → P4
| Reporter | ||
Comment 4•24 years ago
|
||
> then the shorthand is not set and its priority has no meaning
This is the case I was referring to. In this case, returning "" for the
priority seems incorrect. Throwing an exception seems harsh. So the question
is, "What is reasonable behavior, and is this something the DOM spec should
address? Or should this be implementation-dependent?"
Comment 5•23 years ago
|
||
Bulk moving P1-P5 un-milestoned bugs to future.
Target Milestone: --- → Future
Updated•16 years ago
|
QA Contact: ian → general
| Assignee | ||
Updated•15 years ago
|
QA Contact: general → style-system
| Assignee | ||
Comment 6•15 years ago
|
||
This was fixed in https://hg.mozilla.org/mozilla-central/rev/7356c512e9e1 to what I consider a reasonable behavior -- we report "important" if all subproperties of the shorthand are set and important, and otherwise we report "".
I don't think it's worth having an open bug on this unless there's a specification that says something to the contrary. It may, however, be worth opening a bug on the specification, which is currently http://dev.w3.org/csswg/cssom/#dom-cssstyledeclaration-getpropertypriority
Assignee: daniel → dbaron
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 7•15 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•