-
-
Notifications
You must be signed in to change notification settings - Fork 302
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
Support multiple webviews on a single WebContext (webkit2gtk) #359
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
fa2d324
support multiple WebViews in a single WebContext
chippers e8c69fe
Merge branch 'dev' into feat/webdriver-multiwindow
chippers 4809325
wait for load-change::finished
chippers efe7b02
add doc_cfg for errors
chippers a1f1776
update os specific cfgs
chippers 3dffc01
cargo +nightly fmt
chippers 4cccf57
Revert "update os specific cfgs"
chippers 49669ae
Revert "add doc_cfg for errors"
chippers d40fae9
remove updated cfg values
chippers 63d413d
updated documentation
chippers cd7a54b
change web_context refs to mut
chippers 64864b0
update changelog
chippers f645478
clippy
chippers 4172739
clippy for win/macos
chippers aafd628
update system tray example to track tao dev changes
chippers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"wry": patch | ||
--- | ||
|
||
Support having multiple webkit2gtk `WebView`s on a single `WebContext`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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 conflict of duplocate custom protocol only happen if they share same web context.
I think this should let users to decide and we could add some warnings on the behaviour of this.
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.
yeah, in my item #2 the
with_custom_protocol
returns aResult
like some of the other builder items so that the user can choose to ignore it instead of it popping off in the InnerWebView constructor. I think we can support custom protocols on both theWebviewBuilder
and theWebContext
, where usingWebviewBuilder
it will just swallow this result inside the webview constructor, and fromWebContext
it allows the user to handle it how they wantThere 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.
I went with
register_uri_scheme
andtry_register_uri_scheme
. Both will return anErr(DuplicateCustomProtocol)
when a duplicate is passed, but the non-try one will still pass it to the underlying platform (only webkit2gtk in this instance). The code inInnerWebview
has been updated to keep the old behavior. I'll leave this conversation open if you think we should resolve it another way.I decided to keep it like this because I think there should be another PR after this for adding the register URI functions to the
WebContext
itself, which will expose both. The currentWebviewBuilder
method if we keep it will continue to use the existing wayThere 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.
I think it's fine to add both methods. But for adding URI method to
WebContext
should be exclusive on Linux imho.Mac and Windows handle them differently (and it's even a hack on Window for now). They probably don't need it.