Closed Bug 1531437 Opened 6 years ago Closed 6 years ago

Remove backward compatibility guard for isNameValid

Categories

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

enhancement

Tracking

(firefox67 fixed)

RESOLVED FIXED
Firefox 67
Tracking Status
firefox67 --- fixed

People

(Reporter: gl, Assigned: andrewcylaw, Mentored)

Details

(Keywords: good-first-bug)

Attachments

(1 file)

In https://searchfox.org/mozilla-central/source/devtools/client/inspector/rules/models/text-property.js#238-243, 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

Hello!

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?

Thanks!
Andrew

We expect to always have this accessor isNameValid. This was added in https://hg.mozilla.org/mozreview/gecko/rev/1419520f2e7ca7d41edc486e7a7f852867d253d4#index_header. 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
Status: NEW → ASSIGNED
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 gabriel.luong@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/211218d95e2c Remove compatibility workaround for validating property names.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: