active browser, problems with multi window

Marco Martin notmart at gmail.com
Wed Jun 8 22:34:50 CEST 2011


Hi all,
this is a little follow up on the old Plasma Active webbrowser thread.
http://www.mail-archive.com/rekonq@kde.org/msg02851.html

as probably already heard, the qt demo browser has a problem when used in 
plasma-desktop or in any case its application has more than one qgraphicsview 
open on the same scene: all that can be seen is a sad checkerboard.

it's strange since it seems to happen only in qml and not in qgraphicswebview, 
but the qml widget in turn uses a qgraphicswebview.

so I sat down and tried to figure out where it happens...

it seems it's indeed a problem in qgraphicswebview, but only when the tiled 
backing store option is enabled, that's why happens only in qml, where this 
option is enabled by default.

now, it seems it's necessary to know the view geometry, but of course if there 
is more than one view in the same scene isn't possible to be mathematically 
sure what view is the right one (in cases of overlapping scenerects)

this patch solves this for me, but i'm aware that fixes the problem only for 
99.99% of the real world usage cases, so i don't know if this would be suited 
for inclusion since is still possible to craft a case where it would fail 
(i.e. views weirdly intersecating their scenerects) i think anyways that would 
be better than simply silently not painting anything when there is more than 
one view, that honestly makes it, at least in our use case, nearly useless.

there would be other ways to solve it in a standalone browser, like having a 
scene per page, but the component would still be useless in plasma-desktop, 
and this is still a quite major problem for us.

any ideas or comments how to solve it differently? or this looks robust 
enough?

Cheers,
Marco Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: webkitmoreviews.diff
Type: text/x-patch
Size: 1840 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/active/attachments/20110608/80f7f237/attachment.diff 


More information about the Active mailing list