Summary: | rendering of www.nzzglobal.ch fails | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Rudi Strasser <rudi.strasser> |
Component: | khtml ecma | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | maksim |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Rudi Strasser
2004-01-26 12:21:28 UTC
you are right - who knows, why? I don't see anything wrong, is the text in the middle an error or something? for me that page basically kills konqueror ;( Subject: kdelibs/khtml CVS commit by faure: Update frame sizes before returning value for innerWidth/innerHeight, in case the window was just resized (#73528, regtest ecma/window.js) CCMAIL: 73528@bugs.kde.org (can't close that bug though, the site doesn't always manages to load, seems to be a race condition since it sometimes work) Added support for resizeTo/resizeBy to test_regression. M +5 -0 ChangeLog 1.193 M +9 -0 test_regression.cpp 1.59 M +2 -1 test_regression.h 1.22 M +7 -1 ecma/kjs_window.cpp 1.368 M +5 -1 rendering/render_replaced.cpp 1.159 M +4 -1 rendering/render_replaced.h 1.69 --- kdelibs/khtml/ChangeLog #1.192:1.193 @@ -1,2 +1,7 @@ +2004-01-29 David Faure <faure@kde.org> + + * ecma/kjs_window.cpp (get): update frame sizes before returning value for + innerWidth/innerHeight, in case the window was just resized (#73528, regtest ecma/window.js) + 2004-01-29 Dirk Mueller <mueller@kde.org> --- kdelibs/khtml/test_regression.cpp #1.58:1.59 @@ -423,4 +423,6 @@ int main(int argc, char *argv[]) QObject::connect(part->browserExtension(), SIGNAL(openURLRequest(const KURL &, const KParts::URLArgs &)), regressionTest, SLOT(slotOpenURL(const KURL&, const KParts::URLArgs &))); + QObject::connect(part->browserExtension(), SIGNAL(resizeTopLevelWidget( int, int )), + regressionTest, SLOT(resizeTopLevelWidget( int, int ))); bool result; @@ -989,3 +991,10 @@ bool RegressionTest::cvsIgnored( const Q } +void RegressionTest::resizeTopLevelWidget( int w, int h ) +{ + qApp->mainWidget()->resize( w, h ); + // Since we're not visible, this doesn't have an immediate effect, QWidget posts the event + QApplication::sendPostedEvents( 0, QEvent::Resize ); +} + #include "test_regression.moc" --- kdelibs/khtml/test_regression.h #1.21:1.22 @@ -165,4 +165,5 @@ private: private slots: void slotOpenURL(const KURL &url, const KParts::URLArgs &args); + void resizeTopLevelWidget( int, int ); }; --- kdelibs/khtml/ecma/kjs_window.cpp #1.367:1.368 @@ -117,4 +117,5 @@ namespace KJS { #include "kjs_window.lut.h" +#include "rendering/render_replaced.h" ////////////////////// Screen Object //////////////////////// @@ -558,8 +559,10 @@ Value Window::get(ExecState *exec, const if (!m_part->view()) return Undefined(); + khtml::RenderWidget::flushWidgetResizes(); // make sure frames have their final size return Number(m_part->view()->visibleHeight()); case InnerWidth: if (!m_part->view()) return Undefined(); + khtml::RenderWidget::flushWidgetResizes(); // make sure frames have their final size return Number(m_part->view()->visibleWidth()); case Length: @@ -1442,5 +1445,8 @@ Value WindowFunc::tryCall(ExecState *exe { QWidget * tl = widget->topLevelWidget(); - window->resizeTo( tl, tl->width() + args[0].toInt32(exec), tl->height() + args[1].toInt32(exec) ); + QRect geom = tl->frameGeometry(); + window->resizeTo( tl, + geom.width() + args[0].toInt32(exec), + geom.height() + args[1].toInt32(exec) ); } return Undefined(); --- kdelibs/khtml/rendering/render_replaced.cpp #1.158:1.159 @@ -194,4 +194,8 @@ bool RenderWidget::event( QEvent *e ) } +void RenderWidget::flushWidgetResizes() //static +{ + QApplication::sendPostedEvents( 0, QWidgetResizeEvent::Type ); +} void RenderWidget::setQWidget(QWidget *widget) --- kdelibs/khtml/rendering/render_replaced.h #1.68:1.69 @@ -118,4 +118,7 @@ public: #endif + // for ECMA to flush all pending resizes + static void flushWidgetResizes(); + public slots: void slotWidgetDestructed(); I checked out nzzglobal.ch with konqueror 3.3 and unfortunately it still crashes. I wish I could contribute to resolving that bug. Is there a way I can ? This page renders without crashing with 3.4.0 under kubuntu hoary. The page renders fine except for one thing. On firefox, if you hover on the newspaper articles there is a popup text and the article becomes a pink colour with the text still visible. On konqueror, it does the same thing except the article changes to red and the text is not visible. error from comment 6 is reproducable with 3.5.0 That's because they detect us as gecko, and try to use -moz-opacity, which we don't support. I suggest spoofing as IE or Safari or such, and it'll be workable. |