Closed Bug 1531437 Opened 2 years ago Closed 2 years ago

Remove backward compatibility guard for isNameValid


(DevTools :: Inspector: Rules, enhancement, P3)



(firefox67 fixed)

Firefox 67
Tracking Status
firefox67 --- fixed


(Reporter: gl, Assigned: andrewcylaw, Mentored)


(Keywords: good-first-bug)


(1 file)

In, we have a backwards compatibility guard that returns true for older versions of Firefox. Since we are already on FF67, we don't need this guard anymore. We should place the return with

return this.rule.domRule.declarations[selfIndex].isNameValid;
No longer blocks: dt-rules
Mentor: gl


I'm looking to learn more about working with the Mozilla code base. I would like to be assigned this bug, and would appreciate any help on it.

Just to double check the original functionality - if I remove the compatibility guard in <FF61, the inspector would accept all names for any new css property that we throw at it? If not, what would be a good way to double check that the changes from the guard worked?


We expect to always have this accessor isNameValid. This was added in Running the test devtools/client/inspector/rules/test/browser_rules_authored.js will also help check this. The inspector would not accept all names since it is checking this accessor to see if the name is valid. We are removing the guard because the accessor is available in the recent FF. You can also manually test this by throwing in some invalid declaration names when editing the rules.

Assignee: nobody → andrewcylaw
Attached patch Bug1531437.patchSplinter Review

Hello again, sorry for the long delay. I made the code change and updated the comments. I used a command I found on the Mozilla 'Contributing' page that lets me use Git to make a Mercurial patch so I hope that's valid. The tests also passed using the following command.

./mach mochitest -f browser devtools/client/inspector/rules/test/browser_rules_authored.js

If I missed anything please let me know! Thanks in advance.

Attachment #9049406 - Flags: review+
Attachment #9049406 - Flags: feedback+
Flags: needinfo?(gl)

r+ from me.

Flags: needinfo?(gl)
Pushed by
Remove compatibility workaround for validating property names.
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
You need to log in before you can comment on or make changes to this bug.