Android and IOS ports.
scientificware opened this issue · comments
The purpose of this issue is to discuss about MathML support on Android, Linux , UNIX, IOS, OSX or Windows platforms. Which cross technology to use ?
As far as I can understand Oracle's work and Gluon Team work about JavaFX, JavaFX wraps its own implementation of WebKit.
You use it for Windows, Linux, OSX and ARM platforms. The patch #117, corrects only this native inner JavaFX implementation of WebKit.
To reach IOS and Android you use their inner implementations of WebKit. So I think that #117 has no effect in these cases.
As shown below, Android display (Screenshot 1) differs from Desktop display (Screenshot 2 and 3).
Gluon Team suspects two reasons :
- (1) they still use JavaFX 8 on Android (hence not the version patched MathML support)
- (2) they use the native webkit offered by Android itself (and wrap that in a JavaFX WebView)
If I'm correct, blocking factors depend on platform as follows :
- Desktop : only reason 1 affects the display.
- Android platform, the reason 2 is probably the main blocking factor but, on the other hand I don't know which API is used to render WebView : WebCore or Blink. Anyway both of them don't support MathML.
- IOS platform should work fine with MathML but I can't build any applications yet to test it.
What's happen :
The reason 1 (bad JavaFX/WebKit wrapping in JavaFX) explains the mis-aligment when MathML enabled.
The reason 2 (platform native WebKit usage with MathML disabled ou not implemented) explains why we see only aligned characters and without mathematical signs.
Desktop Windows and Linux platform : the JavaFX native MathML support in WebCore has been enabled since JDK7 but it was just buggy until JavaFX 8.192ea and JavaFX11 release.
-
(Screenshot 1) with JavaFX8.162, we can see bad rendering of root or fraction line and also denominator and numerator overlap.
-
(Screenshot 2) with JavaFX 8.192ea or JavaFX11, the root, the fraction line, the denominator and the numerator are at their right place (exactly what I expect).
Screenshot 1 | Screenshot 2 |
---|---|
With Android : native MathML support in WebCore has been disabled (built with MATHML flag set to DISABLE). In addition I'm not sure that Blink supports MathML yet (Igalia Team should start to implement it). Consequently, JavaFx don't support MathML on Android platform.
- That's why with Android, we can see only aligned characters without root and fraction line. When MathML is disable, WebView displays only characters on the same line and without the mathematical signs which are not simple characters.
Screenshoot 3 |
---|
With IOS : I can't test but I'm almost sure that it works, because MathML support is enabled by default. (It works with Safari).
Scenario A : If your objective is to use the inner native JavaFX WebKit implementation for IOS or Android, only reason 1 will stay a blocking factor.
This is the best scenario for me :-) Only one code for ever.
Scenario B : If your goal is still to use the inner native IOS and Android WebKit implementation only reason 2 is a blocking factor.
This would be the worst scenario for me : works with IOS but with Android it will depend on Igalia and Google agreements.
Also read discussion started with MathML on JavaFX/Android or IOS #228 issue.
Flutter / webview_flutter side
Gluon / Webkit side
Gluon InternalWebView
javafxport InternalWebView
Johan openjfx-dev mailing list announce JavaFX 11 on Android
Gluon / GeckoView side
Replace Android WebView with GeckoView in Android port ? See Firefox Focus with GeckoView
GeckoView documentation Mobile/GeckoView
Delete old geckoview-* directories in Maven's https://maven.mozilla.org/?prefix=maven2/org/mozilla/ directory
before the GV team starts promoting GV to more app developers
Article sur Communauté Mozilla francophone : GeckoView, le futur moteur de rendu dans Firefox Focus
GeckView supports MathML
. Firefox Focus (Bêta) uses GeckoView.
C.N.O. Side
Try with C.N.O., same result. Of course this is to be expected since C.N.O. browser is JavaFX WebView based.
Try to understand what is the differences between :
Gluon Mobile - Single View Project on Gluon VM
Creates a Gluon Mobile based Java application with a single View running on Gluon VM. It is targeted for Android, iOS, desktop and embedded devices, as a Gradle project. The Gradle project applies the jfxmobile plugin to run, build and debug your project.
Gluon Mobile - Single View Project
Using Gluon Mobile, and including a single View by default, creates a new Gluon Mobile based Java application, targeted for Android, iOS, desktop and embedded devices, as a Gradle project. The Gradle project applies the jfxmobile plugin to run, build and debug your project.
Document Gluon VM :
The template called "Single View Project on Gluon VM" creates a project with a build.gradle file that refers to the latest stable jfxmobile 2.x version
Found another interim solution for testing until I could also run #118 tests using Gluon VM on Android.
-
Port FXMessages using Android API's, required by the writing and sending test schedule :
- Display of recorded correspondents. Ok.
- Display of messages. Ok.
- Message sending over the mobile network. Ok.
- Message receiving over the mobile network. Ok.
- Updating message list. Ok.
- Message persistence. Ok.
- Modifiy correspondent list (Add, Modify or Delete). Ok.
- Try to use GeckoView in place of WebView (increases the apk size +25Mo). Work In Progress : pretty good results with GeckoView. We are just wainting that the multi-CPU Mozilla's gradle script works.
-
Internal tests
-
External tests from monday 5 november 2018, Led by Léa.
- Plateform tested
- Android 9 : Load, install, mathematic writing Ok. sending, receiving Ok.
- Android 8 : Load, install, Waiting feedback from students or others.
- Android 7 : Load, install, mathematic writing, sending, receiving Ok.
- Android 6 : Load, install, mathematic writing Ok. sending, receiving Ok.
- Android 5 : Load, install, mathematic writing Ok. sending, receiving Ok.
- Plateform tested
-
Back to remaining #118 issues.
-
Backport all this material, in JavaFX when OpenJFX/WebView Gluon Mobile (VM) for Android ready.
Good news 😍
Bug 1485045 - Make Java parts of GeckoView independent from build ABI r=jchen
This allows us to use the same Java code for any native platform,
enabling a "fat" AAR.
Differential Revision: https://phabricator.services.mozilla.com/D11497 se et