In order to show a correct tooltip after toggling the TP switch. We
update the tooltip of the tracking protection icon when toggling the TP
switch right before the 500 ms waiting.
Differential Revision: https://phabricator.services.mozilla.com/D47587
- to check the enabled status, we must have:
- TP or ETP is enabled
- block social tracking cookies is enabled
- Hide category item while not blocking social tracking cookies
- sync behavior/tests from fingerprinter/cryptominer
- check isAllowing/isBlocking without enabled status
- add `testCategoryItem()`
Differential Revision: https://phabricator.services.mozilla.com/D46161
This patch fixes the issue by updating the allow list as soon as the
switch been toggled. And the reload still happens after the 500ms delay.
We cache the target tab in order to reload the correct tab in case tabs
change and reload the target tab after the delay. In additon, we won't
reload the tab if is has been closed since it is totally unnecessary.
We also add a test for this.
Differential Revision: https://phabricator.services.mozilla.com/D43139
By only hiding the tracker counter when the tracker counter is zero and
show the counter always other than that. By doing so, the counter
would be shown properly according the tracker number.
Differential Revision: https://phabricator.services.mozilla.com/D42717
Showing the protection panel for pages where content blocking can't add exceptions and/or
the url classifier can't classify doesn't make sense and would just be confusing to the user
and our code.
Differential Revision: https://phabricator.services.mozilla.com/D41197
This patch makes the blue dot to be shown when the tracking protection
is disabled. And this updates the style of the blue dot on the TP switch
to match the spec.
Differential Revision: https://phabricator.services.mozilla.com/D40175
Set the 'aria-label' to the tracking protection icon container in order
to support the accessibility. We need this here since the accessiblity
won't automatically get the <tooltip> element here,
Differential Revision: https://phabricator.services.mozilla.com/D40417
This patch modify the way how tooltip works on the tracking protection
icon. We use <tooltip> instead of 'tooltiptext' attribute in order to
limit the width of the tooltip in 500px.
Differential Revision: https://phabricator.services.mozilla.com/D40416
This patch replaces the fake tracker numbers with the real data from the
TrackingDBService. We will pre-fetch the counter while hovering on the
shield icon in order to avoid a flicker on updating the counter. And we
make the tracker counter be hidden by default, then display it when
there is at least one record. We also add a css transition for
avoiding the flicker.
In addition, we rename some member variable in gProtectionsHandler.
Differential Revision: https://phabricator.services.mozilla.com/D39695
This patch implements the tooltip for showing the earliest date of the
block tracker record. The tooltip will be set during the initiation
gProtectionHandler module. And it will be updated if history has been
cleared. If there is no record, we won't do anyhting since the tracker
counter will be hidden entirely.
We also add an event handler for the hovar and focus state on the shield
icon in order to pre-fetch the data from tracking database. And we will
update the date here in case that there is no record during initition
but a new record comes later. The focus event is for the keyboard
navigation feature.
Differential Revision: https://phabricator.services.mozilla.com/D39694