Open c-alpha opened 3 years ago
thread_view.cc
compiles without errors, while thread_view.hh
is free from any webkit references. So far. so good.
Further files with webkit references are:
modes/thread_view/webextension/tvextension.cc
modes/thread_view/webextension/tvextension.hh
modes/thread_view/webextension/dom_utils.cc
modes/thread_view/webextension/dom_utils.hh
modes/thread_view/page_client.cc
modes/thread_view/page_client.hh
plugin/thread_view_activatable.c
The next logical target would seem page_client.cc|hh
, since it is a friend
class of ThreadView
, and it is also the next translation unit from the above list in the build process.
WebKitGTK is a nightmare to build on macOS. It takes hours to compile (literally), it needs patches, and it doubles up functionality that is already available on the platform.
Hence, it would seem tempting to try to use the native WebKit that ships with the macOS platform. This is what this PR attempts.
I plan to do this in two steps:
WKWebView
on macOS. As all the public class interfaces have been freed from WebKitGtk references in the previous phase, I can start adding macOS-specific class implementations, that implement the public class interface (using ObjC++), but use a nativeWKWebView
. Whether these new files, or the "standard" ones for Linux are compiled will be determined by theCMakeLists.txt
build specs.A key challenge will of course be to hook the
WKWebView
into the hierarchy of Gtk graphics objects. For sure, somewhere deep down the Gtk implementation there must be a pointer or reference to some macOS native window or similar. Perhaps I can find a way to access that, and hook theWKWebView
up with that. Fingers crossed! 🤞