Closed Bug 1593573 Opened 8 months ago Closed 8 months ago

When STP is disabled, the social category item is not correctly handled by the section logic

Categories

(Firefox :: Protections UI, defect, P3)

defect

Tracking

()

RESOLVED FIXED
Firefox 72
Tracking Status
firefox72 --- fixed

People

(Reporter: nhnt11, Assigned: nhnt11)

References

Details

Attachments

(4 files)

Attached image 743c07c7a9.png

Since we are only setting .hidden on the category item, the logic in reorderCategoryItem doesn't realize that it needs to pretend that the social category is basically always "None Detected".

Here's just one way to get into a state where the bug is visible:

  1. Set urlclassifier.features.socialtracking.annotate.blacklistHosts to social-tracking-protection-digest256.dummytracker.org (currently necessary but this might be worked around on Steve's site at some point).
  2. Open https://senglehardt.com/test/trackingprotection/test_pages/social_tracking_protection.html
  3. Open about:config in a new tab and privacy.socialtracking.block_cookies.enabled to false.
  4. Close the tab. The previous tab with Steve's site will be selected.
  5. Now, open the protections panel.

Expected:
The "Allowed" section is completely hidden

Actual:
The "Allowed" section header is shown but with no items under it. (Screenshot attached.)

Gary, do you want to work on this? I think this should work:

  1. Instead of setting .hidden on the category item, set a custom attribute (e.g. uidisabled or something)
  2. Add a CSS rule to set display: none; on elements with this attribute.
  3. Add || categoryItem.hasAttribute("uidisabled") to the condition here
Flags: needinfo?(xeonchen)

Never mind, I had some time to make a patch. :)

Assignee: nobody → nhnt11
Status: NEW → ASSIGNED

(In reply to Nihanth Subramanya [:nhnt11] from comment #2)

Never mind, I had some time to make a patch. :)

Thanks, please let me know if anything I can help :D

Flags: needinfo?(xeonchen)
Pushed by nhnt11@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/2fa5d33ca68a
Make sure we correctly build the UI when STP is disabled. r=xeonchen
https://hg.mozilla.org/integration/autoland/rev/be848609eea8
Update socialtracking UI test. r=xeonchen
Pushed by nhnt11@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/eaf25cd8fd03
Use skipURLs prefs instead of whitelist testEntries in social tracking UI test. r=xeonchen
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 72
You need to log in before you can comment on or make changes to this bug.