Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change tab URL calculation for contentblockerrules.js and surrogates.js #1021

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

jonathanKingston
Copy link
Collaborator

@jonathanKingston jonathanKingston commented Oct 16, 2024

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:

  • iOS 14
  • iOS 15
  • iOS 16
  • macOS 10.15
  • macOS 11
  • macOS 12

Internal references:

Software Engineering Expectations
Technical Design Template

@jonathanKingston jonathanKingston changed the title Jkt/js tab url Change tab URL calculation for contentblockerrules.js and surrogates.js Oct 16, 2024
Copy link
Contributor

@brindy brindy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, looks better than it did. :)

@brindy brindy merged commit 4b5e53f into main Oct 16, 2024
9 checks passed
@brindy brindy deleted the jkt/js-tab-url branch October 16, 2024 16:11
samsymons added a commit that referenced this pull request Oct 21, 2024
* main:
  Second macOS CPM experiment (#1017)
  fix HStack width (#1022)
  Change tab URL calculation for contentblockerrules.js and surrogates.js (#1021)
  Add Events Firing for Phishing Detection Settings (#1012)
  Sabrina/onboarding UI updates (#1015)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants