Opened 2 years ago

Last modified 12 months ago

#3613 assigned defect

Webkit-based Browse needs a flash conditional enabler

Reported by: greenfeld Owned by: manuq
Priority: High Milestone:
Component: Browse Version: Unspecified
Severity: Major Keywords: 12.1.0
Cc: dsd, humitos Distribution/OS: OLPC
Bug Status: Unconfirmed

Description

The Webkit-based version of Browse needs a conditional enabler for gnash/flash media.

XOs using ad- or otherwise Flash-heavy sites with 12.1.0 builds can get extremely slow, if they successfully load the page at all.

Attachments (2)

test-gnash-autoplay.png (75.1 KB) - added by manuq 2 years ago.
gnash-dbg.log-2 (1.7 KB) - added by manuq 2 years ago.
gnash log.

Download all attachments as: .zip

Change History (25)

comment:1 Changed 2 years ago by dsd

This is a regression - in previous Browse we had a "click to play" banner before the flash stuff got executed.

I'd suggest understanding how this used to work would be a good first step to solving this. (i.e. was it implemented by Browse, xulrunner or gnash? how was it enabled?)

comment:2 Changed 2 years ago by greenfeld

This was handled by the "clicktoView.xml" XBL ( https://developer.mozilla.org/en/XBL ) included in xulrunner-based versions of Browse.

comment:3 Changed 2 years ago by manuq

  • Owner changed from erikos to manuq
  • Status changed from new to assigned

comment:4 Changed 2 years ago by manuq

  • Priority changed from Unspecified by Maintainer to High

comment:5 Changed 2 years ago by manuq

  • Keywords 12.1.0 added
  • Milestone changed from Unspecified by Release Team to 0.96

comment:6 Changed 2 years ago by manuq

XBL language is not implemented in WebKit, only Gecko had it. The W3C may standarize it in the future, but is not a solution right now.

I'm trying to do this modifying the DOM. This is not documented in the WebKitGTK+ documentation, so I'm looking at the source. There's a test file: Source/WebKit/gtk/tests/testdomdocument.c

For example, having a WebKit.WebView one can do:

doc = webview.get_dom_document()
img_list = doc.get_elements_by_tag_name('img')

comment:7 Changed 2 years ago by manuq

On the other hand, seems that one can connect to the "resource-request-starting" signal of the web view to prevent the loading, looking for the flash mime-type.

comment:8 Changed 2 years ago by dsd

comment:9 Changed 2 years ago by dsd

  • Cc dsd added

comment:10 Changed 2 years ago by manuq

GreaseMonkey: Would be good to have it in webkitgtk, but unfortunatly that's not the case. Chrome have it, Safari and other mac webkit apps have a similar "greasekit".

dwb http://portix.bitbucket.org/dwb/ is a vi-like webkitgtk browser, has an extension that makes most greasemonkey scripts work:

https://bitbucket.org/portix/dwb_extensions/src/09118a636d11/src/userscripts

More interestingly, has a click-to-flash as default. so I'm checking that.

For the record, Midori http://twotoasts.de/?/pages/midori_summary.html is another webkitgtk browser that also claims to have "User scripts and user styles support":

http://wiki.xfce.org/midori/faq#user_scripts_and_styles

comment:11 Changed 2 years ago by manuq

dwb does the same that I was trying, modifies the DOM. So it is a very good reference:

https://bitbucket.org/portix/dwb/src/0583e44d0164/src/plugins.c#cl-64

comment:12 Changed 2 years ago by manuq

We can't go for the moment with a click-to-flash solution modifying the DOM as dwb does :( . Because the python bindings are not ready. In the GIR file we have:

webkit_dom_event_target_add_event_listener introspectable=0

Issue at webkitgtk mailing list (unanswered): https://lists.webkit.org/pipermail/webkit-gtk/2012-February/000934.html

comment:13 Changed 2 years ago by manuq

So this is a fix for gnash, works very well. Add a file ~/.gnashrc with this line:

set StartStopped on

comment:14 Changed 2 years ago by manuq

Also works in /etc/gnashrc, attaching a picture of how a page with Flash embedded looks.

Changed 2 years ago by manuq

comment:15 Changed 2 years ago by manuq

And the string "Click to Play" is translated, tested with Sugar set to Spanish, says "Click para reproducir".

comment:16 follow-up: Changed 2 years ago by dsd

Doesn't work for me, tested with http://www.chemgapedia.de/vsengine/info/en/help/requirements/flash.html

After clicking "click to play" the content doesnt appear until I scroll the page a little.

comment:17 in reply to: ↑ 16 Changed 2 years ago by manuq

Replying to dsd:

Doesn't work for me, tested with http://www.chemgapedia.de/vsengine/info/en/help/requirements/flash.html

After clicking "click to play" the content doesnt appear until I scroll the page a little.

Hmm same here, after click the button "click to play" highlights and the content doesn't appear. Also if after clicking you change to another tab and then come back, the flash area is grey, after scrolling a bit the content appears.

comment:18 Changed 2 years ago by manuq

Epiphany has the same issue. Tried changing other gnash settings without success (renderer cairo, quality 0, pluginsound off, etc). Attaching a log of gnash for XO-1.5 and os15.

Changed 2 years ago by manuq

gnash log.

comment:19 Changed 2 years ago by RafaelOrtiz

Just a comment: The click-to-enable flash, it's o.k for the XO-1.0 where resources are scarce, but in 1.5 and posterior it makes use of flash sites difficult as you have to click on all the flash fields to make them work. This should be addressed on the patch, or just enable all flash content w/o the need to click on it.

comment:20 Changed 23 months ago by humitos

  • Cc humitos added

There is a plugin for Google Chrome (Flash Block) that could be interesting to take a look at how it works:

https://chrome.google.com/webstore/detail/cdngiadmnkhgemkimkhiilgffbjijcie

comment:22 Changed 22 months ago by manuq

  • Milestone changed from 0.96 to 1.0

comment:23 Changed 12 months ago by dnarvaez

  • Milestone 1.0 deleted

Milestone 1.0 deleted

Note: See TracTickets for help on using tickets.