-
Notifications
You must be signed in to change notification settings - Fork 868
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
[wip] use CWVWebView embedder in iOS #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
this is already handled by Chromium
rewrites `chrome` schemes to `brave` when formatting and loads them as standard requests
also now correctly destroys private mode data upon last private mode left
this disassociates explicit Tabs being mapped to a given message handler, and now passes in the correct tab based on the web view. This change also exposes the underlying WKWebView from CRWWebController which makes it safer to access
fixes a crash if the notifier dies without the observer being removed from the underlying WKWebView
… and buttons not working.
1ef0ee1
to
8dd4654
Compare
Do not merge, meant for gathering feedback on this solution's direction
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
)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