Commit graph

560 commits

Author SHA1 Message Date
Quentin Rameau
db7922f173 Free temporary certificate in setcert 2017-04-29 14:34:02 +02:00
Quentin Rameau
0d1e670ac3 Do not build SiteSpecific file when regex is invalid 2017-04-28 13:09:39 +02:00
Quentin Rameau
3c2c0a6525 Add support for using custom certificates per url 2017-04-28 12:58:36 +02:00
Quentin Rameau
eb32dd6eca Avoid using global name stylefile in setstyle() 2017-04-27 15:41:16 +02:00
Quentin Rameau
d0e3c69e59 Change site styles structure for a more generic one 2017-04-27 15:02:40 +02:00
Quentin Rameau
5c52733984 Fix 27cec48 Add a flag/keybinding for strict TLS
Forgot to add changes in main(), usage() and newwindow() too.
2017-04-23 18:31:32 +02:00
Quentin Rameau
2940d2bd07 Fix a981959 Move -t stylefile flag to -C stylefile
Forgot to modify usage() and newwindow() too.
2017-04-23 18:28:06 +02:00
Quentin Rameau
4b752834d8 Fix possible oob access of cmd in newwindow()
Thanks to tarug0 for spotting this!
2017-04-23 18:27:43 +02:00
Quentin Rameau
ac837f43b9 Bump year in program 2017-04-20 00:10:46 +02:00
Quentin Rameau
27cec48408 Add a flag and toggle keybinding for strict TLS 2017-04-20 00:10:45 +02:00
Quentin Rameau
a981959124 Move -t stylefile flag to -C stylefile 2017-04-20 00:09:01 +02:00
Quentin Rameau
ee854bb095 Rename SSL instances to TLS 2017-04-19 17:45:20 +02:00
Quentin Rameau
0247e91b00 Set strict ssl by default and handle insecure content
Non-https content in https pages is now handled separately from https
connection establishment.
2017-04-19 17:41:23 +02:00
Quentin Rameau
2355c20e92 Add a configure option for default window size 2017-04-19 19:10:21 +02:00
Quentin Rameau
b814567e2b Bump version to 2.0
We're using the new scheme: 2.x is for webkit2
2017-03-28 18:17:45 +02:00
Quentin Rameau
0cb1597801 Add contributors to the LICENSE 2017-03-28 18:17:03 +02:00
Quentin Rameau
7e02344a61 Install Atoms before initializing gtk
There a race condition in gtkplug/socket which is raised when setting
Atoms.
Use this workaround until
https://bugzilla.gnome.org/show_bug.cgi?id=778680 is fixed.
2017-03-22 17:20:36 +01:00
Michael Stevens
1abb2ebe7a Fix spelling of otherwise in surf.1
Add more spelling to surf.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2017-03-22 17:01:36 +01:00
Quentin Rameau
37e43501d8 Fix font-size setting parameter value type in newview 2017-03-06 11:00:04 +01:00
Quentin Rameau
da5290a41a Add support for loading Webkit extensions 2016-09-22 10:21:31 +02:00
Charles Lehner
c64c368d86 Reload on SIGHUP
ratiueratuie rstiure tiurest aruite rautie rautier tiue rtaruit ratiuera
This patch makes surf reload its pages when it receives a SIGHUP signal.
This makes it easier for shell scripts to trigger surf to reload.

I'm aware of using xdotool to trigger ctrl+r keypresses for reloading
but I wasn't able to get that to work in a general way. [1]

I'm sending this here in case surf maintainers and users would like to
include this in core - if not I will submit it to the wiki.

Regards,
Charles

[1] http://surf.suckless.org/files/autorefresh

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-07-08 15:02:42 +02:00
Quentin Rameau
4c41d363b7 Add a few configuration options
“enable-accelerated-2d-canvas”
“media-playback-requires-user-gesture”
“enable-site-specific-quirks”

Lookup those at
https://webkitgtk.org/reference/webkit2gtk/stable/WebKitSettings.html
2016-07-05 17:32:44 +02:00
Quentin Rameau
5a02d3e500 Fix GdkDisplay assignment in setup()
Init GTK before trying to get the default display.
2016-07-05 13:35:44 +02:00
Quentin Rameau
f9714ab838 Get rid of getkbdevice
The GTK guys nicely took in account our request and pushed in a
convenience function to get default keyboard device.
2016-07-05 13:01:56 +02:00
Christoph Lohmann
8682a4dffb Fixing the last patch to the surf style. 2016-07-05 13:01:56 +02:00
Dmitry Bogatov
cee8f0186c Check $HOME and home dir of $USER before getpwuid()->pw_dir
getpwnam(3) recommends to use $HOME instead of getpwuid()->pw_dir,
as it allows users to point programs to a different path.

Using getpwuid() also breaks namespaces-related use cases,
like `unshare -r`.

Patch was submitted by Dmitry Bogatov on the Debian bug tracker:
https://bugs.debian.org/825397

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-07-05 13:01:56 +02:00
Quentin Rameau
3530d18d8e Fix url parsing in load() 2016-07-05 13:01:56 +02:00
Quentin Rameau
7ca9421a69 Apply domain parameters each time url is changed
Urls are only changed at load (initial requested one), or while
redirected. When the page is committed, url is already final.
2016-07-05 13:01:56 +02:00
Quentin Rameau
1206b2c587 Fix inspector toggling
Always get the inspector object, and let the user eventually close it
even if it's disabled for the current page.
2016-07-05 13:01:56 +02:00
Quentin Rameau
c8fdd4d583 Rectify how parameters are handled in setparameter()
Access parameters through given Arg parameter instead of accessing
global parameters.
2016-07-05 13:01:56 +02:00
Quentin Rameau
6e019362c5 Fix parameter initialization and assignment 2016-07-05 13:01:56 +02:00
Quentin Rameau
75e3fe5b95 Adapting the whole surf structure to new settings 2016-07-05 13:01:56 +02:00
Quentin Rameau
11b34c0814 Adapt default parameters to new config style 2016-07-05 13:01:56 +02:00
Quentin Rameau
2aa1c38aed Introduce new data structure for handling settings 2016-07-05 13:01:56 +02:00
Dmitrij D. Czarkoff
d04fb9bff3 Disable globbing in curl command
Curl is invoked for downloading particular files.  Without "-g" flag it would
apply globbing rules to URLs, which may end badly in case URL is not properly
quoted.
2016-03-06 09:34:07 +01:00
Quentin Rameau
af7522006b Get rid of JavaScript for scrolling in views
This is still a hack, until WebKitGTK gives us a more practical and
stable way to do that. Manipulating directly the DOM inside a
webextension is a pain and only usable with unstable API atm.
2016-03-02 14:46:14 +01:00
Quentin Rameau
50befe4a95 Modify linking parameter 2016-03-02 14:44:06 +01:00
Christoph Lohmann
581075796a Import the arg.h from st which fixed the oob bug. 2016-03-02 14:38:34 +01:00
Quentin Rameau
934705c420 Fix title handling
Don't forget to always set the title to the current uri, this way it's
up to date when there is no title on the page (ie for local file
exploration).
Thanks to pickfire for reporting the issue.
2015-12-01 12:31:42 +01:00
Quentin Rameau
ee04671220 Fix clickexternplayer(), no need to test the target again 2015-11-24 23:18:06 +01:00
Quentin Rameau
c069b76f1b Fix user agent command-line parameter
Thanks to yui for seeing that!
2015-11-23 22:13:32 +01:00
Quentin Rameau
981ade6eeb Add webkit language settings
You can now set your prefered website languages in order.
It is also possible to enable spell checking in the same way.
2015-11-22 19:13:48 +01:00
Quentin Rameau
00f9dcdf43 Fix key handling
I had forgotten to compare configured key values against lowered pressed
key values.
Integrated keypress() into winevent().
2015-11-22 17:44:40 +01:00
Quentin Rameau
971856a579 Fix target uri handling when leaving window
Introduce a new string pointer overtitle in Client to be able to keep
the targeturi intact while modifying the former for overriding or not
the window title.
Connect to GDK_ENTER_NOTIFY to restore overtitle when refocusing on
window.
2015-11-22 16:45:22 +01:00
Quentin Rameau
d0020bad4f Adapt togglestyle()
We can't apply an empty stylesheet anymore, instead remove any previous
stylesheet.
2015-11-22 15:31:15 +01:00
Quentin Rameau
c3a827d621 Modify decideresource() and favicon handling
Return as soon as the request has been processed.
No need to modify the favicon uri, just ignore it.
2015-11-22 15:19:10 +01:00
Quentin Rameau
b70a966aa6 Style change in newview(), sort signals order 2015-11-22 13:51:05 +01:00
Quentin Rameau
cdc80731fb Fix error handling in spawn()
Be more specific about process name and exit with an error.
2015-11-22 13:44:31 +01:00
Quentin Rameau
b87123ac9b Modify default handling of cookiepolicy functions
It's more obvious this way that the default is to always accept cookies
and not the other way around.
2015-11-22 13:33:28 +01:00
Quentin Rameau
d4ac9fb6f4 Simplify handling of c->title 2015-11-22 13:24:24 +01:00