-
Notifications
You must be signed in to change notification settings - Fork 920
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
don't override website's document.adoptedStyleSheets #8081
Conversation
@@ -88,7 +88,8 @@ const char kHideSelectorsInjectScript[] = | |||
if (!document.adoptedStyleSheets.includes( | |||
window.content_cosmetic.cosmeticStyleSheet)) { | |||
document.adoptedStyleSheets = | |||
[window.content_cosmetic.cosmeticStyleSheet]; | |||
[window.content_cosmetic.cosmeticStyleSheet, | |||
...document.adoptedStyleSheets]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this can overwrite a website's stylesheet, is it possible for websites to "clear" cosmetic filtering that we set this way too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps a way to prevent that is to check and reapply when we do passes for 1st party to unhide
cc33ba2
to
5b9668c
Compare
Verification PASSED on
|
Resolves brave/brave-browser#14333
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: