[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: Old Flash? Go upgrade! - New problem with konqueror
From:       koos vriezen <koos.vriezen () gmail ! com>
Date:       2010-04-18 20:20:49
Message-ID: k2kd4e708d61004181320j1bdef87bm7c22b259b3c44942 () mail ! gmail ! com
[Download RAW message or body]

2010/4/18 Maksim Orlovich <mo85@cornell.edu>:
> 
> > Pretty sure I've seen a nesting call, js calls plugin, plugin
> > evaluates some js code, depending on the result, the return value of
> > the initial call is determined.
> 
> Could be a matter of different objects?

In my follow up I mentioned that is works with BlockWithGui, not with
QDBus::Block
Most, if not all, are through the npp master object on the Qt side.

> > > > We also need a LiveConnect2Extension. As mentioned before, the string
> > > > based argument list/return value is too limited. We need at least a
> > > > way to pass proxies of js objects as arguments. On these proxies
> > > > get/put/call should be possible. Maybe simply use QVariant with a user
> > > > type for the proxy can work.
> > > 
> > > Definitely. Could I ask you to review the API once I get there?
> > 
> > Sure :-).
> 
> One question is how much do we want to support, and under what model?
> npruntime exports things like deleting & enumerating properties, as well
> as using objects as constructors, which is very ES-like; yet it also has
> things like invokeMethod, which ought to be equivalent to getProperty &
> invokeDefault. Do you have any insight on how that parallel is handled by
> Flash --- would getting 'GetVariable' and doing invokeDefault on it work?

I use the hasMethod and invoke calls.
From the top of my head, flash asks for the js window object and
queries the properties location and on that, href. Other than that,
the calls from flash are evaluteScript calls.
From the js side, only functions are called on the scriptable npp
object. But some pages do pass js objects as argument.
Nevertheless, implementing the full npruntime api for proxies makes
sense be it empty at first.

> > Btw this particular case is really easy to solve using the current
> > nsplugin liveconnect object.
> <snip helpful example>
> > 
> > Yep, not a fully npruntime module, but good enough to fix the plugin
> > loading thing in khtml (which of I have the feeling is a major task
> > too  afair the plugin widget creation was triggered by the rendering)
> 
> Hasn't been the case for many years now, actually, though I am sure the
> details vary somewhat. I probably need to force myself to read through
> html5's mess of a language... (I know iframes in particular are different,
> since in other places they always create an HTML document that wraps the
> content in an embed or a pre; something else I need to fix, but that's not
> the issue here).
> 
> In the case of the example... Well, we do get into
> HTMLPartContainerElementImpl::computeContent on the appendChild, and
> that's the method that should normally request the part, doing that on
> > > close
> and not ::attach as well ... and the reason we don't load the plugin is
> that the source is null, and
> 
> if (!embed && effectiveURL.isEmpty() && (effectiveServiceType.isEmpty() ||
> classId.isEmpty()))
> 
> fails. I am pretty sure it should just be
> if (!embed && effectiveURL.isEmpty() && effectiveServiceType.isEmpty())
> 
> (looks like I made a logic error when shuffling methods, both reversing
> the sense of something, and since known classIds have already been
> shuffled into effectiveServiceType). Or, in a patch form:
> 
> --- html/html_objectimpl.cpp    (revision 1110535)
> +++ html/html_objectimpl.cpp    (working copy)
> @@ -500,7 +500,7 @@
> 
> // If there is no <embed> (here or as a child), and we don't have a
> type + url to go on,
> // we need to render alternative as well
> -    if (!embed && effectiveURL.isEmpty() &&
> (effectiveServiceType.isEmpty() || classId.isEmpty()))
> +    if (!embed && effectiveURL.isEmpty() && effectiveServiceType.isEmpty())
> newRenderAlternative = true;
> 
> if (newRenderAlternative != m_renderAlternative) {
> 
> Note that it will pass in the page URL as the source, though. Is this
> enough to make things work with kmplayer's viewer?

With some hacking, I indeed get youtube working. passing docbase is
problematic though.
The test case works now fine too (had added setAttribute for width/height/src).

KHTML also seems to forget calling closeUrl in the test case
'body.removeChild(flash);'.
On youtube, I hear old flash audio through the newly opened page. This
is unrelated to this patch. Heard that yesterday already for some
youtube links that still worked (eg. http://www.youtube.com/vpro still
works w/o this patch)

I've build kdelibs/4.4 branch and copied libkhtml.so over the debian
version. Had a few crashes where it other times went just fine:

#0  0x00007ffff77cef45 in *__GI_raise (sig=<value optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007ffff77d1d80 in *__GI_abort () at abort.c:88
#2  0x00007ffff77c808a in *__GI___assert_fail (
    assertion=0x7fffe82321d6 "!minMaxKnown()", file=<value optimized out>,
    line=77,
    function=0x7fffe8236180 "virtual void
khtml::RenderReplaced::calcMinMaxWidth()") at assert.c:78
#3  0x00007fffe7fff8d8 in khtml::RenderReplaced::calcMinMaxWidth (this=0xc71f68)
    at /home/koos/doc/projects/kde-svn/kde/branches/KDE/4.4/kdelibs/khtml/rendering/render_replaced.cpp:77
 #4  0x00007fffe7f53052 in khtml::KHTMLParser::insertNode (this=0xcd1c90,
    n=0x1238480, flat=true)
    at /home/koos/doc/projects/kde-svn/kde/branches/KDE/4.4/kdelibs/khtml/html/htmlparser.cpp:450
 #5  0x00007fffe7f552ee in khtml::KHTMLParser::parseToken (this=0xcd1c90,
    t=0xc348c8)
    at /home/koos/doc/projects/kde-svn/kde/branches/KDE/4.4/kdelibs/khtml/html/htmlparser.cpp:302
 #6  0x00007fffe7f56856 in khtml::HTMLTokenizer::processToken (this=0xc348a0)
    at /home/koos/doc/projects/kde-svn/kde/branches/KDE/4.4/kdelibs/khtml/html/htmltokenizer.cpp:2056
 #7  0x00007fffe7f5c3eb in khtml::HTMLTokenizer::parseTag (this=0xc348a0,
    src=...)
    at /home/koos/doc/projects/kde-svn/kde/branches/KDE/4.4/kdelibs/khtml/html/htmltokenizer.cpp:1529
 #8  0x00007fffe7f5cc45 in khtml::HTMLTokenizer::write (this=0xc348a0,
    str=<value optimized out>, appendData=<value optimized out>)
    at /home/koos/doc/projects/kde-svn/kde/branches/KDE/4.4/kdelibs/khtml/html/htmltokenizer.cpp:1810
 #9  0x00007fffe7ec3dde in KHTMLPart::write (this=<value optimized out>,
    data=<value optimized out>, len=<value optimized out>)
    at /home/koos/doc/projects/kde-svn/kde/branches/KDE/4.4/kdelibs/khtml/khtml_part.cpp:2099
 #10 0x00007fffe7ec5fa6 in KHTMLPart::slotData (this=0x126d780,
    kio_job=<value optimized out>, data=...)
    at /home/koos/doc/projects/kde-svn/kde/branches/KDE/4.4/kdelibs/khtml/khtml_part.cpp:1781
 #11 0x00007fffe7ecc75e in KHTMLPart::qt_metacall (this=0x126d780,
    _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>,
    _a=0x7fffffffc730)
    at /home/koos/kde/kde4-build/kdelibs/khtml/khtml_part.moc:277
#12 0x00007ffff5660c4f in QMetaObject::activate(QObject*, QMetaObject
const*, int, void**) () from /usr/lib/libQtCore.so.4
#13 0x00007ffff6782d54 in KIO::TransferJob::data(KIO::Job*, QByteArray const&)
    () from /usr/lib/libkio.so.5
#14 0x00007ffff6785570 in KIO::TransferJob::slotData(QByteArray const&) ()
   from /usr/lib/libkio.so.5
#15 0x00007ffff6788c36 in
KIO::TransferJob::qt_metacall(QMetaObject::Call, int, void**) () from
/usr/lib/libkio.so.5
#16 0x00007ffff5660c4f in QMetaObject::activate(QObject*, QMetaObject
const*, int, void**) () from /usr/lib/libQtCore.so.4
#17 0x00007ffff6848bf2 in KIO::SlaveInterface::data(QByteArray const&) ()
   from /usr/lib/libkio.so.5
#18 0x00007ffff684bbe0 in KIO::SlaveInterface::dispatch(int, QByteArray const&)
    () from /usr/lib/libkio.so.5
#19 0x00007ffff6848ea3 in KIO::SlaveInterface::dispatch() ()
   from /usr/lib/libkio.so.5
#20 0x00007ffff683d316 in KIO::Slave::gotInput() () from /usr/lib/libkio.so.5
#21 0x00007ffff683d4fc in KIO::Slave::qt_metacall(QMetaObject::Call,
int, void**) () from /usr/lib/libkio.so.5

Koos


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic