Closed aartaka closed 4 years ago
Looking great! This is a very welcome change!
It's also a significant change, so I'd very much like to see a test before merging this. Could you add a demo in which you instantiate the browser with a data manager, say, that stores the data somewhere else?
Here it is. I've altered the demo to meet the changes. It works and even creates the necessary directory if it's not present!
I've noticed several Data-Manager-related functions (webkit_web_view_get_website_data_manager
and webkit_web_context_get_website_data_manager
) and added them here. Also, there were several deprecated pieces of code.
One of these deprecated pieces was defcfun
of webkit_web_context_set_disk_cache_directory
. Is it used anywhere? Is it safe to remove it?
Looks good to me! :) Please fix the docstring then we can merge.
By the way, this may be the solution to a few important issues in Nyxt, so thank you in advance for taking a shot at this!
Here you go -- docstring is there. Was it only about the webkit_web_context_set_disk_cache_directory
or are there other deprecated functions?
There may be other deprecated functions but as far as this patch is concerned, that's the only one! We'll see later for the rest.
This add two connected classes form WebKit 2.10+ --
WebsiteData
andWebsiteDataManager
. These classes can ge useful, given that they simplify the complicated storage management necessary for the modern Web to work.How Has This Been Tested
cl-webkit
system was built form altered Guix package definition and compiled without erreors/warnings. Here's the definition:(define-public cl-webkit (let ((commit "0ca9d7e469d7a5c5b7ae27dad6a5c1257fe688c8")) (package (name "cl-webkit") (version (git-version "2.4" "3" commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/aartaka/cl-webkit") (commit commit))) (file-name (git-file-name "cl-webkit" version)) (sha256 (base32 "123cwnj7c3fbmc0yk1rwa6ka4x75i6p8y8hbrpd3hnrf88w35gax")))) (build-system asdf-build-system/sbcl) (inputs
(("cffi" ,sbcl-cffi) ("cl-cffi-gtk" ,sbcl-cl-cffi-gtk) ("webkitgtk" ,webkitgtk))) (arguments
(#:asd-file "webkit2/cl-webkit2.asd":asd-system-name "cl-webkit2"
currently targeting WebKit version 2. The WebKitGTK+ library adds web browsing capabilities to an application, leveraging the full power of the WebKit browsing engine.") (license license:expat))))
cl-webkit