[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:23:37 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 83e9da81f85f8040cccfcea7cdf3e666cb61caf9
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jan 26 21:56:41 2004 +0000

    	Remove incremental repainting ifdef.
    
            * khtml/khtmlview.h:
            * khtml/rendering/bidi.cpp:
            (khtml::RenderBlock::layoutInlineChildren):
            * khtml/rendering/render_block.cpp:
            (khtml::RenderBlock::layoutBlock):
            (khtml::RenderBlock::layoutBlockChildren):
            (khtml::RenderBlock::repaintObjectsBeforeLayout):
            (khtml::RenderBlock::positionNewFloats):
            * khtml/rendering/render_block.h:
            * khtml/rendering/render_box.cpp:
            (RenderBox::computeAbsoluteRepaintRect):
            (RenderBox::repaintDuringLayoutIfMoved):
            * khtml/rendering/render_box.h:
            * khtml/rendering/render_container.cpp:
            (RenderContainer::removeChildNode):
            * khtml/rendering/render_flexbox.cpp:
            (khtml::RenderFlexibleBox::layoutBlock):
            (khtml::RenderFlexibleBox::placeChild):
            * khtml/rendering/render_flow.cpp:
            (RenderFlow::getAbsoluteRepaintRect):
            * khtml/rendering/render_image.cpp:
            (RenderImage::layout):
            * khtml/rendering/render_layer.cpp:
            (RenderLayer::RenderLayer):
            (RenderLayer::computeRepaintRects):
            (RenderLayer::updateLayerPositions):
            (RenderLayer::updateLayerPosition):
            (RenderLayer::paintLayer):
            * khtml/rendering/render_layer.h:
            (khtml::RenderLayer::relativePositionOffset):
            * khtml/rendering/render_object.cpp:
            (RenderObject::setNeedsLayout):
            (RenderObject::setChildNeedsLayout):
            (RenderObject::markContainingBlocksForLayout):
            (RenderObject::getAbsoluteRepaintRectIncludingFloats):
            (RenderObject::detach):
            (RenderObject::scheduleRelayout):
            * khtml/rendering/render_object.h:
            * khtml/rendering/render_table.cpp:
            (RenderTable::layout):
            (RenderTableSection::layoutRows):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5975 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index b51bb3e..63da022 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,51 @@
 2004-01-26  David Hyatt  <hyatt at apple.com>
 
+	Remove incremental repainting ifdef.
+
+        * khtml/khtmlview.h:
+        * khtml/rendering/bidi.cpp:
+        (khtml::RenderBlock::layoutInlineChildren):
+        * khtml/rendering/render_block.cpp:
+        (khtml::RenderBlock::layoutBlock):
+        (khtml::RenderBlock::layoutBlockChildren):
+        (khtml::RenderBlock::repaintObjectsBeforeLayout):
+        (khtml::RenderBlock::positionNewFloats):
+        * khtml/rendering/render_block.h:
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::computeAbsoluteRepaintRect):
+        (RenderBox::repaintDuringLayoutIfMoved):
+        * khtml/rendering/render_box.h:
+        * khtml/rendering/render_container.cpp:
+        (RenderContainer::removeChildNode):
+        * khtml/rendering/render_flexbox.cpp:
+        (khtml::RenderFlexibleBox::layoutBlock):
+        (khtml::RenderFlexibleBox::placeChild):
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::getAbsoluteRepaintRect):
+        * khtml/rendering/render_image.cpp:
+        (RenderImage::layout):
+        * khtml/rendering/render_layer.cpp:
+        (RenderLayer::RenderLayer):
+        (RenderLayer::computeRepaintRects):
+        (RenderLayer::updateLayerPositions):
+        (RenderLayer::updateLayerPosition):
+        (RenderLayer::paintLayer):
+        * khtml/rendering/render_layer.h:
+        (khtml::RenderLayer::relativePositionOffset):
+        * khtml/rendering/render_object.cpp:
+        (RenderObject::setNeedsLayout):
+        (RenderObject::setChildNeedsLayout):
+        (RenderObject::markContainingBlocksForLayout):
+        (RenderObject::getAbsoluteRepaintRectIncludingFloats):
+        (RenderObject::detach):
+        (RenderObject::scheduleRelayout):
+        * khtml/rendering/render_object.h:
+        * khtml/rendering/render_table.cpp:
+        (RenderTable::layout):
+        (RenderTableSection::layoutRows):
+
+2004-01-26  David Hyatt  <hyatt at apple.com>
+
 	Preserve the integrity of the line box tree when elements get removed.  Change RenderText over to using
 	the same data structures as inlines and blocks for maintaining its list of line boxes.
 	
diff --git a/WebCore/khtml/khtmlview.cpp b/WebCore/khtml/khtmlview.cpp
index c6ea3ab..06e206c 100644
--- a/WebCore/khtml/khtmlview.cpp
+++ b/WebCore/khtml/khtmlview.cpp
@@ -105,9 +105,7 @@ public:
         complete = false;
         mousePressed = false;
         tooltip = 0;
-#ifdef INCREMENTAL_REPAINTING
         doFullRepaint = true;
-#endif
 #if APPLE_CHANGES
         vmode = hmode = QScrollView::Auto;
         firstLayout = true;
@@ -158,9 +156,7 @@ public:
 	layoutTimerId = 0;
         complete = false;
         mousePressed = false;
-#ifdef INCREMENTAL_REPAINTING
         doFullRepaint = true;
-#endif        
         layoutSchedulingEnabled = true;
         layoutSuppressed = false;
 #if APPLE_CHANGES
@@ -178,9 +174,7 @@ public:
     bool borderTouched:1;
     bool borderStart:1;
     bool scrollBarMoved:1;
-#ifdef INCREMENTAL_REPAINTING
     bool doFullRepaint:1;
-#endif
     
     QScrollView::ScrollBarMode vmode;
     QScrollView::ScrollBarMode hmode;
@@ -237,10 +231,6 @@ KHTMLView::KHTMLView( KHTMLPart *part, QWidget *parent, const char *name)
 {
     m_medium = "screen";
 
-#ifndef INCREMENTAL_REPAINTING
-    m_layoutObject = 0;
-#endif
-    
     m_part = part;
 #if APPLE_CHANGES
     m_part->ref();
@@ -505,12 +495,10 @@ bool KHTMLView::inLayout() const
     return d->layoutSuppressed;
 }
 
-#ifdef INCREMENTAL_REPAINTING
 bool KHTMLView::needsFullRepaint() const
 {
     return d->doFullRepaint;
 }
-#endif
 
 void KHTMLView::layout()
 {
@@ -557,9 +545,7 @@ void KHTMLView::layout()
         }
     }
 
-#ifdef INCREMENTAL_REPAINTING
     d->doFullRepaint = d->firstLayout || root->printingMode();
-#endif
 
 #if APPLE_CHANGES
     // Now set our scrollbar state for the layout.
@@ -593,27 +579,21 @@ void KHTMLView::layout()
     QScrollView::setVScrollBarMode(vMode);
 #endif
 
-#ifdef INCREMENTAL_REPAINTING
     int oldHeight = _height;
     int oldWidth = _width;
-#endif
     
     _height = visibleHeight();
     _width = visibleWidth();
 
-#ifdef INCREMENTAL_REPAINTING
     if (oldHeight != _height || oldWidth != _width)
         d->doFullRepaint = true;
-#endif
     
     RenderLayer* layer = root->layer();
      
-#ifdef INCREMENTAL_REPAINTING
     if (!d->doFullRepaint) {
         layer->computeRepaintRects();
         root->repaintObjectsBeforeLayout();
     }
-#endif
 
     root->layout();
 
@@ -627,38 +607,19 @@ void KHTMLView::layout()
     resizeContents(layer->width(), layer->height());
 
     // Now update the positions of all layers.
-#ifdef INCREMENTAL_REPAINTING
     layer->updateLayerPositions(d->doFullRepaint);
-#else
-    layer->updateLayerPositions();
-#endif
 
 #if APPLE_CHANGES
     // We update our widget positions right after doing a layout.
     root->updateWidgetPositions();
 #endif
     
-#ifdef INCREMENTAL_REPAINTING
-    if (root->needsLayout())
-#else
-    // Do not allow a full layout if we had a clip object set.
-    if ( root->needsLayout() && !m_layoutObject)
-#endif
-    {
+    if (root->needsLayout()) {
         //qDebug("needs layout, delaying repaint");
         scheduleRelayout();
         return;
     }
     setStaticBackground(d->useSlowRepaints);
-
-#ifndef INCREMENTAL_REPAINTING
-    if (m_layoutObject) {
-        m_layoutObject->repaint();
-        m_layoutObject = 0;
-    }
-    else
-        root->repaint();
-#endif    
 }
 
 //
@@ -1800,11 +1761,6 @@ void KHTMLView::slotScrollBarMoved()
 
 void KHTMLView::repaintRectangle(const QRect& r, bool immediate)
 {
-#ifndef INCREMENTAL_REPAINTING
-    if (d->layoutTimerId) // Don't bother scheduling a repaint when a layout is pending.
-        return;
-#endif
-
     updateContents(r, immediate);
 }
 
@@ -1814,27 +1770,14 @@ void KHTMLView::timerEvent ( QTimerEvent *e )
         layout();
 }
 
-#ifdef INCREMENTAL_REPAINTING
 void KHTMLView::scheduleRelayout()
-#else
-void KHTMLView::scheduleRelayout(khtml::RenderObject* clippedObj)
-#endif
 {
     if (!d->layoutSchedulingEnabled)
         return;
 
-#ifndef INCREMENTAL_REPAINTING
-    if (m_layoutObject != clippedObj)
-      m_layoutObject = 0;
-#endif
-    
     if (d->layoutTimerId)
         return;
 
-#ifndef INCREMENTAL_REPAINTING
-    m_layoutObject = clippedObj;
-#endif
-
     bool parsing = false;
     if( m_part->xmlDocImpl() ) {
         parsing = m_part->xmlDocImpl()->parsing();
@@ -1845,10 +1788,6 @@ void KHTMLView::scheduleRelayout(khtml::RenderObject* clippedObj)
 
 void KHTMLView::unscheduleRelayout()
 {
-#ifndef INCREMENTAL_REPAINTING
-    m_layoutObject = 0;
-#endif
-
     if (!d->layoutTimerId)
         return;
 
diff --git a/WebCore/khtml/khtmlview.h b/WebCore/khtml/khtmlview.h
index 27eb9ec..03b7094 100644
--- a/WebCore/khtml/khtmlview.h
+++ b/WebCore/khtml/khtmlview.h
@@ -32,9 +32,6 @@
 class QPainter;
 class QRect;
 
-// Uncomment to enable INCREMENTAL_REPAINTING
-#define INCREMENTAL_REPAINTING
-
 namespace DOM {
     class HTMLDocumentImpl;
     class DocumentImpl;
@@ -159,9 +156,7 @@ public:
 
     bool inLayout() const;
 
-#ifdef INCREMENTAL_REPAINTING
     bool needsFullRepaint() const;
-#endif
     
 #if APPLE_CHANGES
     void resetScrollBars();
@@ -227,11 +222,7 @@ private:
 
     void resetCursor();
 
-#ifdef INCREMENTAL_REPAINTING
     void scheduleRelayout();
-#else
-    void scheduleRelayout(khtml::RenderObject* clippedObj=0);
-#endif
     void unscheduleRelayout();
 
     /**
@@ -281,12 +272,7 @@ private:
     void complete();
 
     void applyBodyScrollQuirk(khtml::RenderObject* o, ScrollBarMode& hMode, ScrollBarMode& vMode);
-    
-#ifndef INCREMENTAL_REPAINTING
-    // Returns the clipped object we will repaint when we perform our scheduled layout.
-    khtml::RenderObject* layoutObject() { return m_layoutObject; }
-#endif
-    
+
     // ------------------------------------- member variables ------------------------------------
  private:
     unsigned _refCount;
@@ -301,12 +287,6 @@ private:
     KHTMLViewPrivate *d;
 
     QString m_medium;   // media type
-
-#ifndef INCREMENTAL_REPAINTING
-    // An overflow: hidden clipped object.  If this is set, a scheduled layout will only repaint
-    // the object's clipped area, and it will not do a full repaint.
-    khtml::RenderObject* m_layoutObject;
-#endif
 };
 
 #endif
diff --git a/WebCore/khtml/rendering/bidi.cpp b/WebCore/khtml/rendering/bidi.cpp
index bcda8d5..c97726c 100644
--- a/WebCore/khtml/rendering/bidi.cpp
+++ b/WebCore/khtml/rendering/bidi.cpp
@@ -1317,15 +1317,11 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren)
             }
             else if(o->isText()) {
                 static_cast<RenderText *>(o)->deleteTextBoxes();
-#ifdef INCREMENTAL_REPAINTING
                 o->setNeedsLayout(false);
-#endif
             }
             else if (o->isInlineFlow() && !endOfInline) {
                 static_cast<RenderFlow*>(o)->deleteLineBoxes();
-#ifdef INCREMENTAL_REPAINTING
                 o->setNeedsLayout(false);
-#endif
             }
             o = Bidinext( this, o, bidi, false, &endOfInline);
         }
diff --git a/WebCore/khtml/rendering/render_block.cpp b/WebCore/khtml/rendering/render_block.cpp
index a6b09d5..2f8d58d 100644
--- a/WebCore/khtml/rendering/render_block.cpp
+++ b/WebCore/khtml/rendering/render_block.cpp
@@ -368,12 +368,10 @@ void RenderBlock::layoutBlock(bool relayoutChildren)
         return;
     }
     
-#ifdef INCREMENTAL_REPAINTING
     QRect oldBounds, oldFullBounds;
     bool checkForRepaint = checkForRepaintDuringLayout();
     if (checkForRepaint)
         getAbsoluteRepaintRectIncludingFloats(oldBounds, oldFullBounds);
-#endif
 
     int oldWidth = m_width;
     
@@ -494,11 +492,9 @@ void RenderBlock::layoutBlock(bool relayoutChildren)
     if (style()->hidesOverflow() && m_layer)
         m_layer->updateScrollInfoAfterLayout();
 
-#ifdef INCREMENTAL_REPAINTING
     // Repaint with our new bounds if they are different from our old bounds.
     if (checkForRepaint)
         repaintAfterLayoutIfNeeded(oldBounds, oldFullBounds);
-#endif
 
     setNeedsLayout(false);
 }
@@ -759,10 +755,8 @@ void RenderBlock::layoutBlockChildren( bool relayoutChildren )
 
         //kdDebug(0) << "margin = " << margin << " yPos = " << m_height << endl;
 
-#ifdef INCREMENTAL_REPAINTING
         int oldChildX = child->xPos();
         int oldChildY = child->yPos();
-#endif
         
         // Try to guess our correct y position.  In most cases this guess will
         // be correct.  Only if we're wrong (when we compute the real y position)
@@ -1027,13 +1021,11 @@ void RenderBlock::layoutBlockChildren( bool relayoutChildren )
             treatCompactAsBlock = false;
         }
 
-#ifdef INCREMENTAL_REPAINTING
         // If the child moved, we have to repaint it as well as any floating/positioned
         // descendants.  An exception is if we need a layout.  In this case, we know we're going to
         // repaint ourselves (and the child) anyway.
         if (!selfNeedsLayout() && checkForRepaintDuringLayout())
             child->repaintDuringLayoutIfMoved(oldChildX, oldChildY);
-#endif
         
         child = child->nextSibling();
     }
@@ -1098,7 +1090,6 @@ void RenderBlock::layoutPositionedObjects(bool relayoutChildren)
     }
 }
 
-#ifdef INCREMENTAL_REPAINTING
 void RenderBlock::getAbsoluteRepaintRectIncludingFloats(QRect& bounds, QRect& fullBounds)
 {
     bounds = fullBounds = getAbsoluteRepaintRect();
@@ -1153,7 +1144,6 @@ void RenderBlock::repaintObjectsBeforeLayout()
             r->repaintObjectsBeforeLayout();
     }
 }
-#endif
 
 void RenderBlock::paint(QPainter* p, int _x, int _y, int _w, int _h, int _tx, int _ty, PaintAction paintAction)
 {
@@ -1450,10 +1440,8 @@ void RenderBlock::positionNewFloats()
         if (ro - lo < fwidth)
             fwidth = ro - lo; // Never look for more than what will be available.
         
-#ifdef INCREMENTAL_REPAINTING
         int oldChildX = o->xPos();
         int oldChildY = o->yPos();
-#endif
         
         if (o->style()->floating() == FLEFT)
         {
@@ -1492,11 +1480,9 @@ void RenderBlock::positionNewFloats()
         f->startY = y;
         f->endY = f->startY + _height;
 
-#ifdef INCREMENTAL_REPAINTING
         // If the child moved, we have to repaint it.
         if (checkForRepaintDuringLayout())
             o->repaintDuringLayoutIfMoved(oldChildX, oldChildY);
-#endif    
 
         //kdDebug( 6040 ) << "floatingObject x/y= (" << f->left << "/" << f->startY << "-" << f->width << "/" << f->endY - f->startY << ")" << endl;
 
diff --git a/WebCore/khtml/rendering/render_block.h b/WebCore/khtml/rendering/render_block.h
index 5eb002e..37f1ef4 100644
--- a/WebCore/khtml/rendering/render_block.h
+++ b/WebCore/khtml/rendering/render_block.h
@@ -93,11 +93,9 @@ public:
     virtual void addChildToFlow(RenderObject* newChild, RenderObject* beforeChild);
     virtual void removeChild(RenderObject *oldChild);
 
-#ifdef INCREMENTAL_REPAINTING
     virtual void repaintObjectsBeforeLayout();
     virtual void repaintFloatingDescendants();
     virtual void getAbsoluteRepaintRectIncludingFloats(QRect& bounds, QRect& fullBounds);
-#endif
 
     virtual void setStyle(RenderStyle* _style);
 
diff --git a/WebCore/khtml/rendering/render_box.cpp b/WebCore/khtml/rendering/render_box.cpp
index 9ab5636..439088f 100644
--- a/WebCore/khtml/rendering/render_box.cpp
+++ b/WebCore/khtml/rendering/render_box.cpp
@@ -610,13 +610,8 @@ void RenderBox::computeAbsoluteRepaintRect(QRect& r, bool f)
     // is translated, but the render box isn't, so we need to do this to get the
     // right dirty rect.  Since this is called from RenderObject::setStyle, the relative position
     // flag on the RenderObject has been cleared, so use the one on the style().
-#ifdef INCREMENTAL_REPAINTING
     if (style()->position() == RELATIVE && m_layer)
         m_layer->relativePositionOffset(x,y);
-#else
-    if (style()->position() == RELATIVE)
-        relativePositionOffset(x,y);
-#endif
     
     if (style()->position()==FIXED)
         f = true;
@@ -644,7 +639,6 @@ void RenderBox::computeAbsoluteRepaintRect(QRect& r, bool f)
     }
 }
 
-#ifdef INCREMENTAL_REPAINTING
 void RenderBox::repaintDuringLayoutIfMoved(int oldX, int oldY)
 {
     int newX = m_x;
@@ -660,7 +654,6 @@ void RenderBox::repaintDuringLayoutIfMoved(int oldX, int oldY)
         repaintFloatingDescendants();
     }
 }
-#endif
 
 void RenderBox::relativePositionOffset(int &tx, int &ty)
 {
diff --git a/WebCore/khtml/rendering/render_box.h b/WebCore/khtml/rendering/render_box.h
index 0917776..1929320 100644
--- a/WebCore/khtml/rendering/render_box.h
+++ b/WebCore/khtml/rendering/render_box.h
@@ -97,9 +97,7 @@ public:
     virtual QRect getAbsoluteRepaintRect();
     virtual void computeAbsoluteRepaintRect(QRect& r, bool f=false);
 
-#ifdef INCREMENTAL_REPAINTING
     virtual void repaintDuringLayoutIfMoved(int oldX, int oldY);
-#endif
     
     virtual short containingBlockWidth() const;
 
diff --git a/WebCore/khtml/rendering/render_container.cpp b/WebCore/khtml/rendering/render_container.cpp
index 0848678..3c4a460 100644
--- a/WebCore/khtml/rendering/render_container.cpp
+++ b/WebCore/khtml/rendering/render_container.cpp
@@ -160,9 +160,7 @@ RenderObject* RenderContainer::removeChildNode(RenderObject* oldChild)
     // disappears gets repainted properly.
     if (!documentBeingDestroyed()) {
         oldChild->setNeedsLayoutAndMinMaxRecalc();
-#ifdef INCREMENTAL_REPAINTING
         oldChild->repaint();
-#endif
         
         // Keep our layer hierarchy updated.
         oldChild->removeLayers(enclosingLayer());
diff --git a/WebCore/khtml/rendering/render_flexbox.cpp b/WebCore/khtml/rendering/render_flexbox.cpp
index 1a01f5e..0d38078 100644
--- a/WebCore/khtml/rendering/render_flexbox.cpp
+++ b/WebCore/khtml/rendering/render_flexbox.cpp
@@ -250,12 +250,10 @@ void RenderFlexibleBox::layoutBlock(bool relayoutChildren)
         return;
     }
 
-#ifdef INCREMENTAL_REPAINTING
     QRect oldBounds;
     bool checkForRepaint = checkForRepaintDuringLayout();
     if (checkForRepaint)
         oldBounds = getAbsoluteRepaintRect();
-#endif
     
     int oldWidth = m_width;
     int oldHeight = m_height;
@@ -330,11 +328,9 @@ void RenderFlexibleBox::layoutBlock(bool relayoutChildren)
     if (style()->hidesOverflow() && m_layer)
         m_layer->updateScrollInfoAfterLayout();
 
-#ifdef INCREMENTAL_REPAINTING
     // Repaint with our new bounds if they are different from our old bounds.
     if (checkForRepaint)
         repaintAfterLayoutIfNeeded(oldBounds, oldBounds);
-#endif
     
     setNeedsLayout(false);
 }
@@ -916,19 +912,17 @@ void RenderFlexibleBox::layoutVerticalBox(bool relayoutChildren)
 
 void RenderFlexibleBox::placeChild(RenderObject* child, int x, int y)
 {
-#ifdef INCREMENTAL_REPAINTING
     int oldChildX = child->xPos();
     int oldChildY = child->yPos();
-#endif
+
     // Place the child.
     child->setPos(x, y);
-#ifdef INCREMENTAL_REPAINTING
+
     // If the child moved, we have to repaint it as well as any floating/positioned
     // descendants.  An exception is if we need a layout.  In this case, we know we're going to
     // repaint ourselves (and the child) anyway.
     if (!selfNeedsLayout() && checkForRepaintDuringLayout())
         child->repaintDuringLayoutIfMoved(oldChildX, oldChildY);
-#endif    
 }
 
 const char *RenderFlexibleBox::renderName() const
diff --git a/WebCore/khtml/rendering/render_flow.cpp b/WebCore/khtml/rendering/render_flow.cpp
index ea8c1db..371087f 100644
--- a/WebCore/khtml/rendering/render_flow.cpp
+++ b/WebCore/khtml/rendering/render_flow.cpp
@@ -247,13 +247,9 @@ QRect RenderFlow::getAbsoluteRepaintRect()
         int ow = style() ? style()->outlineSize() : 0;
         if (isCompact())
             left -= m_x;
-#ifdef INCREMENTAL_REPAINTING
         if (style()->position() == RELATIVE && m_layer)
             m_layer->relativePositionOffset(left, top);
-#else
-        if (style()->position() == RELATIVE)
-            relativePositionOffset(left, top);
-#endif
+
         QRect r(-ow+left, -ow+top, width()+ow*2, height()+ow*2);
         containingBlock()->computeAbsoluteRepaintRect(r);
         if (ow) {
diff --git a/WebCore/khtml/rendering/render_image.cpp b/WebCore/khtml/rendering/render_image.cpp
index f59a0c9..104fc99 100644
--- a/WebCore/khtml/rendering/render_image.cpp
+++ b/WebCore/khtml/rendering/render_image.cpp
@@ -405,12 +405,10 @@ void RenderImage::layout()
     KHTMLAssert(needsLayout());
     KHTMLAssert( minMaxKnown() );
 
-#ifdef INCREMENTAL_REPAINTING
     QRect oldBounds;
     bool checkForRepaint = checkForRepaintDuringLayout();
     if (checkForRepaint)
         oldBounds = getAbsoluteRepaintRect();
-#endif
     
     short oldwidth = m_width;
     int oldheight = m_height;
@@ -443,10 +441,8 @@ void RenderImage::layout()
     if ( m_width != oldwidth || m_height != oldheight )
         resizeCache = QPixmap();
 
-#ifdef INCREMENTAL_REPAINTING
     if (checkForRepaint)
         repaintAfterLayoutIfNeeded(oldBounds, oldBounds);
-#endif
     
     setNeedsLayout(false);
 }
diff --git a/WebCore/khtml/rendering/render_layer.cpp b/WebCore/khtml/rendering/render_layer.cpp
index 295fb49..072d3bf 100644
--- a/WebCore/khtml/rendering/render_layer.cpp
+++ b/WebCore/khtml/rendering/render_layer.cpp
@@ -78,10 +78,8 @@ m_previous( 0 ),
 m_next( 0 ),
 m_first( 0 ),
 m_last( 0 ),
-#ifdef INCREMENTAL_REPAINTING
 m_relX( 0 ),
 m_relY( 0 ),
-#endif
 m_x( 0 ),
 m_y( 0 ),
 m_width( 0 ),
@@ -114,7 +112,6 @@ RenderLayer::~RenderLayer()
     delete m_marquee;
 }
 
-#ifdef INCREMENTAL_REPAINTING
 void RenderLayer::computeRepaintRects()
 {
     // FIXME: Child object could override visibility.
@@ -123,26 +120,18 @@ void RenderLayer::computeRepaintRects()
     for	(RenderLayer* child = firstChild(); child; child = child->nextSibling())
         child->computeRepaintRects();
 }
-#endif
 
-#ifdef INCREMENTAL_REPAINTING
 void RenderLayer::updateLayerPositions(bool doFullRepaint, bool checkForRepaint)
-#else
-void RenderLayer::updateLayerPositions()
-#endif
 {
-#ifdef INCREMENTAL_REPAINTING
     if (doFullRepaint) {
         m_object->repaint();
         checkForRepaint = doFullRepaint = false;
     }
-#endif
     
     updateLayerPosition(); // For relpositioned layers or non-positioned layers,
                            // we need to keep in sync, since we may have shifted relative
                            // to our parent layer.
 
-#ifdef INCREMENTAL_REPAINTING
     if (m_hBar || m_vBar) {
         // Need to position the scrollbars.
         int x = 0;
@@ -155,14 +144,9 @@ void RenderLayer::updateLayerPositions()
     // FIXME: Child object could override visibility.
     if (checkForRepaint && (m_object->style()->visibility() == VISIBLE))
         m_object->repaintAfterLayoutIfNeeded(m_repaintRect, m_fullRepaintRect);
-#endif
     
     for	(RenderLayer* child = firstChild(); child; child = child->nextSibling())
-#ifdef INCREMENTAL_REPAINTING
         child->updateLayerPositions(doFullRepaint, checkForRepaint);
-#else
-        child->updateLayerPositions();
-#endif
         
     // With all our children positioned, now update our marquee if we need to.
     if (m_marquee)
@@ -190,16 +174,11 @@ void RenderLayer::updateLayerPosition()
         }
     }
 
-#ifdef INCREMENTAL_REPAINTING
     m_relX = m_relY = 0;
     if (m_object->isRelPositioned()) {
         static_cast<RenderBox*>(m_object)->relativePositionOffset(m_relX, m_relY);
         x += m_relX; y += m_relY;
     }
-#else
-    if (m_object->isRelPositioned())
-        static_cast<RenderBox*>(m_object)->relativePositionOffset(x, y);
-#endif
     
     // Subtract our parent's scroll offset.
     if (parent())
@@ -778,11 +757,6 @@ RenderLayer::paintLayer(RenderLayer* rootLayer, QPainter *p,
                             damageRect.width(), damageRect.height(),
                             x - renderer()->xPos(), y - renderer()->yPos(),
                             PaintActionElementBackground);
-
-#ifndef INCREMENTAL_REPAINTING
-        // Position our scrollbars.
-        positionScrollbars(layerBounds);
-#endif
         
 #if APPLE_CHANGES
         // Our scrollbar widgets paint exactly when we tell them to, so that they work properly with
diff --git a/WebCore/khtml/rendering/render_layer.h b/WebCore/khtml/rendering/render_layer.h
index c8a1a2e..f9ae4aa 100644
--- a/WebCore/khtml/rendering/render_layer.h
+++ b/WebCore/khtml/rendering/render_layer.h
@@ -53,9 +53,6 @@
 class QScrollBar;
 template <class T> class QPtrVector;
 
-// Uncomment to enable incremental painting
-#define INCREMENTAL_REPAINTING 1
-
 namespace khtml {
     class RenderStyle;
     class RenderTable;
@@ -204,15 +201,11 @@ public:
     void updateScrollPositionFromScrollbars();
 
     void updateLayerPosition();
-#ifdef INCREMENTAL_REPAINTING
     void updateLayerPositions(bool doFullRepaint = false, bool checkForRepaint=true);
     void computeRepaintRects();
     void relativePositionOffset(int& relX, int& relY) {
         relX += m_relX; relY += m_relY;
     }
-#else
-    void updateLayerPositions();
-#endif
 
     // Get the enclosing stacking context for this layer.  A stacking context is a layer
     // that has a non-auto z-index.
@@ -292,14 +285,12 @@ protected:
     RenderLayer* m_first;
     RenderLayer* m_last;
 
-#ifdef INCREMENTAL_REPAINTING
     QRect m_repaintRect; // Cached repaint rects. Used by layout.
     QRect m_fullRepaintRect;
 
     // Our current relative position offset.
     int m_relX;
     int m_relY;
-#endif
 
     // Our (x,y) coordinates are in our parent layer's coordinate space.
     short m_x;
diff --git a/WebCore/khtml/rendering/render_object.cpp b/WebCore/khtml/rendering/render_object.cpp
index afcf0b0..9e1e446 100644
--- a/WebCore/khtml/rendering/render_object.cpp
+++ b/WebCore/khtml/rendering/render_object.cpp
@@ -583,11 +583,7 @@ void RenderObject::markAllDescendantsWithFloatsForLayout(RenderObject*)
 
 void RenderObject::setNeedsLayout(bool b, bool markParents) 
 {
-#ifdef INCREMENTAL_REPAINTING
     bool alreadyNeededLayout = m_needsLayout;
-#else
-    bool alreadyNeededLayout = false;
-#endif
     m_needsLayout = b;
     if (b) {
         if (!alreadyNeededLayout && markParents)
@@ -601,11 +597,7 @@ void RenderObject::setNeedsLayout(bool b, bool markParents)
 
 void RenderObject::setChildNeedsLayout(bool b, bool markParents)
 {
-#ifdef INCREMENTAL_REPAINTING
     bool alreadyNeededLayout = m_normalChildNeedsLayout;
-#else
-    bool alreadyNeededLayout = false;
-#endif
     m_normalChildNeedsLayout = b;
     if (b) {
         if (!alreadyNeededLayout && markParents)
@@ -619,43 +611,26 @@ void RenderObject::setChildNeedsLayout(bool b, bool markParents)
 
 void RenderObject::markContainingBlocksForLayout()
 {
-#ifndef INCREMENTAL_REPAINTING
-    RenderObject* clippedObj = (style()->hidesOverflow() && !isText()) ? this : 0;
-#endif
-    
     RenderObject *o = container();
     RenderObject *last = this;
 
     while (o) {
         if (!last->isText() && (last->style()->position() == FIXED || last->style()->position() == ABSOLUTE)) {
-#ifdef INCREMENTAL_REPAINTING
             if (o->m_posChildNeedsLayout)
                 return;
-#endif
             o->m_posChildNeedsLayout = true;
         }
         else {
-#ifdef INCREMENTAL_REPAINTING
             if (o->m_normalChildNeedsLayout)
                 return;
-#endif
             o->m_normalChildNeedsLayout = true;
         }
 
-#ifndef INCREMENTAL_REPAINTING
-        if (o->style()->hidesOverflow() && !clippedObj)
-            clippedObj = o;
-#endif
-
         last = o;
         o = o->container();
     }
 
-#ifdef INCREMENTAL_REPAINTING
     last->scheduleRelayout();
-#else
-    last->scheduleRelayout(clippedObj);
-#endif
 }
 
 RenderBlock* RenderObject::containingBlock() const
@@ -1158,7 +1133,6 @@ void RenderObject::repaintRectangle(const QRect& r, bool immediate)
     c->repaintViewRectangle(absRect, immediate);
 }
 
-#ifdef INCREMENTAL_REPAINTING
 void RenderObject::repaintAfterLayoutIfNeeded(const QRect& oldBounds, const QRect& oldFullBounds)
 {
     QRect newBounds, newFullBounds;
@@ -1209,8 +1183,6 @@ void RenderObject::repaintObjectsBeforeLayout()
     }
 }
 
-#endif
-
 QRect RenderObject::getAbsoluteRepaintRectWithOutline(int ow)
 {
     QRect r(getAbsoluteRepaintRect());
@@ -1238,12 +1210,10 @@ QRect RenderObject::getAbsoluteRepaintRect()
     return QRect();
 }
 
-#ifdef INCREMENTAL_REPAINTING
 void RenderObject::getAbsoluteRepaintRectIncludingFloats(QRect& bounds, QRect& fullBounds)
 {
     bounds = fullBounds = getAbsoluteRepaintRect();
 }
-#endif
 
 void RenderObject::computeAbsoluteRepaintRect(QRect& r, bool f)
 {
@@ -1687,16 +1657,6 @@ void RenderObject::remove()
 
 void RenderObject::detach()
 {
-#ifndef INCREMENTAL_REPAINTING
-    // If we're an overflow:hidden object that currently needs layout, we need
-    // to make sure the view isn't holding on to us.
-    if (needsLayout() && style()->hidesOverflow()) {
-        RenderCanvas* r = canvas();
-        if (r && r->view()->layoutObject() == this)
-            r->view()->unscheduleRelayout();
-    }
-#endif
-
     remove();
     
     // by default no refcounting
@@ -1994,20 +1954,12 @@ void RenderObject::recalcMinMaxWidths()
     m_recalcMinMax = false;
 }
 
-#ifdef INCREMENTAL_REPAINTING
 void RenderObject::scheduleRelayout()
-#else
-void RenderObject::scheduleRelayout(RenderObject* clippedObj)
-#endif
 {
     if (!isCanvas()) return;
     KHTMLView *view = static_cast<RenderCanvas *>(this)->view();
     if (view)
-#ifdef INCREMENTAL_REPAINTING
         view->scheduleRelayout();
-#else
-        view->scheduleRelayout(clippedObj);
-#endif
 }
 
 
diff --git a/WebCore/khtml/rendering/render_object.h b/WebCore/khtml/rendering/render_object.h
index 597cd1c..ad1962e 100644
--- a/WebCore/khtml/rendering/render_object.h
+++ b/WebCore/khtml/rendering/render_object.h
@@ -36,9 +36,6 @@
 #include "khtml_events.h"
 #include "xml/dom_docimpl.h"
 
-// Uncomment to turn on incremental repainting.
-#define INCREMENTAL_REPAINTING 1
-
 class QPainter;
 class QTextStream;
 class CSSStyle;
@@ -319,11 +316,7 @@ public:
     void setReplaced(bool b=true) { m_replaced = b; }
     void setIsSelectionBorder(bool b=true) { m_isSelectionBorder = b; }
 
-#ifdef INCREMENTAL_REPAINTING
     void scheduleRelayout();
-#else
-    void scheduleRelayout(RenderObject* clippedObj);
-#endif
     
     virtual InlineBox* createInlineBox(bool makePlaceHolderBox, bool isRootLineBox);
     
@@ -612,7 +605,6 @@ public:
     // Repaint a specific subrectangle within a given object.  The rect |r| is in the object's coordinate space.
     void repaintRectangle(const QRect& r, bool immediate = false);
     
-#ifdef INCREMENTAL_REPAINTING
     // Repaint only if our old bounds and new bounds are different.
     virtual void repaintAfterLayoutIfNeeded(const QRect& oldBounds, const QRect& oldFullBounds);
 
@@ -626,7 +618,6 @@ public:
     virtual void repaintObjectsBeforeLayout();
 
     bool checkForRepaintDuringLayout() const;
-#endif
 
     // Returns the rect that should be repainted whenever this object changes.  The rect is in the view's
     // coordinate space.  This method deals with outlines and overflow.
@@ -634,9 +625,7 @@ public:
 
     QRect getAbsoluteRepaintRectWithOutline(int ow);
 
-#ifdef INCREMENTAL_REPAINTING
     virtual void getAbsoluteRepaintRectIncludingFloats(QRect& bounds, QRect& boundsWithChildren);
-#endif
 
     // Given a rect in the object's coordinate space, this method converts the rectangle to the view's
     // coordinate space.
diff --git a/WebCore/khtml/rendering/render_table.cpp b/WebCore/khtml/rendering/render_table.cpp
index a4ce2a6..84b8934 100644
--- a/WebCore/khtml/rendering/render_table.cpp
+++ b/WebCore/khtml/rendering/render_table.cpp
@@ -236,12 +236,10 @@ void RenderTable::layout()
         return;
     }
 
-#ifdef INCREMENTAL_REPAINTING
     QRect oldBounds, oldFullBounds;
     bool checkForRepaint = checkForRepaintDuringLayout();
     if (checkForRepaint)
         getAbsoluteRepaintRectIncludingFloats(oldBounds, oldFullBounds);
-#endif
     
     //kdDebug( 6040 ) << renderName() << "(Table)"<< this << " ::layout0() width=" << width() << ", needsLayout=" << needsLayout() << endl;
     
@@ -383,11 +381,9 @@ void RenderTable::layout()
     // ### only pass true if width or height changed.
     layoutPositionedObjects( true );
 
-#ifdef INCREMENTAL_REPAINTING
     // Repaint with our new bounds if they are different from our old bounds.
     if (checkForRepaint)
         repaintAfterLayoutIfNeeded(oldBounds, oldFullBounds);
-#endif
     
     setNeedsLayout(false);
 }
@@ -1357,10 +1353,8 @@ int RenderTableSection::layoutRows( int toAdd )
             cell->setCellBottomExtra( rHeight - cell->height() - te);
             }
             
-#ifdef INCREMENTAL_REPAINTING
             int oldCellX = cell->xPos();
             int oldCellY = cell->yPos();
-#endif
         
             if (style()->direction()==RTL) {
                 cell->setPos(
@@ -1372,13 +1366,11 @@ int RenderTableSection::layoutRows( int toAdd )
                 cell->setPos( table()->columnPos[c] + leftOffset, rowPos[rindx] );
 	    }
 
-#ifdef INCREMENTAL_REPAINTING
             // If the cell moved, we have to repaint it as well as any floating/positioned
             // descendants.  An exception is if we need a layout.  In this case, we know we're going to
             // repaint ourselves (and the cell) anyway.
             if (!table()->selfNeedsLayout() && checkForRepaintDuringLayout())
                 cell->repaintDuringLayoutIfMoved(oldCellX, oldCellY);
-#endif
         }
     }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list