-
Notifications
You must be signed in to change notification settings - Fork 143
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
Use Edge/WebView2 as the default browser on Windows #1466 #1637
Use Edge/WebView2 as the default browser on Windows #1466 #1637
Conversation
Test Results 383 files ± 0 383 suites ±0 5m 39s ⏱️ + 1m 4s Results for commit 09c8230. ± Comparison against base commit 44dda53. This pull request skips 4 tests.
♻️ This comment has been updated with latest results. |
c3eb4dc
to
f6617aa
Compare
bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java
Outdated
Show resolved
Hide resolved
1b76c75
to
075d949
Compare
@@ -3688,7 +3688,7 @@ public void setRedraw (boolean redraw) { | |||
private boolean embedsWin32Control () { | |||
if (this instanceof Browser) { | |||
// The Edge browser embeds webView2 | |||
return (getStyle() & SWT.EDGE) != 0; | |||
return (getStyle() & SWT.IE) == 0; |
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.
Now that we always have the "EDGE" flag set, I think we should keep this check as it was before
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.
We do not always have the flag set. By default, the style flag will simply be SWT.NONE
.
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.
In its current state (075d949) this wouldn't work because SWT.EDGE
is set if (current.equalsIgnoreCase ("edge") && "win32".equals (platform))
which means one has to explicitly provide the parameter. Not providing any parameter still sets the style to SWT.NONE
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.
Ah, right.
Alternatively, how about this, to keep this an explicit check, not an implicit one?
if (this instanceof Browser browser) {
// The Edge browser embeds webView2
return "edge".equals(browser.getBrowserType());
}
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.
Sounds good. I've adapted the code with c0466d7.
bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java
Outdated
Show resolved
Hide resolved
428a039
to
c0466d7
Compare
Changes look good. But what's that weird "The field org.eclipse.swt.SWT.IE has been added to a class" API error about? |
Where do you see that error? The added field is an (accepted) API change for which I added an according compatibility filter. |
I wanted to see what the filters were for and temporarily removed it and was wondering why that's the only occurrence of |
The filter is for introduced breaking API change. Adding a public field to a class is actually a breaking change (but one that you can usually accept as the chance of any issue because of that are unlikely).
I think there is no other filter for the |
Makes sense, thanks for the clarification! |
…1466 - Introduce SWT flag SWT.IE to be used for Browser to create an Internet Explorer instance - Adapt mapping of existing VM argument for default browser to map "ie" to new Internet Explorer flag and use Edge as default - Make SWT Browser instantiate Edge on Windows by default, i.e., unless the flag SWT.IE is specified - Adapt the SWT ControlExample to represent the SWT.IE flag and properly switch between Edge, Internet Explorer and default - Adapt Browser tests to consider to new default configuration Contributes to eclipse-platform#1466
c0466d7
to
09c8230
Compare
This seem to have missed a version bump as can be seen at https://ci.eclipse.org/releng/job/eclipse.platform.swt/job/master/828/console and even fails eclipse-platform/eclipse.platform.releng.aggregator#2649 . |
Fixes broken stream after eclipse-platform#1637
Fixes broken stream after #1637
@akurtakov I don't see the errors that you mention in the logs, only the 3 know test failures: #1564. And I don't see the relation to eclipse-platform/eclipse.platform.releng.aggregator#2649 or eclipse-equinox/equinox#716 in this PR either. Could you please be more specific so next time we know what to look for? |
We missed these messages:
Sorry for that and thank you for bumping the version, @akurtakov. Don't know why/how I missed that... I see that the Windows tests are also failing today because of some unsuccessful cleanup related to this PR (as it is related to Edge being used), see https://download.eclipse.org/eclipse/downloads/drops4/I20241211-0310/testresults/consolelogs/ep435I-unit-win32-x86_64-java17_win32.win32.x86_64_17_consolelog.txt:
Do you have a look at them, @fedejeanne @amartya4256? |
This change replaces Internet Explorer as the default browser used on Windows with Edge/WebView2.
Internet Explorer is progressively taken out of support while Edge/WebView2 and replace by Edge/WebView2. It provides a more future-proof browser integration capability for SWT on Windows, with better capabilities, performance, and development tooling support.
This change consists of the following:
Contributes to #1466
Fixes #840