Change tab URL calculation for contentblockerrules.js and surrogates.js #1021
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please review the release process for BrowserServicesKit here.
Required:
Task/Issue URL: #1019 and https://app.asana.com/0/1200437802575119/1208550540369943/f
iOS PR: TODO
macOS PR: TODO
What kind of version bump will this require?: Minor
Optional:
Tech Design URL:
CC:
Description:
This PR changes the tab calculation for the page, currently it doesn't account for grand child frames at all.
This code has mostly been cribbed from: https://github.com/duckduckgo/content-scope-scripts/blob/655d12d9e77f93cc36875142aa2ff3e06c52608d/injected/src/utils.js#L135-L157
Full disclosure: I tested this manually in the console rather than doing a full build, we should verify before releasing.
Thanks to @alisha for spotting this problem in #1019, producing a well written explanation and PR!
Steps to test this PR:
For testing the blocking follow the steps in: #1019 using the console.
For surrogates the same should work for a tracker on the surrogate list:
OS Testing:
Internal references:
Software Engineering Expectations
Technical Design Template