Closed Bug 1532570 Opened 2 years ago Closed 2 years ago

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

Categories

(Core :: DOM: CSS Object Model, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: emilio, Assigned: hrdktg, Mentored)

Details

(Keywords: good-first-bug, Whiteboard: [lang=c++][wptsync upstream])

Attachments

(1 file, 1 obsolete file)

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: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
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]
Attachment #9049018 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.