Opened 11 years ago
Last modified 10 years 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)
Change History (25)
comment:1 Changed 11 years ago by dsd
comment:2 Changed 11 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 11 years ago by manuq
- Owner changed from erikos to manuq
- Status changed from new to assigned
comment:4 Changed 11 years ago by manuq
- Priority changed from Unspecified by Maintainer to High
comment:5 Changed 11 years ago by manuq
- Keywords 12.1.0 added
- Milestone changed from Unspecified by Release Team to 0.96
comment:6 Changed 11 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 11 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 11 years ago by dsd
Other options to look at
- http://www.gnu.org/software/gnash/manual/gnashuser.html#options
- https://github.com/rentzsch/clicktoflash
- http://userscripts.org/scripts/show/45343 (but getting greasemonkey working in epiphany/browse might be a no-go)
comment:9 Changed 11 years ago by dsd
- Cc dsd added
comment:10 Changed 11 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":
comment:11 Changed 11 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 11 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 11 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 11 years ago by manuq
Also works in /etc/gnashrc, attaching a picture of how a page with Flash embedded looks.
Changed 11 years ago by manuq
comment:15 Changed 11 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: ↓ 17 Changed 11 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 11 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 11 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.
comment:19 Changed 11 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 11 years 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:21 Changed 11 years ago by humitos
Laptop ticket: http://dev.laptop.org/ticket/4968
comment:22 Changed 11 years ago by manuq
- Milestone changed from 0.96 to 1.0
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?)