If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

setPropertyPriority does not reset importance

NEW
Unassigned

Status

()

Core
CSS Parsing and Computation
12 years ago
11 years ago

People

(Reporter: glazou, Unassigned)

Tracking

1.7 Branch
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

12 years ago
Tested on Firefox 1.0.6 : the test attached should reset the priority of the CSS
rule but it does not...
(Reporter)

Comment 1

12 years ago
Created attachment 193693 [details]
test case
(Reporter)

Comment 2

12 years ago
Created attachment 193704 [details] [diff] [review]
tentative patch
Created attachment 193764 [details]
Testcase2
Doesn't this patch break:

p { 
  color: green ! important;
  color: red;
}

<p>This should be green.</p>

?
(Reporter)

Comment 5

12 years ago
Comment on attachment 193704 [details] [diff] [review]
tentative patch

(In reply to comment #4)
> Doesn't this patch break:
> 
> p { 
>   color: green ! important;
>   color: red;
> }
> 
> <p>This should be green.</p>
> 
> ?

DANG. Good catch David:-/
Attachment #193704 - Attachment is obsolete: true
So it's not clear to me how this stuff should behave... in particular, how should access via CSS2Properties interact with preexisting !important values?  How should setPropertyValue() really interact with them?

I'm tempted to just manually call RemoveProperty in all cases when we might need to replace a !important property with a non-!important one, but I _really_ don't want to slow down the CSS2Properties stuff, so I'd like to sort out the behavior we'll need there first.
Assignee: dbaron → nobody
QA Contact: ian → style-system
You need to log in before you can comment on or make changes to this bug.