<div dir="ltr">Just a directory. It needs to be one server per activity though, so that the different port gives us a different origin.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 18 September 2013 23:32, Gonzalo Odiard <span dir="ltr"><<a href="mailto:gonzalo@laptop.org" target="_blank">gonzalo@laptop.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ok. Thanks.<div>The web server need have something special or just serve a directory is enough? </div><span class="HOEnZb"><font color="#888888"><div>
<br></div><div>Gonzalo</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 18, 2013 at 6:22 PM, Daniel Narvaez <span dir="ltr"><<a href="mailto:dwnarvaez@gmail.com" target="_blank">dwnarvaez@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Well, there are several html features which depend on each activity having their own origin, for example local storage.<div>
<div><br><br>On Wednesday, 18 September 2013, Gonzalo Odiard wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">No, why is needed use a local web server instead of<div> the use of the proposed solution (use '<span style="font-family:arial,sans-serif;font-size:13.333333969116211px">enable-file-access-from-file-</span><span style="font-family:arial,sans-serif;font-size:13.333333969116211px">uris' )</span><div>
<span style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13.333333969116211px">Gonzalo</span></div></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Sep 18, 2013 at 6:06 PM, Daniel Narvaez <span dir="ltr"><<a>dwnarvaez@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You mean why the http server would be a problem?<div><div><br><br>On Wednesday, 18 September 2013, Gonzalo Odiard wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
This is for the potential security risk of opening files outside of the activity directory,<div>or because can be a problem with different activities running at the same time</div><div>or multiple instances of the same activity?</div>
<div><br></div><div>Gonzalo</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 18, 2013 at 5:46 PM, Daniel Narvaez <span dir="ltr"><<a>dwnarvaez@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You could put an http server in the activity... Sucks but I'm not sure there is a better way :/<div>
<br><br>On Wednesday, 18 September 2013, Manuel Quiñones wrote:<br></div><div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I finally got web activities working on XO-4, in the AU build<br>
published yesterday [1] . I did it by modifying webactivities.py to<br>
use WebKitGTK1 instead of v2. The changes are:<br>
<br>
<a href="https://github.com/manuq/sugar-toolkit-gtk3-1/compare/webacts-webkit1" target="_blank">https://github.com/manuq/sugar-toolkit-gtk3-1/compare/webacts-webkit1</a><br>
<br>
I tried it with Gears Activity v3, and is working. It stores the data<br>
and the metadata. So it is communicating with the shell just fine.<br>
<br>
The touchscreen is not responding very well, at least in this<br>
activity. I can tap buttons, but I can barely drag to move a gear or<br>
to draw one. The dragging seems to be cancelled in the middle of the<br>
action. Mouse input works fine.<br>
<br>
Also as expected, the icons look small in the XO screen because I need<br>
to adapt the theme. But that is an easy one, just changing the<br>
CEL_SIZE variable in the LESS file to create another CSS for the XO<br>
screen DPI, and adding a CSS media query selector to the HTML. I'll<br>
provide a patch to sugar-web-template and will update my web<br>
activities.<br>
<br>
The inspector is not working, it does not display. It shoud display<br>
by Ctrl+Shift+I or by right-click -> "Inspect element". There is no<br>
error in the logs and the API is there [2], but nothing is happening.<br>
Surprisingly, JavaScript console logs go to the activity log. We are<br>
missing that in master.<br>
<br>
I managed to keep the activity:// scheme that we need for the<br>
same-origin policy, but I still had to add the setting<br>
'enable-file-access-from-file-uris' to workaround the cross-site<br>
requests. I can't find a way to register the URI scheme in WK1, so I<br>
added a big FIXME.<br>
<br>
[1] <a href="http://build.laptop.org.au/xo/os/sugar-100/build-21/" target="_blank">http://build.laptop.org.au/xo/os/sugar-100/build-21/</a><br>
[2] <a href="http://webkitgtk.org/reference/webkitgtk/stable/WebKitWebInspector.html" target="_blank">http://webkitgtk.org/reference/webkitgtk/stable/WebKitWebInspector.html</a><br>
<br>
<br>
--<br>
.. manuq ..<br>
_______________________________________________<br>
Sugar-devel mailing list<br>
<a>Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
</blockquote><br><br></div></div><span><font color="#888888">-- <br>Daniel Narvaez<br><br>
</font></span><br>_______________________________________________<br>
Sugar-devel mailing list<br>
<a>Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br></blockquote></div><br></div>
</blockquote><br><br></div></div><span><font color="#888888">-- <br>Daniel Narvaez<br><br>
</font></span></blockquote></div><br></div>
</blockquote><br><br></div></div><span><font color="#888888">-- <br>Daniel Narvaez<br><br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Daniel Narvaez<br>
</div>