Fix the rendering crashes due to triggered
authorzack <zack@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Mar 2007 09:04:22 +0000 (09:04 +0000)
committerzack <zack@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Mar 2007 09:04:22 +0000 (09:04 +0000)
asserts and improve a bit the layout scheduling in the
Qt port

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20509 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitQt/Api/qwebframe.cpp
WebKitQt/ChangeLog
WebKitQt/WebCoreSupport/FrameLoaderClientQt.cpp

index e92a28e17ffc67c59142fe08ca1526e416591f1e..86a62ddaef8301e37f6dea579433f7188cd461fc 100644 (file)
@@ -204,10 +204,8 @@ void QWebFrame::resizeEvent(QResizeEvent *e)
 {
     QAbstractScrollArea::resizeEvent(e);
     if (d->frame && d->frameView) {
-        RenderObject *renderer = d->frame->renderer();
-        if (renderer)
-            renderer->setNeedsLayout(true);
-        d->frameView->scheduleRelayout();
+        d->frame->forceLayout();
+        d->frame->view()->adjustViewSize();
     }
     d->_q_adjustScrollbars();
 }
@@ -238,9 +236,8 @@ void QWebFrame::paintEvent(QPaintEvent *ev)
     time.start();
 #endif
     QRect clip = ev->rect();
-    if (d->frameView->layoutPending()) {
-        //qDebug()<<"pending "<<m_frameView->layoutPending()
-        //        <<" delayed = "<<m_frameView->haveDelayedLayoutScheduled();
+
+    if (d->frameView->needsLayout()) {
         d->frameView->layout();
     }
     QPainter p(viewport());
index 7a2b836bf5f74df16cbf70a7a13ffafc2f31121c..925085ff2c67c3a8953c93a2ff3b6c48f10a6db8 100644 (file)
@@ -1,3 +1,15 @@
+2007-03-27  Zack Rusin  <zrusin@trolltech.com>
+
+        Fix the rendering crashes due triggered
+        asserts. Improve a bit the layout
+        scheduling.
+
+        * Api/qwebframe.cpp:
+        (QWebFrame::resizeEvent):
+        (QWebFrame::paintEvent):
+        * WebCoreSupport/FrameLoaderClientQt.cpp:
+        (WebCore::FrameLoaderClientQt::forceLayout):
+
 2007-03-16  Lars Knoll <lars@trolltech.com>
 
         Fix the Qt build once again.
index c4cb9f025d7295c027357e5bcc7359d5d140d958..53490b7c18974461db79cf94d18b3dc4a8c4835a 100644 (file)
@@ -179,7 +179,8 @@ void FrameLoaderClientQt::makeRepresentation(DocumentLoader*)
 
 void FrameLoaderClientQt::forceLayout()
 {
-    notImplemented();
+    m_frame->view()->setNeedsLayout();
+    m_frame->view()->layout();
 }