Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upwx.html2.WebView with WebKit 2 does not display pictures from the disk #1071
Comments
This comment has been minimized.
This comment has been minimized.
Can you provide a specific example of html that doesn't work for you? I am not seeing any problems with relative or file URLs. |
This comment has been minimized.
This comment has been minimized.
@swt2c I made a minimal example where the problem is being observed. - testwebkit.zip |
This comment has been minimized.
This comment has been minimized.
Thanks for the example. Unfortunately, I still don't see the problem when using your example. I tried on Fedora 29 and Ubuntu 18.04 - in both cases I tried the distribution packages for wxPython (version 4.0.1). |
This comment has been minimized.
This comment has been minimized.
Probably these packages are compiled using WebKit 1. I also don’t see problems if I install wxPython 4.0.3 in Ubuntu 18.04. The problem is observed if I install wxPython 4.0.3 in Ubuntu 16.04 or compile from source using WebKit 2. |
This comment has been minimized.
This comment has been minimized.
I updated the example to it show engine version - testwebkit_2.zip In Ubuntu 18.04 + wxPython 4.0.3 from the wheels everything is working: In Ubuntu 18.04 + wxPython 4.0.3 from the compiled sources no images are displayed: Similarly in Ubuntu 16.04 + wxPython 4.0.3 from the wheels. |
This comment has been minimized.
This comment has been minimized.
Nope, Fedora 29 doesn't even have WebKit 1 packages, and the Ubuntu 18.04 wxwidgets package was build with WebKit2, see build log here: |
This comment has been minimized.
This comment has been minimized.
Do I understand correctly that if Ubuntu has libwebkitgtk-3.0, then the compilation will be with WebKit 1, and if there is libwebkit2gtk-4.0, then WebKit 2? |
This comment has been minimized.
This comment has been minimized.
Is there a way to explicitly specify the required version of WebKit? |
This comment has been minimized.
This comment has been minimized.
The wxWidgets build process will search for WebKit2 first, and if not found, it will search for WebKit1. Unfortunately, no there isn't a way to specify WebKit1 only, other than removing the WebKit2 development package so it will not be found. |
This comment has been minimized.
This comment has been minimized.
I compiled (Ubuntu 18.04) and uploaded wheel with which there is a problem. https://drive.google.com/drive/folders/12LqBgdQPWw0BcetRLJ0iVicpa0rKzTul?usp=sharing Try the example above with this version. |
This comment has been minimized.
This comment has been minimized.
Can you reproduce the problem? |
This comment has been minimized.
This comment has been minimized.
No, but I did not try your wheel. |
This comment has been minimized.
This comment has been minimized.
I understand when an error occurs. The error appears if there are non-Latin characters on the path to the file being opened. For example if the previous script is located at /home/jenyay/temp/webkit/test/ then everything works fine. The error occurs when the script is placed at /home/jenyay/temp/webkit/проверка/ |
This comment has been minimized.
This comment has been minimized.
Aha! That would explain why I could not reproduce it. I can reproduce now in wxWidgets. I'll look into the issue. |
This comment has been minimized.
This comment has been minimized.
I noticed that in the same case external JavaScript files are not loaded, perhaps, still CSS files, but I did not tested. |
This comment has been minimized.
This comment has been minimized.
As far as I can tell, this is a bug in WebKit2 itself. It is refusing to load those images. I am reporting it upstream. |
This comment has been minimized.
This comment has been minimized.
A bug is similar to a known issue - https://bugs.webkit.org/show_bug.cgi?id=184660. Unfortunately, they are not going to solve it. |
Jenyay commentedNov 4, 2018
Operating system: Ubuntu 18.04
wxPython version & source: wxPython 4.0.1, 4.0.3
Python version & source: Python 3.6
If you install wxPython using WebKit 2, then images with relative paths or with the file: // protocol will not be displayed. Everything works fine with WebKit 1.
I think this error is related to #981.