Closed
Bug 383488
Opened 17 years ago
Closed 15 years ago
style.setProperty(prop,value,"important") accepts trailing tokens in value
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
People
(Reporter: MatsPalmgren_bugz, Assigned: zwol)
Details
(Keywords: testcase)
Attachments
(2 files, 2 obsolete files)
2.86 KB,
text/html
|
Details | |
17.19 KB,
patch
|
Details | Diff | Splinter Review |
style.setProperty(prop,value,"important") accepts trailing tokens in value.
(Followup from bug 383075)
Flags: in-testsuite?
Reporter | ||
Comment 1•17 years ago
|
||
Attachment #267469 -
Attachment is obsolete: true
Reporter | ||
Comment 2•17 years ago
|
||
This seems to work but the comment makes me worried I'm missing
something.
Attachment #267475 -
Flags: superreview?(dbaron)
Attachment #267475 -
Flags: review?(dbaron)
Reporter | ||
Comment 3•17 years ago
|
||
... should have bumped the IID on nsICSSParser too ...
Also, out-params should generally go at the end, so your new aIsImportant should go before the existing aChanged.
Hopefully a more complete review to follow shortly...
Comment on attachment 267475 [details] [diff] [review]
Patch rev. 1
Given comment 3, comment 4, and
> if (aPriority.IsEmpty()) {
>- return ParsePropertyValue(propID, aValue);
>+ return ParsePropertyValue(propID, aValue, PR_FALSE);
>+ }
>+ else if (aPriority.EqualsLiteral("important")) {
>+ return ParsePropertyValue(propID, aValue, PR_TRUE);
> }
Change the "else if" here to an "if".
And maybe add at least an XXX comment below that we should put a CSS parser error on the error console if the priority is unknown? Maybe even a followup bug/patch?
r+sr=dbaron with that, and sorry for the delay
Attachment #267475 -
Flags: superreview?(dbaron)
Attachment #267475 -
Flags: superreview+
Attachment #267475 -
Flags: review?(dbaron)
Attachment #267475 -
Flags: review+
Assignee | ||
Comment 6•15 years ago
|
||
I noticed this bug while filing bug 556661. I've taken the liberty of updating the patch to the latest tree and converting the original test case into a reftest. Very few changes to the code were required so I feel fairly comfortable carrying dbaron's old r+ forward, but I shan't land it immediately in case someone disagrees with me.
Assignee: matspal → zweinberg
Attachment #267475 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Comment on attachment 436635 [details] [diff] [review]
updated patch with reftest
looks fine
Assignee | ||
Comment 8•15 years ago
|
||
Landed http://hg.mozilla.org/mozilla-central/rev/60360c37c700
I'm going to bed - don't hesitate to back out if it causes trouble.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•