Bug 208780 - akregator loads nspluginviewer when reading articles
Summary: akregator loads nspluginviewer when reading articles
Status: RESOLVED FIXED
Alias: None
Product: akregator
Classification: Unclassified
Component: internal browser (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal with 25 votes (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-28 16:07 UTC by Oliver Henshaw
Modified: 2010-11-04 16:24 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.5.4


Attachments
backtrace after breakpoint made on plugin loading (10.69 KB, text/plain)
2010-04-24 16:46 UTC, Oliver Henshaw
Details
single-stepping in gdb until nspluginviewer launched with backtrace fragment (7.68 KB, text/plain)
2010-04-24 16:48 UTC, Oliver Henshaw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Henshaw 2009-09-28 16:07:43 UTC
Version:            (using KDE 4.3.1)
OS:                Linux
Installed from:    Fedora RPMs

Akregator sometimes loads nspluginviewer when I read articles. This happens with both the plain text view and the the html view, even though it doesn't make any sense for the basic view and I think plugins and javascript are disabled in the html view.

Note that I'm talking about the html "full website" article view, not about loading a page in a tab.

I've found that I can reliably reproduce this with Bruce Sterling's feed, which often has embedded youtube videos: http://www.wired.com/beyond_the_beyond/feed/
Comment 1 Oliver Henshaw 2009-09-28 16:33:20 UTC
Forgot to mention that the reason this is noticeable/annoying is bug #182869 - nspluginviewer takes a noticable amount of cpu time to do nothing.
Comment 2 Fabio Varesano 2009-11-22 19:23:30 UTC
I've been able to fix this by following https://bugs.kde.org/show_bug.cgi?id=182869 comment #17 and #18
Comment 3 Oliver Henshaw 2010-04-24 16:35:01 UTC
So I set a breakpoint to see if I could find what calls nspluginviewer and why.

Again on Bruce Sterling's feed:

Breakpoint 2, PluginFactory::createPartObject (this=0xb2b1520, parentWidget=
    0xa007f18, parent=0x9fdcee8, classname=0x3ee492e "Browser/View", args=
    QList<QString> = {...})
    at /usr/src/debug/kdebase-4.4.2/apps/nsplugins/plugin_part.cpp:138
138         kDebug(1432) << "PluginFactory::create";
(gdb) bt
#0  PluginFactory::createPartObject (this=0xb2b1520, parentWidget=
    0xa007f18, parent=0x9fdcee8, classname=0x3ee492e "Browser/View", args=
    QList<QString> = {...})
    at /usr/src/debug/kdebase-4.4.2/apps/nsplugins/plugin_part.cpp:138
#1  0x03e9d450 in KPluginFactory::create (this=0xb2b1520, iface=
    0x3b361e0 "KParts::ReadOnlyPart", parentWidget=0xa007f18, parent=
    0x9fdcee8, args=QList<QVariant> = {...}, keyword="")
    at /usr/src/debug/kdelibs-4.4.2/kdecore/util/kpluginfactory.cpp:171
#2  0x064e16cc in create<KParts::ReadOnlyPart> (this=0x9fdcee8, 
    parentWidget=0xa007f18, parent=0x9fdcee8, mimetype=
    "application/x-shockwave-flash", serviceName="", serviceTypes=
    empty QList<QString>, params=QList<QString> = {...})
    at /usr/src/debug/kdelibs-4.4.2/kdecore/util/kpluginfactory.h:515
#3  KHTMLPart::createPart (this=0x9fdcee8, parentWidget=0xa007f18, parent=
    0x9fdcee8, mimetype="application/x-shockwave-flash", serviceName="", 
    serviceTypes=empty QList<QString>, params=QList<QString> = {...})
    at /usr/src/debug/kdelibs-4.4.2/khtml/khtml_part.cpp:4558
#4  0x064ca24d in KHTMLPart::processObjectRequest (this=0x9fdcee8, child=
    0xaa316d0, _url=..., mimetype="application/x-shockwave-flash")
---Type <return> to continue, or q <return> to quit---
    at /usr/src/debug/kdelibs-4.4.2/khtml/khtml_part.cpp:4350
#5  0x064d13ee in KHTMLPart::requestObject (this=0x9fdcee8, child=
    0xaa316d0, url=..., _args=..., browserArgs=...)
    at /usr/src/debug/kdelibs-4.4.2/khtml/khtml_part.cpp:4258
#6  0x064d226a in KHTMLPart::requestObject (this=0x9fdcee8, frame=
    0xb413ce0, url=
    "http://vimeo.com/moogaloop.swf?clip_id=10481179&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1", serviceType=
    "application/x-shockwave-flash", params=QList<QString> = {...})
    at /usr/src/debug/kdelibs-4.4.2/khtml/khtml_part.cpp:4186
#7  0x065ac0ae in DOM::HTMLObjectBaseElementImpl::computeContent (this=
    0xb413ce0)
    at /usr/src/debug/kdelibs-4.4.2/khtml/html/html_objectimpl.cpp:519
#8  0x065a6eb4 in DOM::HTMLPartContainerElementImpl::computeContentIfNeeded
    (this=0xb413ce0)
    at /usr/src/debug/kdelibs-4.4.2/khtml/html/html_objectimpl.cpp:90
#9  0x06569193 in khtml::KHTMLParser::popOneBlock (this=0xb1f3af8, delBlock=
    true) at /usr/src/debug/kdelibs-4.4.2/khtml/html/htmlparser.cpp:1863
#10 0x0656a26e in khtml::KHTMLParser::popBlock (this=0xb1f3af8, _id=72)
---Type <return> to continue, or q <return> to quit---
    at /usr/src/debug/kdelibs-4.4.2/khtml/html/htmlparser.cpp:1804
#11 0x0656d224 in khtml::KHTMLParser::parseToken (this=0xb1f3af8, t=
    0xb07d93c) at /usr/src/debug/kdelibs-4.4.2/khtml/html/htmlparser.cpp:254
#12 0x0656daf4 in khtml::HTMLTokenizer::processToken (this=0xb07d928)
    at /usr/src/debug/kdelibs-4.4.2/khtml/html/htmltokenizer.cpp:2056
#13 0x06574f3c in khtml::HTMLTokenizer::parseTag (this=0xb07d928, src=...)
    at /usr/src/debug/kdelibs-4.4.2/khtml/html/htmltokenizer.cpp:1529
#14 0x06577883 in khtml::HTMLTokenizer::write (this=0xb07d928, str=..., 
    appendData=true)
    at /usr/src/debug/kdelibs-4.4.2/khtml/html/htmltokenizer.cpp:1810
#15 0x064bc12d in KHTMLPart::write (this=0x9fdcee8, str=
    "<div class=\"headerbox\" dir=\"ltr\">\n<div class=\"headertitle\" dir=\"ltr\">\n<a href=\"http://www.wired.com/beyond_the_beyond/2010/04/massimo-banzi-and-his-students/\">Massimo Banzi and his students</a></div>\n"...)
    at /usr/src/debug/kdelibs-4.4.2/khtml/khtml_part.cpp:2124
#16 0x0814b102 in Akregator::ArticleViewer::renderContent (this=0x9fe2c20, 
    text=
    "<div class=\"headerbox\" dir=\"ltr\">\n<div class=\"headertitle\" dir=\"ltr\">\n<a href=\"http://www.wired.com/beyond_the_beyond/2010/04/massimo-banz---Type <return> to continue, or q <return> to quit---
i-and-his-students/\">Massimo Banzi and his students</a></div>\n"...)
    at /usr/src/debug/kdepim-4.4.2/akregator/src/articleviewer.cpp:411
#17 0x0814c23f in Akregator::ArticleViewer::showArticle (this=0x9fe2c20, 
    article=...)
    at /usr/src/debug/kdepim-4.4.2/akregator/src/articleviewer.cpp:489
#18 0x081725d5 in Akregator::MainWidget::slotArticleSelected (this=
    0x9f5bf60, article=...)
    at /usr/src/debug/kdepim-4.4.2/akregator/src/mainwidget.cpp:804
#19 0x08176f28 in Akregator::MainWidget::qt_metacall (this=0x9f5bf60, _c=
    InvokeMetaMethod, _id=<value optimized out>, _a=0xbffc2ad8)
    at /usr/src/debug/kdepim-4.4.2/i686-redhat-linux-gnu/akregator/src/mainwidget.moc:160
#20 0x008185db in QMetaObject::metacall (object=0x9f5bf60, cl=
    InvokeMetaMethod, idx=32, argv=0xbffc2ad8) at kernel/qmetaobject.cpp:237
#21 0x008274af in QMetaObject::activate (sender=0x9fe1c98, m=0x81c11b4, 
    local_signal_index=1, argv=0xbffc2ad8) at kernel/qobject.cpp:3293
#22 0x081015c4 in Akregator::AbstractSelectionController::currentArticleChanged (this=0x9fe1c98, _t1=...)
    at /usr/src/debug/kdepim-4.4.2/i686-redhat-linux-gnu/akregator/src/abstra---Type <return> to continue, or q <return> to quit---
ctselectioncontroller.moc:107
#23 0x081290cf in Akregator::SelectionController::articleSelectionChanged (
    this=0x9fe1c98)
    at /usr/src/debug/kdepim-4.4.2/akregator/src/selectioncontroller.cpp:286
#24 0x0812a663 in Akregator::SelectionController::qt_metacall (this=
    0x9fe1c98, _c=InvokeMetaMethod, _id=<value optimized out>, _a=
    0xbffc2c44)
    at /usr/src/debug/kdepim-4.4.2/i686-redhat-linux-gnu/akregator/src/selectioncontroller.moc:89
#25 0x008185db in QMetaObject::metacall (object=0x9fe1c98, cl=
    InvokeMetaMethod, idx=12, argv=0xbffc2c44) at kernel/qmetaobject.cpp:237
#26 0x008274af in QMetaObject::activate (sender=0xb6a9248, m=0x3794f10, 
    local_signal_index=0, argv=0xbffc2c44) at kernel/qobject.cpp:3293
#27 0x0344a83a in QItemSelectionModel::selectionChanged (this=0xb6a9248, 
    _t1=..., _t2=...) at .moc/release-shared/moc_qitemselectionmodel.cpp:152
#28 0x0344e898 in QItemSelectionModel::emitSelectionChanged (this=
    0xb6a9248, newSelection=..., oldSelection=...)
    at itemviews/qitemselectionmodel.cpp:1536
#29 0x03450024 in QItemSelectionModel::select (this=0xb6a9248, selection=
---Type <return> to continue, or q <return> to quit---
    ..., command=...) at itemviews/qitemselectionmodel.cpp:1099
#30 0x034372a4 in QTreeViewPrivate::select (this=0x9fdbcd0, topIndex=..., 
    bottomIndex=..., command=...) at itemviews/qtreeview.cpp:3682
#31 0x03438025 in QTreeView::setSelection (this=0x9fdc1a0, rect=..., 
    command=...) at itemviews/qtreeview.cpp:2246
#32 0x033f5513 in QAbstractItemView::mousePressEvent (this=0x9fdc1a0, event=
    0xbffc3b40) at itemviews/qabstractitemview.cpp:1656
#33 0x03440a27 in QTreeView::mousePressEvent (this=0x9fdc1a0, event=
    0xbffc3b40) at itemviews/qtreeview.cpp:1810
#34 0x08133c20 in Akregator::ArticleListView::mousePressEvent (this=
    0x9fdc1a0, ev=0xbffc3b40)
    at /usr/src/debug/kdepim-4.4.2/akregator/src/articlelistview.cpp:336
#35 0x02ef6b11 in QWidget::event (this=0x9fdc1a0, event=0xbffc3b40)
    at kernel/qwidget.cpp:7994
#36 0x032c5064 in QFrame::event (this=0x9fdc1a0, e=0xbffc3b40)
    at widgets/qframe.cpp:557
#37 0x033531c3 in QAbstractScrollArea::viewportEvent (this=0x9fdc1a0, e=
    0xbffc3b40) at widgets/qabstractscrollarea.cpp:1036
#38 0x033f9fd7 in QAbstractItemView::viewportEvent (this=0x9fdc1a0, event=
---Type <return> to continue, or q <return> to quit---
    0xbffc3b40) at itemviews/qabstractitemview.cpp:1610
#39 0x0343a491 in QTreeView::viewportEvent (this=0x9fdc1a0, event=
    0xbffc3b40) at itemviews/qtreeview.cpp:1248
#40 0x03355665 in viewportEvent (this=0x9fdd448, o=0x9dc8400, e=0xbffc3b40)
    at widgets/qabstractscrollarea_p.h:100
#41 QAbstractScrollAreaFilter::eventFilter (this=0x9fdd448, o=0x9dc8400, e=
    0xbffc3b40) at widgets/qabstractscrollarea_p.h:116
#42 0x00812e3a in QCoreApplicationPrivate::sendThroughObjectEventFilters (
    this=0x9d8f3c8, receiver=0x9dc8400, event=0xbffc3b40)
    at kernel/qcoreapplication.cpp:819
#43 0x02ea3d0a in QApplicationPrivate::notify_helper (this=0x9d8f3c8, 
    receiver=0x9dc8400, e=0xbffc3b40) at kernel/qapplication.cpp:4296
#44 0x02eab0fe in QApplication::notify (this=0xbffc43d4, receiver=
    0x9dc8400, e=0xbffc3b40) at kernel/qapplication.cpp:3865
#45 0x061757cb in KApplication::notify (this=0xbffc43d4, receiver=
    0x9dc8400, event=0xbffc3b40)
    at /usr/src/debug/kdelibs-4.4.2/kdeui/kernel/kapplication.cpp:302
#46 0x00813c03 in QCoreApplication::notifyInternal (this=0xbffc43d4, 
    receiver=0x9dc8400, event=0xbffc3b40) at kernel/qcoreapplication.cpp:704
---Type <return> to continue, or q <return> to quit---
#47 0x02ea9e68 in sendEvent (receiver=0x9dc8400, event=0xbffc3b40, 
    alienWidget=0x9dc8400, nativeWidget=0x9fdc1a0, buttonDown=0x37a3138, 
    lastMouseReceiver=..., spontaneous=true)
    at ../../src/corelib/kernel/qcoreapplication.h:215
#48 QApplicationPrivate::sendMouseEvent (receiver=0x9dc8400, event=
    0xbffc3b40, alienWidget=0x9dc8400, nativeWidget=0x9fdc1a0, buttonDown=
    0x37a3138, lastMouseReceiver=..., spontaneous=true)
    at kernel/qapplication.cpp:2965
#49 0x02f270d0 in QETWidget::translateMouseEvent (this=0x9fdc1a0, event=
    0xbffc405c) at kernel/qapplication_x11.cpp:4373
#50 0x02f265e3 in QApplication::x11ProcessEvent (this=0xbffc43d4, event=
    0xbffc405c) at kernel/qapplication_x11.cpp:3384
#51 0x02f524fa in x11EventSourceDispatch (s=0x9d98100, callback=0, 
    user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#52 0x00f96fb8 in g_main_dispatch (context=0x9d97490) at gmain.c:1960
#53 IA__g_main_context_dispatch (context=0x9d97490) at gmain.c:2513
#54 0x00f9a8e8 in g_main_context_iterate (context=0x118eb0, block=1, 
    dispatch=1, self=0x9d94098) at gmain.c:2591
#55 0x00f9aa14 in IA__g_main_context_iteration (context=0x9d97490, 
---Type <return> to continue, or q <return> to quit---
    may_block=1) at gmain.c:2654
#56 0x0083be46 in QEventDispatcherGlib::processEvents (this=0x9d6d728, 
    flags=...) at kernel/qeventdispatcher_glib.cpp:412
#57 0x02f520e6 in QGuiEventDispatcherGlib::processEvents (this=0x9d6d728, 
    flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#58 0x008122da in QEventLoop::processEvents (this=0xbffc4354, flags=...)
    at kernel/qeventloop.cpp:149
#59 0x0081261a in QEventLoop::exec (this=0xbffc4354, flags=...)
    at kernel/qeventloop.cpp:201
#60 0x00814ce7 in QCoreApplication::exec ()
    at kernel/qcoreapplication.cpp:981
#61 0x02ea3dd8 in QApplication::exec () at kernel/qapplication.cpp:3579
#62 0x0804f269 in main (argc=3, argv=0xbffc4534)
    at /usr/src/debug/kdepim-4.4.2/akregator/src/main.cpp:103
Comment 4 Oliver Henshaw 2010-04-24 16:46:44 UTC
Created attachment 43005 [details]
backtrace after breakpoint made on plugin loading

Sorry, that was long. Here's the same backtrace I made after the breakpoint, attached as a file.

I then single-stepped until nspluginviewer was launched (attached as another file). I hope this has been useful.
Comment 5 Oliver Henshaw 2010-04-24 16:48:10 UTC
Created attachment 43006 [details]
single-stepping in gdb until nspluginviewer launched with backtrace fragment
Comment 6 Oliver Henshaw 2010-05-28 12:38:51 UTC
This still happens, though https://bugs.kde.org/show_bug.cgi?id=182869#c24 makes it much less noticeable.

nspluginviewer now takes 1% CPU or less in the plain text view and 0% when I navigate to an article without embedded youtube. So nspluginviewer is still wrongly triggered, but now it's almost un-noticeable (apart from 4MB of USS according to smem).
Comment 7 Oliver Henshaw 2010-10-31 15:47:36 UTC
This still happens, so I had another poke around with gdb.

(gdb) bt
#0  KHTMLPart::requestObject (this=0xa21550, frame=0xfd6970, url="http://www.youtube.com/v/d_OceOpCmf8?version=3", 
    serviceType="application/x-shockwave-flash", params=QList<QString> = {...})
    at /usr/src/debug/kdelibs-4.4.5/khtml/khtml_part.cpp:4176
#1  0x00000030be2c5240 in DOM::HTMLObjectBaseElementImpl::computeContent (this=0xfd6970)
    at /usr/src/debug/kdelibs-4.4.5/khtml/html/html_objectimpl.cpp:533
#2  0x00000030be286e23 in khtml::KHTMLParser::popOneBlock (this=0xc3ce60, delBlock=true)
    at /usr/src/debug/kdelibs-4.4.5/khtml/html/htmlparser.cpp:1863
#3  0x00000030be287e31 in khtml::KHTMLParser::popBlock (this=0xc3ce60, _id=72)
    at /usr/src/debug/kdelibs-4.4.5/khtml/html/htmlparser.cpp:1804
#4  0x00000030be28a98c in khtml::KHTMLParser::parseToken (this=0xc3ce60, t=0xea4408)
    at /usr/src/debug/kdelibs-4.4.5/khtml/html/htmlparser.cpp:254
#5  0x00000030be28b211 in khtml::HTMLTokenizer::processToken (this=0xea43e0)
    at /usr/src/debug/kdelibs-4.4.5/khtml/html/htmltokenizer.cpp:2056
#6  0x00000030be29241c in khtml::HTMLTokenizer::parseTag (this=0xea43e0, src=...)
    at /usr/src/debug/kdelibs-4.4.5/khtml/html/htmltokenizer.cpp:1529
#7  0x00000030be294bdd in khtml::HTMLTokenizer::write (this=0xea43e0, str=<value optimized out>, 
    appendData=<value optimized out>) at /usr/src/debug/kdelibs-4.4.5/khtml/html/htmltokenizer.cpp:1810
#8  0x00000030be1f3626 in KHTMLPart::write (this=<value optimized out>, str=<value optimized out>)
    at /usr/src/debug/kdelibs-4.4.5/khtml/khtml_part.cpp:2124
#9  0x00007ffff011258b in Akregator::ArticleViewer::renderContent (this=0xa1e2d0, 
    text="<div class=\"headerbox\" dir=\"ltr\">\n<div class=\"headertitle\" dir=\"ltr\">\n<a href=\"http://www.wired.com/beyond_the_beyond/2010/10/software-studies-4535-time-magazine-covers-1923-2009/\">Software Studies, 4"...)
    at /usr/src/debug/kdepim-4.4.6/akregator/src/articleviewer.cpp:411
...
frame 1
#1  0x00000030be2c5240 in DOM::HTMLObjectBaseElementImpl::computeContent (this=0xfd6970)
    at /usr/src/debug/kdelibs-4.4.5/khtml/html/html_objectimpl.cpp:533
533         if (!part->requestObject( this, effectiveURL, effectiveServiceType, params)) {
(gdb) l
528         KHTMLPart* part = document()->part();
529         clearChildWidget();
530
531         kDebug(6031) << effectiveURL << effectiveServiceType << params;
532
533         if (!part->requestObject( this, effectiveURL, effectiveServiceType, params)) {
534             // Looks like we are gonna need alternative content after all...
535             m_renderAlternative = true;
536         }
537
(gdb) frame 2
#2  0x00000030be286e23 in khtml::KHTMLParser::popOneBlock (this=0xc3ce60, delBlock=true)
    at /usr/src/debug/kdelibs-4.4.5/khtml/html/htmlparser.cpp:1863
1863            current->close();
(gdb) l
1858        if((Elem->node != current)) {
1859            if (current->maintainsState() && document){
1860                document->registerMaintainsState(current);
1861                document->attemptRestoreState(current);
1862            }
1863            current->close();
1864        }
1865    #endif
1866
1867        removeForbidden(Elem->id, forbiddenTag);
(gdb) frame 3
#3  0x00000030be287e31 in khtml::KHTMLParser::popBlock (this=0xc3ce60, _id=72)
    at /usr/src/debug/kdelibs-4.4.5/khtml/html/htmlparser.cpp:1804
1804                popOneBlock();
(gdb) l
1799        while (Elem)
1800        {
1801            if (Elem->id == _id)
1802            {
1803                int strayTable = inStrayTableContent;
1804                popOneBlock();
1805                Elem = 0;
1806
1807                // This element was the root of some malformed content just inside an implicit or
1808                // explicit <tbody> or <tr>.
(gdb) frame 4
#4  0x00000030be28a98c in khtml::KHTMLParser::parseToken (this=0xc3ce60, t=0xea4408)
    at /usr/src/debug/kdelibs-4.4.5/khtml/html/htmlparser.cpp:254
254             processCloseTag(t);
(gdb) l
249         if(t->tid == ID_BR+ID_CLOSE_TAG && document->inCompatMode())
250             t->tid -= ID_CLOSE_TAG;
251
252         if(t->tid > ID_CLOSE_TAG)
253         {
254             processCloseTag(t);
255             return;
256         }
257
258         // ignore spaces, if we're not inside a paragraph or other inline code

The control flow doesn't seem continous here - maybe some functions are inline or something? Anyway, popOneBlock (triggered by bad markup?) ends up calling computeContent which doesn't check whether plugins are enabled before requesting something capable of handling flash.

I see pluginsEnabled is checked earlier in page load, perhaps for other elements? E.g. (from another gdb run):
(gdb) bt
#0  KHTMLPart::pluginsEnabled (this=0xa21550) at /usr/src/debug/kdelibs-4.4.5/khtml/khtml_part.cpp:1422
#1  0x00000030be2c0b9a in DOM::HTMLObjectElementImpl::attach (this=<value optimized out>)
    at /usr/src/debug/kdelibs-4.4.5/khtml/html/html_objectimpl.cpp:833
#2  0x00000030be288407 in khtml::KHTMLParser::insertNode (this=0xfde8f0, n=0xe60cb0, flat=<value optimized out>)
    at /usr/src/debug/kdelibs-4.4.5/khtml/html/htmlparser.cpp:429
#3  0x00000030be28a85b in khtml::KHTMLParser::parseToken (this=0xfde8f0, t=0xd41c68)
    at /usr/src/debug/kdelibs-4.4.5/khtml/html/htmlparser.cpp:302
#4  0x00000030be28b211 in khtml::HTMLTokenizer::processToken (this=0xd41c40)
Comment 8 Oliver Henshaw 2010-10-31 17:24:46 UTC
I checked this in F14 (which uses kde 4.5.2) and still see nspluginviewer launched.

I also tried to test whether the kwebkitpart behaves the same, but akregator uses khtml in the article viewer regardless of the filetype settings.
Comment 9 Oliver Henshaw 2010-11-03 17:31:45 UTC
I tested the suggested patch (pasted inline below) on F13, kdelibs 4.4.5, and it appears to solve the problem. nspluginviewer is not loaded for any of the recent Bruce Sterling articles in akregator - and flash still loads as expected when opening the article in a tab.


Index: html/html_objectimpl.cpp
===================================================================
--- khtml/html/html_objectimpl.cpp	(revision 1191612)
+++ khtml/html/html_objectimpl.cpp	(working copy)
@@ -509,6 +509,12 @@
         KHTMLPart* p = document()->part();
         if (!p || !p->javaEnabled())
             newRenderAlternative = true;
+    } else {    
+        // Similarly for plugins.
+        KHTMLPart* p = document()->part();
+
+        if (!p || !p->pluginsEnabled())
+            newRenderAlternative = true;
     }
 
     // If there is no <embed> (here or as a child), and we don't have a type + url to go on,
@@ -740,11 +746,6 @@
 
 void HTMLEmbedElementImpl::attach()
 {
-    KHTMLPart* p = document()->part();
-
-    if (!p || !p->pluginsEnabled())
-        m_renderAlternative = true;
-
     if (parentNode()->id() == ID_OBJECT)
         NodeBaseImpl::attach();
     else
@@ -827,11 +828,6 @@
 
 void HTMLObjectElementImpl::attach()
 {
-    KHTMLPart* p = document()->part();
-
-    if (!p || !p->pluginsEnabled())
-        m_renderAlternative = true;
-
     HTMLObjectBaseElementImpl::attach();
 }
Comment 10 Maksim Orlovich 2010-11-04 15:54:26 UTC
SVN commit 1193090 by orlovich:

Make !pluginsEnabled() work proeprly rather than do some weirdo attach/detach dance

BUG: 208780


 M  +7 -10     html_objectimpl.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1193090
Comment 11 Maksim Orlovich 2010-11-04 16:14:57 UTC
SVN commit 1193091 by orlovich:

Merged revision:r1193090 | orlovich | 2010-11-04 10:54:57 -0400 (Thu, 04 Nov 2010) | 4 lines

Make !pluginsEnabled() work proeprly rather than do some weirdo attach/detach dance

BUG: 208780

 M  +7 -10     html_objectimpl.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1193091