nsDOMCSSDeclaration::SetProperty should check for the "important" string in a case-insensitive way.

RESOLVED FIXED in Firefox 67

Status

()

enhancement
P3
normal
RESOLVED FIXED
6 months ago
5 months ago

People

(Reporter: emilio, Assigned: hrdktg, Mentored)

Tracking

({good-first-bug})

unspecified
mozilla67
Points:
---

Firefox Tracking Flags

(firefox67 fixed)

Details

(Whiteboard: [lang=c++][wptsync upstream])

Attachments

(1 attachment, 1 obsolete attachment)

i.e., this should work:

document.body.style.setProperty("background-color", "red", "ImPoRtAnT");

This is a one-line change, and needs a test (if there is none already). Looks like a good first bug to me :)

Hey Emilio,
I found the change that needs to be done by looking up the docs.

I hope this is what needs to be done>>

} else if (aPriority.LowerCaseEqualsLiteral("important")) {

in declaration of nsDOMCSSDeclaration::SetProperty(...)

If that is fine, can you point me to a reference on writing test case for this particular case.

Flags: needinfo?(emilio)

It needs to be LowerCaseEqualsASCII, but yeah, that's it! Ideally some pre-existing WPT test would start passing with this change, but apparently there is none, so we could add a test to:

https://searchfox.org/mozilla-central/rev/3e0f1d95fcf8832413457e3bec802113bdd1f8e8/testing/web-platform/tests/css/cssom/css-style-declaration-modifications.html

Let me know if you need more help, thanks for looking into this!

Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/edb56e9a487b
nsDOMCSSDeclaration::SetProperty should check for the "important" string in a case-insensitive way. r=emilio
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Assignee: nobody → hrdktg
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/15754 for changes under testing/web-platform/tests
Whiteboard: [lang=c++] → [lang=c++][wptsync upstream]
Upstream PR merged
Attachment #9049018 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.