gecko-dev/browser/tools/mozscreenshots
Gijs Kruitbosch 387e23f588 Bug 1634032 - use a template to wrap the protections popup while it's not needed, r=nhnt11
This also only updates per-category block information in the protections panel
while it's open or when it's about to be shown. To do this, the patch:

1. changes the `categoryItem` getter on all blockers to avoid memo'izing null when the popup is unavailable;
2. changes the `updateCategoryItem` method on all blockers to deal with `categoryItem` being null;
3. stops calling `updateCategoryItem` from the blockers' `init` method, instead delegating this responsibility
   to gProtectionsHandler doing so when the popup first becomes available. Note that we still need (2) because
   pref changes can trip us calling into `updateCategoryItem` anyway. We cannot avoid instantiating the pref
   getters because they are relied on by some of the `isDetected` and `isBlocking` implementations.
4. reorganizes `onContentBlockingEvent` so it updates the icon, reports telemetry, and updates internal state -
   but only updates the panel if it's visible, and otherwise simply memorizes the last event (which is just
   a number!);
5. ensures showing the panel updates the panel's category data based on the memorized state from (4).

Differential Revision: https://phabricator.services.mozilla.com/D81926
2020-07-10 21:32:09 +00:00
..
controlCenter
devtools
mozscreenshots/extension Bug 1634032 - use a template to wrap the protections popup while it's not needed, r=nhnt11 2020-07-10 21:32:09 +00:00
permissionPrompts Bug 1627658 - Avoid login capture until user interacts with the document. r=MattN 2020-04-14 19:32:26 +00:00
preferences
primaryUI
tests Bug 1633102 - Move mozscreenshots m-bc tests to their own subdirectory. a=test-only 2020-04-25 17:37:10 +00:00
.eslintrc.js Bug 1622328 - add license info to all eslintrc files r=Standard8,webcompat-reviewers,miketaylr 2020-03-19 13:47:51 +00:00
head.js
moz.build Bug 1633102 - Move mozscreenshots m-bc tests to their own subdirectory. a=test-only 2020-04-25 17:37:10 +00:00