Bug 73528 - rendering of www.nzzglobal.ch fails
Summary: rendering of www.nzzglobal.ch fails
Status: RESOLVED DUPLICATE of bug 69610
Alias: None
Product: konqueror
Classification: Applications
Component: khtml ecma (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-26 12:21 UTC by Rudi Strasser
Modified: 2006-10-27 19:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rudi Strasser 2004-01-26 12:21:28 UTC
Version:           3.2.0 (using KDE 3.2.90 (CVS >= 20040117), Gentoo)
Compiler:          gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice)
OS:          Linux (i686) release 2.6.0-gentoo

Konqueror is not able to render www.nzzglobal.ch at all.
(Should be easy to verify since all versions I had up to now had this shortcoming)
Comment 1 Kai Lahmann 2004-01-26 14:54:40 UTC
you are right - who knows, why?
Comment 2 Sashmit Bhaduri 2004-01-27 06:28:01 UTC
I don't see anything wrong, is the text in the middle an error or something?
Comment 3 Stephan Kulow 2004-01-27 09:23:19 UTC
for me that page basically kills konqueror ;(
Comment 4 David Faure 2004-01-29 11:12:45 UTC
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();


Comment 5 Rudi Strasser 2004-09-20 16:03:20 UTC
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 ? 
Comment 6 lexual 2005-04-12 02:25:15 UTC
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.
Comment 7 Martin Fabian Hohenberg 2005-12-02 20:28:46 UTC
error from comment 6 is reproducable with 3.5.0
Comment 8 Maksim Orlovich 2006-10-19 21:24:55 UTC
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.
Comment 9 Maksim Orlovich 2006-10-27 19:57:34 UTC

*** This bug has been marked as a duplicate of 69610 ***