Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Allow setting certain WebKit options #171

wants to merge 5 commits into


None yet
4 participants

niklasb commented Sep 24, 2011

Allows setting the following QtWebKit attributes (documented here):

  • :auto_load_images
  • :dns_prefetch_enabled
  • :plugins_enabled
  • :private_browsing_enabled
  • :javascript_can_open_windows
  • :javascript_can_access_clipboard
  • :offline_storage_database_enabled
  • :offline_web_application_cache_enabled
  • :local_storage_enabled
  • :local_storage_database_enabled
  • :local_content_can_access_remote_urls
  • :local_content_can_access_file_urls
  • :accelerated_compositing_enabled
  • :site_specific_quirks_enabled

Includes specs.

General information about my pull requests

As I decided to use capybara and capybara-webkit for screen scraping tasks, I added some new procedures to the webkit_server and Capybara::WebKit::Browser that provide an interface to some of the underlying QtWebKit's advanced functionality.

Note: Because I had to add several C++ source files and headers to webkit_server, I decided to give the webkit_server.pro a nicer and more version control friendly layout. This is of course optional, I don't know whether this file is somehow auto-generated?


mike-burns commented Oct 21, 2011

We don't tend to care enough about documentation on our pull requests but in this case, since there is a defined set of strings that can be passed, I'd love to see those strings mentioned in the README.

How about taking a symbol instead of (or in addition to) a string. :auto_load_images, etc.


niklasb commented Oct 21, 2011

I'm going to implement your recommended changes probably at some point tomorrow.

@niklasb niklasb closed this Oct 21, 2011

@niklasb niklasb reopened this Oct 21, 2011


niklasb commented Oct 22, 2011



mike-burns commented Nov 16, 2011

This has a lot of conflicts now. Can you rebase this against master, please?


niklasb commented Nov 16, 2011

I opened a new branch for this one, as the js-helpers pull request looks a bit messy :D


tristandunn commented Nov 21, 2011

Have you been able to successfully use localStorage with this? I tried manually modifying the code to enable it and recompiling, but no luck.


niklasb commented Nov 21, 2011

No, I haven't tried this by myself, I need this mainly for access to the autoLoadImages setting.


halogenandtoast commented Jan 13, 2012

Since your pull request only has tests for autoLoadImages and it seems like that is what you are using as well as having the other options (loadStorage) not working, I'm going to close this pull request and suggest that you open a new one for the autoLoadImages setting separately. I'd like to add some of these in but I would like to explicitly make sure the functionality works as expected per setting.


niklasb commented Jan 13, 2012

@halogenandtoast: This seems fair enough. I could probably write tests for most of those, but things like plugins_enabled, accelerated_compositing_enabled, and dns_prefetch_enabled will be hard to test. Would you reopen this if I added tests for all but these?


halogenandtoast commented Jan 13, 2012

@niklasb If you want to remove those options for the time being and test the others I'd give it another look and perhaps merge it in :D.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment