-
Notifications
You must be signed in to change notification settings - Fork 872
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
[iOS] Use Chromium web embedder (CWVWebView
)
#24657
base: master
Are you sure you want to change the base?
Conversation
chromium_src/ios/web_view/internal/webui/web_view_web_ui_provider.mm
Outdated
Show resolved
Hide resolved
common_flags = [ "-fapplication-extension" ] | ||
cflags_objc = common_flags | ||
cflags_objcc = common_flags | ||
defines = [ "CWV_IMPLEMENTATION" ] |
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.
This needs to be redefined for cwv_exports.h
to properly export the symbols since we're copying public headers as-is
9cf323a
to
0817eb4
Compare
if webView.fullscreenState == .inFullscreen || webView.fullscreenState == .enteringFullscreen { | ||
webView.closeAllMediaPresentations { | ||
self.present(alertController, animated: true) | ||
} | ||
return | ||
} |
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.
This is done by chromium already https://source.chromium.org/chromium/chromium/src/+/main:ios/web/web_state/ui/crw_wk_ui_handler.mm;l=124
6ccffe6
to
66895b3
Compare
patches/ios-web_view-internal-cwv_web_view_configuration.mm.patch
Outdated
Show resolved
Hide resolved
patches/ios-web_view-internal-cwv_web_view_configuration.mm.patch
Outdated
Show resolved
Hide resolved
ios/web_view/web_view_sources.gni
Outdated
|
||
# This file exposes the //ios/web_view embedder as a regular source_set | ||
|
||
ios_web_view_public_headers = [ |
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.
is this different from ios_web_view_public_headers
in ios/web_view/BUILD.gn
? If so it would be better to use +=
/-=
instead of duplicating
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.
The parts under our own 1 extra public header aren't different but since the original list is defined in a GN file and not GNI I couldn't access them to add into our framework so for now it was duped. If its possible to get to let me know!
4be9903
to
0231609
Compare
042c989
to
39840e8
Compare
88bbb98
to
95bc4df
Compare
1b14183
to
1ef0ee1
Compare
1ef0ee1
to
8dd4654
Compare
8dd4654
to
7669a2f
Compare
CWVWebView
)
A Storybook has been deployed to preview UI for the latest push |
// Cleanup | ||
self.braveSearchManager = nil | ||
} | ||
) |
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.
reported by reviewdog 🐶
[semgrep] evaluateSafeJavaScript usages should be vet by the security-team.
References:
- https://github.com/brave/brave-browser/wiki/Security-reviews (point 13)
Source: https://github.com/brave/security-action/blob/main/assets/semgrep_rules/client/brave-execute-script-ios.yaml
Cc @stoletheminerals @bridiver
contentWorld: Self.scriptSandbox, | ||
escapeArgs: false | ||
) { (object, error) -> Void in | ||
return |
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.
reported by reviewdog 🐶
[semgrep] evaluateSafeJavaScript usages should be vet by the security-team.
References:
- https://github.com/brave/brave-browser/wiki/Security-reviews (point 13)
Source: https://github.com/brave/security-action/blob/main/assets/semgrep_rules/client/brave-execute-script-ios.yaml
Cc @stoletheminerals @bridiver
escapeArgs: false, | ||
asFunction: true, | ||
completion: nil | ||
) |
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.
reported by reviewdog 🐶
[semgrep] evaluateSafeJavaScript usages should be vet by the security-team.
References:
- https://github.com/brave/brave-browser/wiki/Security-reviews (point 13)
Source: https://github.com/brave/security-action/blob/main/assets/semgrep_rules/client/brave-execute-script-ios.yaml
Cc @stoletheminerals @bridiver
completionHandler: { value, error in | ||
completion?(value, error) | ||
} | ||
) |
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.
reported by reviewdog 🐶
[semgrep] evaluateJavaScript usages should be vet by the security-team.
References:
- https://github.com/brave/brave-browser/wiki/Security-reviews (point 13)
Source: https://github.com/brave/security-action/blob/main/assets/semgrep_rules/client/brave-execute-script-ios.yaml
Cc @stoletheminerals @bridiver
escapeArgs: escapeArgs, | ||
asFunction: asFunction | ||
) { value, error in | ||
continuation.resume(returning: (value, error)) |
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.
reported by reviewdog 🐶
[semgrep] evaluateSafeJavaScript usages should be vet by the security-team.
References:
- https://github.com/brave/brave-browser/wiki/Security-reviews (point 13)
Source: https://github.com/brave/security-action/blob/main/assets/semgrep_rules/client/brave-execute-script-ios.yaml
Cc @stoletheminerals @bridiver
contentWorld: contentWorld, | ||
escapeArgs: escapeArgs, | ||
asFunction: asFunction | ||
) |
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.
reported by reviewdog 🐶
[semgrep] evaluateSafeJavaScript usages should be vet by the security-team.
References:
- https://github.com/brave/brave-browser/wiki/Security-reviews (point 13)
Source: https://github.com/brave/security-action/blob/main/assets/semgrep_rules/client/brave-execute-script-ios.yaml
Cc @stoletheminerals @bridiver
escapeArgs: false, | ||
asFunction: true, | ||
completion: nil | ||
) |
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.
reported by reviewdog 🐶
[semgrep] evaluateSafeJavaScript usages should be vet by the security-team.
References:
- https://github.com/brave/brave-browser/wiki/Security-reviews (point 13)
Source: https://github.com/brave/security-action/blob/main/assets/semgrep_rules/client/brave-execute-script-ios.yaml
Cc @stoletheminerals @bridiver
The security team is monitoring all repositories for certain keywords. This PR includes the word(s) "password, safe browsing" and so security team members have been added as reviewers to take a look. |
b5e97f2
to
23b65e4
Compare
… and buttons not working.
23b65e4
to
7fd2e70
Compare
Resolves brave/brave-browser#38667
Running list:
Needs Migration
WKWebView.interactionState
, need to drop it or ignore it while restoringCWVWebView
and vice-versa.HttpsUpgradeAllowlist
when clearing browser historyBroken Features
getInternalRedirect
, loading a new request before cancelling an active load) on pages that fail to load in the end hit DCHECK (e.g.http://api.segment.io
will get upgraded tohttps
but the link itself is blocked by PiHole/content blockers)CWVWebViewConfiguration
teardown needs to be added to WebMainPartsBugs
target=_blank
but debounce breaks this)https://1password.com/downloads/mac
)http
websites hits aDCHECK
(Chromium bug)Cosmetic Issues
Product Changes
Accesses WebKit
These access
-[CWVWebView(Extras) underlyingWebView]
or-[CWVWebView(Extras) WKConfiguration]
directly and should be migrated over if possibleweb::BrowserState::GetCookieManager()
that may be a replacementFontSizeTabHelper
as a replacement but it's worseloadHTMLString
), only exposed for testing in ChromiumCleanup
CWVWebView
New Feature Support
These will get follow-up issues and can be implemented after this merges
Security Checklist
TBD