[dev] [surf] Looking for setting or patch to make links load in the same page

2017-05-31 Thread Albert Cardona
Would like to avoid opening a new window for every click on a link.

Thanks for any leads.

Albert



Re: [dev] [surf] freeze with gstreamer error

2017-05-30 Thread Albert Cardona
2017-05-30 12:26 GMT-04:00 Quentin Rameau :
> Hi Albert,
>
>> In web pages such as twitter.com, the following gstreamer errors
>> occur. The second one freezes surf.
>>
>> (WebKitWebProcess:31459): GStreamer-CRITICAL **:
>> Trying to dispose element webkitwebsrc0, but it is in PAUSED instead
>> of the NULL state.
>> You need to explicitly set elements to the NULL state before
>> dropping the final reference, to allow them to clean up.
>> This problem may also be caused by a refcounting bug in the
>> application or some element.
>>
>> (WebKitWebProcess:31459): GStreamer-CRITICAL **:
>> gst_mini_object_unref: assertion 'mini_object->refcount > 0' failed
>
> I don't really know, that's a webkit bug, surf doesn't handle video
> playback.


For the record, uninstalling the gstreamer1.0-plugins-bad package
solves this issue in Ubuntu 16.04:

$ sudo apt-get remove gstreamer1.0-plugins-bad

Albert



[dev] [surf] freeze with gstreamer error

2017-05-30 Thread Albert Cardona
In web pages such as twitter.com, the following gstreamer errors
occur. The second one freezes surf.

(WebKitWebProcess:31459): GStreamer-CRITICAL **:
Trying to dispose element webkitwebsrc0, but it is in PAUSED instead
of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.

(WebKitWebProcess:31459): GStreamer-CRITICAL **:
gst_mini_object_unref: assertion 'mini_object->refcount > 0' failed


Is there any mitigating strategy different than running with the -s
flag to disable javascript to prevent video autoplay (a dreadful
feature on itself, would be nice to disable it)?

To note that running with -p to disable plugins does not seem to
prevent video from playing.

Thanks,

Albert



Re: [dev] [surf] Errors compiling the surf-webkit2 branch

2017-05-29 Thread Albert Cardona
2017-05-29 16:13 GMT-04:00 Quentin Rameau :
>> The errors:
>>
>> surf.o: In function `main':
>> surf.c:(.text+0x3292): undefined reference to
>> `gdk_display_get_default_seat' surf.c:(.text+0x329e): undefined
>> reference to `gdk_seat_get_keyboard' collect2: error: ld returned 1
>> exit status Makefile:29: recipe for target 'surf' failed
>> make: *** [surf] Error 1
>>
>>
>> A bit of research showed that this is likely related to the use of
>> gtk3.0 vs gtk3.20
>
> Yes, it is.
>
>> , as exemplified by this patch to qemu, which
>> "solves" the issue with a macro.
>>
>> http://git.qemu.org/?p=qemu.git;a=commitdiff;h=bb732ee78cee8688e74b0f67ff8
>>
>> If there is a better solution, do please let me know.
>
> Well, instead of going through qemu history/code, you could do the same
> for surf and revert the commit introducing gdk_display_get_default_seat.


Got it:  f9714ab838e

Will do. Thank you.

Albert



Re: [dev] [surf] Errors compiling the surf-webkit2 branch

2017-05-29 Thread Albert Cardona
2017-05-29 16:08 GMT-04:00 Quentin Rameau :
>> >> Hi all,
>
> Hi Albert,
>
>> >> Upon compiling the surf-webkit2 with either cc or clang, I am
>> >> getting a number of errors.
>> >
>> > I wonder if your config.h is outdated and is supposed to declare
>> > these. Not familiarvwith surf myself.
>> >
>> > Thanks.
>>
>>
>> Thank you David, I had failed to notice that config.h had been moved
>> to config.def.h (which makes sense).
>>
>> Removing my old config.h and symlinking to config.def.h addressed
>> these surprising issues.
>
> No. That's not how it works.
> config.h is for your local changes, it's copied automatically (through
> the Makefile) from config.def.h, which obviously are the defaults.
> And this has always been the case.


Thank you, that makes it clear. The git history shows that config.h
was managed by git in September 2009, hence my comment.



Re: [dev] [surf] Errors compiling the surf-webkit2 branch

2017-05-29 Thread Albert Cardona
2017-05-29 15:44 GMT-04:00 Albert Cardona :
> 2017-05-29 15:35 GMT-04:00 David Phillips :
>> On Mon, May 29, 2017 at 03:29:47PM -0400, Albert Cardona wrote:
>>> Hi all,
>>>
>>> Upon compiling the surf-webkit2 with either cc or clang, I am getting
>>> a number of errors.
>>
>> I wonder if your config.h is outdated and is supposed to declare these.
>> Not familiarvwith surf myself.
>>
>> Thanks.
>
>
> Thank you David, I had failed to notice that config.h had been moved
> to config.def.h (which makes sense).
>
> Removing my old config.h and symlinking to config.def.h addressed
> these surprising issues.
>
> Now only two undefined references remain, which surely it's some
> library I am missing.


The errors:

surf.o: In function `main':
surf.c:(.text+0x3292): undefined reference to `gdk_display_get_default_seat'
surf.c:(.text+0x329e): undefined reference to `gdk_seat_get_keyboard'
collect2: error: ld returned 1 exit status
Makefile:29: recipe for target 'surf' failed
make: *** [surf] Error 1


A bit of research showed that this is likely related to the use of
gtk3.0 vs gtk3.20, as exemplified by this patch to qemu, which
"solves" the issue with a macro.

http://git.qemu.org/?p=qemu.git;a=commitdiff;h=bb732ee78cee8688e74b0f67ff8

If there is a better solution, do please let me know.

Thanks,

Albert



Re: [dev] [surf] Errors compiling the surf-webkit2 branch

2017-05-29 Thread Albert Cardona
2017-05-29 15:35 GMT-04:00 David Phillips :
> On Mon, May 29, 2017 at 03:29:47PM -0400, Albert Cardona wrote:
>> Hi all,
>>
>> Upon compiling the surf-webkit2 with either cc or clang, I am getting
>> a number of errors.
>
> I wonder if your config.h is outdated and is supposed to declare these.
> Not familiarvwith surf myself.
>
> Thanks.


Thank you David, I had failed to notice that config.h had been moved
to config.def.h (which makes sense).

Removing my old config.h and symlinking to config.def.h addressed
these surprising issues.

Now only two undefined references remain, which surely it's some
library I am missing.

Thanks,

Albert


-- 
http://albert.rierol.net
http://www.janelia.org/lab/cardona-lab
http://www.ini.uzh.ch/~acardona/



[dev] [surf] Errors compiling the surf-webkit2 branch

2017-05-29 Thread Albert Cardona
Hi all,

Upon compiling the surf-webkit2 with either cc or clang, I am getting
a number of errors.

Error 1:

In file included from surf.c:257:0:
config.h:71:8: error: unknown type name ‘SiteStyle’
 static SiteStyle styles[] = {
^

... which was perhaps introduced with commit 5c5273398 which modified
config.def.h:

-static SiteStyle styles[] = {
+static SiteSpecific styles[] = {

Renaming SiteSpecific to SiteStyle in surf.c:148 address this error.


Error 2:

In file included from surf.c:257:0:
config.h:2:14: error: conflicting types for ‘useragent’
 static char *useragent  = "Mozilla/5.0 (X11; U; Unix; en-US) "
  ^
surf.c:252:20: note: previous declaration of ‘useragent’ was here
 static const char *useragent;

In this one, there's an issue with the "const".


Error 3+:

A number of issues with missing definitions such as:

In file included from surf.c:257:0:
config.h:85:29: error: ‘GDK_r’ undeclared here (not in a function)
 { MODKEY|GDK_SHIFT_MASK,GDK_r,  reload, { .b = TRUE } },
 ^
config.h:87:29: error: ‘GDK_p’ undeclared here (not in a function)
 { MODKEY|GDK_SHIFT_MASK,GDK_p,  print,  { 0 } },
[...]

I am unsure as to which library is missing in the linker paths, having gtk3
and gdk installed from packages.


Given that the above issues seem petty, I wonder whether I am not using the
same compiler as the authors? gcc 5.4.0 or clang 3.8.0.

My system: Ubuntu 16.04.

Thanks for any hints.

Albert

-- 
http://albert.rierol.net
http://www.janelia.org/lab/cardona-lab
http://www.ini.uzh.ch/~acardona/