setPropertyPriority does not reset importance

NEW
Unassigned

Status

()

14 years ago
12 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

14 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

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

Comment 2

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

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

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

?
(Reporter)

Comment 5

14 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.
You need to log in before you can comment on or make changes to this bug.