Tony, you are complicating your life by trying to shove this into browse.  This could be it's own python activity and that would be easier.<div><br></div><div>To help you on your journey, I hacked something up for you 1 hour last weekend.  It is a very basic python activity that almost already matches the features of the browse insert.   It's built using WebKit2.   You may be interested in basing your further hacking off it [1].  Note that it is very rough, and lacks the proper icons, etc.</div><div><br></div><div>As a python activity, you can use the gettext framework for i18n, take advantage of the journal loading and saving, use CollabWrapper to get real time collaberation with very little code.  You could even use the WebKit WebInspector to give your students the ability to use the JS Console and the inspect element feature.  With sugar3 and python, it's all possible.</div><div><br></div><div>Thanks,,</div><div>Sam</div><div><br></div><div>[1]  <a href="https://github.com/samdroid-apps/web-maker-activity">https://github.com/samdroid-apps/web-maker-activity</a><br><div><br>On Wed, Apr 27, 2016 at 5:15 PM, Tony Anderson <tony_anderson@usa.net> wrote:<br>
<blockquote type="cite">
  
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  
  
    Hi Sam<br>
    <br>
    The goal of Utkarsh's project is to integrate Richa Sehgal's GSOC
    work with Browse. This was the original goal but at the time Gonzalo
    was not available.<br>
    Ideally, an integration with 158 would save a step, I think it would
    not be helpful to use a development project to test webkit2. This is
    a critical feature because the webkit in 157.2 does not support flex
    - an essential feature in specifying layout for reponsive design.
    This is particularly important because browsers mistreat the Sugar
    screen resulting in poor matches between activities on an XO and the
    same activity on other laptops.<br>
    <br>
    Previous versions of webkit, so far as I know, followed the W3C
    guidelines for partial implementation of html5 and css3 - as
    Internet Explorer famously did not.<br>
    <br>
    Tony<br>
    <br>
    <div class="moz-cite-prefix">On 04/27/2016 02:43 PM, Sam Parkinson
      wrote:<br>
    </div>
    <blockquote cite="mid:1461739437.1698.0@smtp.gmail.com" type="cite">Hi
      Tony,
      <div><br>
      </div>
      <div>157.2 is not a very big release.  If you're not testing the
        WebKit2 port, it is probably not helpful for finding bugs in the
        webkit2 port.</div>
      <div><br>
      </div>
      <div>If you're involved in a deployment using comodity hardware,
        this is probably something that you want to look into.  While
        webkit2 is a big change, it is very important from a security
        and web-compatibility perspective.  Webkit1 is like internet
        explorer 8 - it hasn't been updates for like the last 5 years!</div>
      <div><br>
      </div>
      <div>Thanks,</div>
      <div>Sam<br>
        <br>
        On Wed, Apr 27, 2016 at 4:19 PM, Tony Anderson
        <a class="moz-txt-link-rfc2396E" href="mailto:tony_anderson@usa.net"><tony_anderson@usa.net></a> wrote:<br>
        <blockquote type="cite">
          <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
          It may be expedient to test with Browse-157.2 which does not
          use webkit2 for now. It is doubly hard to debug one change by
          using another <br>
          software component under test.<br>
          <br>
          Tony<br>
          <br>
          <div class="moz-cite-prefix">On 04/27/2016 01:27 PM, Utkarsh
            Tiwari wrote:<br>
          </div>
          <blockquote cite="mid:CAFRUKocAwNU++Mh-g3Xg7d=GmJkB4QHVvwJ1+E=CYycDc+O7fQ@mail.gmail.com" type="cite">
            <pre wrap="">Hi,
    I pulled the 'webkit2' branch from the browse-repo and after
running the activity I am getting the errors ( can't load a page in
browse) as shown in the attachment below.

Thanks,
Utkarsh Tiwari

On 4/19/16, James Cameron <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:quozl@laptop.org"><quozl@laptop.org></a> wrote:
</pre>
            <blockquote type="cite">
              <pre wrap="">Debian bug #802380 has a link that reproduces a "WebKit has crashed"
dialog on Browse-158, for which I've attached a screenshot.

<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.reuters.com/article/2015/10/18/us-new-york-flightcenter-idUSKCN0SC14B20151018">http://www.reuters.com/article/2015/10/18/us-new-york-flightcenter-idUSKCN0SC14B20151018</a>

This was with 2.12.0, and it is probably a WebKit problem rather than
a Browse problem, but it does expose some Browse problems in handling
a WebKit crash ...

- the cursor keeps spinning,

- the home button doesn't work any more,

- the stop loading button doesn't work either,

- no evidence of the crash in the Browse logs.

The activity stop button worked fine.

On Sat, Apr 09, 2016 at 08:34:44PM +1000, <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sam@sam.today">sam@sam.today</a> wrote:
</pre>
              <blockquote type="cite">
                <pre wrap="">Hi All,

I'm happy to release an unstable version of the WebKit2 browse.  Most
things
have been ported and many bugs fixed from the original port.  Please help
by
testing this!

Special thanks to Gonzalo Odiard for his huge contribution to the port.

Thanks,
Sam

=====
Installing
=====

Note, this requires **WebKitGtk+ 2.11.3** or newer.  Practically, this
means
use Fedora 24+.

You can install the activity from the git repository branch "webkit2":
[1]
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://github.com/sugarlabs/browse-activity/tree/webkit2">https://github.com/sugarlabs/browse-activity/tree/webkit2</a>

You can use the XO bundle if you prefer:
[2]<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://people.sugarlabs.org/sam/">https://people.sugarlabs.org/sam/</a>
Browse-158.xo
(sha256sum
2cd0f96501eea9a5905d0f3bdc1fde88c85069e62d5eb7706f14f85a41b182b2)

Then open Sugar and run the Browse activity.  Please verify that it has
successfully installed version 158.

Please report bugs somewhere.  You can email me <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:sam@sam.today"><sam@sam.today></a>, reply to
this
thread, or open them somewhere on bugs.sugarlabs.org.

==================
What is good about WebKit2?
==================

* Read the WebKit Security Advisories and feel happy that you are using
WebKit2
[1]
    - Read "On WebKit Security Updates" and feel sad again (unless you
run
Fedora) [2]
* WebGL Support (Hype!)
* New javascript engine "FTL" (Faster Than Light) powered by the very new
B3
backend.  You can run Sugarizer even faster inside of Sugar!!
* Web Process Separation keeps you safer from evil internet people.
 Eventually, the web process will even be sandboxed from your system
* Pinch-to-zoom support - real time text rendering while zooming (watch
the
lag!!)
* GeoLocation support - web sites can request geo location permission
* Notification support - web sites can request permission to send you
notification

=================
Summary of Browse changes
=================

* Improve the autocomplete list (thanks to Utkarsh Tiwari)
* PDF Tab Edge case fixes (thanks to James Cameron)
*
* New history format.  This is due to a change in WebKit2 api.
  - You can open files made with old versions of browse.  However, it will
only
load the current tab page, not the full back/forward history list.
* Print to PDF support removed.  This is due to a change in WebKit2 api.
* Button to activate the Web inspector.
* The long-press for palette code got even more dodgy.  It now fakes a
right
click - this is the only way to work with the webkit2 api changes.

[1]  [3]<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://webkitgtk.org/security.html">http://webkitgtk.org/security.html</a>
[2]  [4]<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://blogs.gnome.org/mcatanzaro/2016/02/01/">https://blogs.gnome.org/mcatanzaro/2016/02/01/</a>
on-webkit-security-updates/

References:

[1] <a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://github.com/sugarlabs/browse-activity/tree/webkit2">https://github.com/sugarlabs/browse-activity/tree/webkit2</a>
[2] <a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://people.sugarlabs.org/sam/Browse-158.xo">https://people.sugarlabs.org/sam/Browse-158.xo</a>
[3] <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://webkitgtk.org/security.html">http://webkitgtk.org/security.html</a>
[4]
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://blogs.gnome.org/mcatanzaro/2016/02/01/on-webkit-security-updates/">https://blogs.gnome.org/mcatanzaro/2016/02/01/on-webkit-security-updates/</a>
</pre>
              </blockquote>
              <blockquote type="cite">
                <pre wrap="">_______________________________________________
Sugar-devel mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sugarlabs.org/listinfo/sugar-devel">http://lists.sugarlabs.org/listinfo/sugar-devel</a>
</pre>
              </blockquote>
              <pre wrap="">--
James Cameron
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://quozl.netrek.org/">http://quozl.netrek.org/</a>

</pre>
              <br>
              <fieldset class="mimeAttachmentHeader"></fieldset>
              <br>
              <pre wrap="">_______________________________________________
Sugar-devel mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sugarlabs.org/listinfo/sugar-devel">http://lists.sugarlabs.org/listinfo/sugar-devel</a>
</pre>
            </blockquote>
          </blockquote>
          <br>
        </blockquote>
      </div>
    </blockquote>
    <br>
  

</blockquote></div></div>