Rename addClip to clip.
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Oct 2006 22:14:49 +0000 (22:14 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Oct 2006 22:14:49 +0000 (22:14 +0000)
        Reviewed by darin

        * kcanvas/RenderForeignObject.cpp:
        (WebCore::RenderForeignObject::paint):
        * kcanvas/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::paint):
        * kcanvas/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::paint):
        * platform/GraphicsContext.h:
        * platform/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContext::clip):
        * platform/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::savePlatformState):
        (WebCore::GraphicsContext::restorePlatformState):
        (WebCore::GraphicsContext::clip):
        (WebCore::GraphicsContext::addRoundedRectClip):
        (WebCore::GraphicsContext::addInnerRoundedRectClip):
        (WebCore::GraphicsContext::scale):
        (WebCore::GraphicsContext::rotate):
        (WebCore::GraphicsContext::translate):
        (WebCore::GraphicsContext::concatCTM):
        * platform/cg/GraphicsContextPlatformPrivate.h:
        (WebCore::GraphicsContextPlatformPrivate::save):
        (WebCore::GraphicsContextPlatformPrivate::restore):
        (WebCore::GraphicsContextPlatformPrivate::clip):
        (WebCore::GraphicsContextPlatformPrivate::scale):
        (WebCore::GraphicsContextPlatformPrivate::rotate):
        (WebCore::GraphicsContextPlatformPrivate::translate):
        (WebCore::GraphicsContextPlatformPrivate::concatCTM):
        * platform/qt/GraphicsContextQt.cpp:
        (WebCore::GraphicsContext::clip):
        (WebCore::GraphicsContext::addInnerRoundedRectClip):
        (WebCore::GraphicsContext::addRoundedRectClip):
        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::paintBackground):
        (WebCore::InlineFlowBox::paintBackgroundAndBorder):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paintSelection):
        (WebCore::InlineTextBox::paintTextMatchMarker):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::paintBackgroundExtended):
        * rendering/RenderButton.cpp:
        (WebCore::RenderButton::paintObject):
        * rendering/RenderFileUploadControl.cpp:
        (WebCore::RenderFileUploadControl::paintObject):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::beginTransparencyLayers):
        (WebCore::setClip):
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::paintObject):
        * rendering/RenderMenuList.cpp:
        (WebCore::RenderMenuList::paintObject):
        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::paintBackgroundsBehindCell):

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

18 files changed:
WebCore/ChangeLog
WebCore/kcanvas/RenderForeignObject.cpp
WebCore/kcanvas/RenderSVGContainer.cpp
WebCore/kcanvas/RenderSVGImage.cpp
WebCore/platform/GraphicsContext.h
WebCore/platform/cairo/GraphicsContextCairo.cpp
WebCore/platform/cg/GraphicsContextCG.cpp
WebCore/platform/cg/GraphicsContextPlatformPrivate.h
WebCore/platform/qt/GraphicsContextQt.cpp
WebCore/rendering/InlineFlowBox.cpp
WebCore/rendering/InlineTextBox.cpp
WebCore/rendering/RenderBox.cpp
WebCore/rendering/RenderButton.cpp
WebCore/rendering/RenderFileUploadControl.cpp
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderListBox.cpp
WebCore/rendering/RenderMenuList.cpp
WebCore/rendering/RenderTableCell.cpp

index 9359c606a13170cf1233ef499d08b6f2788dcd46..f2aaa92a0d0f908d5ada3acc39a2881899d933ef 100644 (file)
@@ -1,3 +1,62 @@
+2006-10-05  David Hyatt  <hyatt@apple.com>
+
+        Rename addClip to clip.
+
+        Reviewed by darin
+
+        * kcanvas/RenderForeignObject.cpp:
+        (WebCore::RenderForeignObject::paint):
+        * kcanvas/RenderSVGContainer.cpp:
+        (WebCore::RenderSVGContainer::paint):
+        * kcanvas/RenderSVGImage.cpp:
+        (WebCore::RenderSVGImage::paint):
+        * platform/GraphicsContext.h:
+        * platform/cairo/GraphicsContextCairo.cpp:
+        (WebCore::GraphicsContext::clip):
+        * platform/cg/GraphicsContextCG.cpp:
+        (WebCore::GraphicsContext::savePlatformState):
+        (WebCore::GraphicsContext::restorePlatformState):
+        (WebCore::GraphicsContext::clip):
+        (WebCore::GraphicsContext::addRoundedRectClip):
+        (WebCore::GraphicsContext::addInnerRoundedRectClip):
+        (WebCore::GraphicsContext::scale):
+        (WebCore::GraphicsContext::rotate):
+        (WebCore::GraphicsContext::translate):
+        (WebCore::GraphicsContext::concatCTM):
+        * platform/cg/GraphicsContextPlatformPrivate.h:
+        (WebCore::GraphicsContextPlatformPrivate::save):
+        (WebCore::GraphicsContextPlatformPrivate::restore):
+        (WebCore::GraphicsContextPlatformPrivate::clip):
+        (WebCore::GraphicsContextPlatformPrivate::scale):
+        (WebCore::GraphicsContextPlatformPrivate::rotate):
+        (WebCore::GraphicsContextPlatformPrivate::translate):
+        (WebCore::GraphicsContextPlatformPrivate::concatCTM):
+        * platform/qt/GraphicsContextQt.cpp:
+        (WebCore::GraphicsContext::clip):
+        (WebCore::GraphicsContext::addInnerRoundedRectClip):
+        (WebCore::GraphicsContext::addRoundedRectClip):
+        * rendering/InlineFlowBox.cpp:
+        (WebCore::InlineFlowBox::paintBackground):
+        (WebCore::InlineFlowBox::paintBackgroundAndBorder):
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::paintSelection):
+        (WebCore::InlineTextBox::paintTextMatchMarker):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::paintBackgroundExtended):
+        * rendering/RenderButton.cpp:
+        (WebCore::RenderButton::paintObject):
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::RenderFileUploadControl::paintObject):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::beginTransparencyLayers):
+        (WebCore::setClip):
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::paintObject):
+        * rendering/RenderMenuList.cpp:
+        (WebCore::RenderMenuList::paintObject):
+        * rendering/RenderTableCell.cpp:
+        (WebCore::RenderTableCell::paintBackgroundsBehindCell):
+
 2006-10-05  Mitz Pettel  <mitz@webkit.org>
 
         Reviewed by Darin.
 2006-10-05  Mitz Pettel  <mitz@webkit.org>
 
         Reviewed by Darin.
index 10d5fb120a8ed66fd08a3fedda870cad5f6085d3..415b37609ea00b3b1d7d1694e3af59156ed1275b 100644 (file)
@@ -63,7 +63,7 @@ void RenderForeignObject::paint(PaintInfo& paintInfo, int parentX, int parentY)
     context->concatCTM(localTransform());
     context->concatCTM(translationForAttributes());
 
     context->concatCTM(localTransform());
     context->concatCTM(translationForAttributes());
 
-    paintInfo.p->addClip(getClipRect(parentX, parentY));
+    paintInfo.p->clip(getClipRect(parentX, parentY));
 
     float opacity = style()->opacity();
     if (opacity < 1.0f)
 
     float opacity = style()->opacity();
     if (opacity < 1.0f)
index 9b04316be8488395133348cb07b3ac0592994cdb..5f0e23ee1b30970e7c3dbcee922220c6f060e812 100644 (file)
@@ -166,7 +166,7 @@ void RenderSVGContainer::paint(PaintInfo& paintInfo, int parentX, int parentY)
     
     if (!viewport().isEmpty()) {
         if (style()->overflowX() != OVISIBLE)
     
     if (!viewport().isEmpty()) {
         if (style()->overflowX() != OVISIBLE)
-            paintInfo.p->addClip(enclosingIntRect(viewport())); // FIXME: Eventually we'll want float-precision clipping
+            paintInfo.p->clip(enclosingIntRect(viewport())); // FIXME: Eventually we'll want float-precision clipping
         deviceContext->concatCTM(AffineTransform().translate(viewport().x(), viewport().y()));
     }
     
         deviceContext->concatCTM(AffineTransform().translate(viewport().x(), viewport().y()));
     }
     
@@ -183,7 +183,7 @@ void RenderSVGContainer::paint(PaintInfo& paintInfo, int parentX, int parentY)
 
     float opacity = style()->opacity();
     if (opacity < 1.0f) {
 
     float opacity = style()->opacity();
     if (opacity < 1.0f) {
-        paintInfo.p->addClip(enclosingIntRect(strokeBBox));
+        paintInfo.p->clip(enclosingIntRect(strokeBBox));
         paintInfo.p->beginTransparencyLayer(opacity);
     }
 
         paintInfo.p->beginTransparencyLayer(opacity);
     }
 
index a6827379404f188ecae729a535117a0862adcc02..1c7de7918b8c6491d26e730c21c4e31a9c451b3d 100644 (file)
@@ -160,7 +160,7 @@ void RenderSVGImage::paint(PaintInfo& paintInfo, int parentX, int parentY)
 
     float opacity = style()->opacity();
     if (opacity < 1.0f) {
 
     float opacity = style()->opacity();
     if (opacity < 1.0f) {
-        c->addClip(enclosingIntRect(boundingBox));
+        c->clip(enclosingIntRect(boundingBox));
         c->beginTransparencyLayer(opacity);
     }
 
         c->beginTransparencyLayer(opacity);
     }
 
index 9a2ee4b75f56f6c64bf2d5f6b7eab712cfe48b14..16bfe508aef6742f2b91c1cb32ba31853b2436ec 100644 (file)
@@ -112,7 +112,7 @@ namespace WebCore {
             Image::TileRule hRule = Image::StretchTile, Image::TileRule vRule = Image::StretchTile,
             CompositeOperator = CompositeSourceOver);
 
             Image::TileRule hRule = Image::StretchTile, Image::TileRule vRule = Image::StretchTile,
             CompositeOperator = CompositeSourceOver);
 
-        void addClip(const IntRect&);
+        void clip(const IntRect&);
         void addRoundedRectClip(const IntRect&, const IntSize& topLeft, const IntSize& topRight, const IntSize& bottomLeft, const IntSize& bottomRight);
         void addInnerRoundedRectClip(const IntRect&, int thickness);
 
         void addRoundedRectClip(const IntRect&, const IntSize& topLeft, const IntSize& topRight, const IntSize& bottomLeft, const IntSize& bottomRight);
         void addInnerRoundedRectClip(const IntRect&, int thickness);
 
index c282f6c104bcc341547fcf191c397c9574bfab3c..6cbf27359b151132e9e98985f71028e4a33aa608 100644 (file)
@@ -366,7 +366,7 @@ void GraphicsContext::fillRect(const FloatRect& rect, const Color& color)
         fillRectSourceOver(m_data->context, rect, color);
 }
 
         fillRectSourceOver(m_data->context, rect, color);
 }
 
-void GraphicsContext::addClip(const IntRect& rect)
+void GraphicsContext::clip(const IntRect& rect)
 {
     if (paintingDisabled())
         return;
 {
     if (paintingDisabled())
         return;
index 6cee6fae3023bbca2db9e5e8f9527ed4cb156f3a..58514b2983327bbad77117c28ba5f5ba69b87576 100644 (file)
@@ -91,12 +91,18 @@ static void setCGStrokeColor(CGContextRef context, const Color& color)
 
 void GraphicsContext::savePlatformState()
 {
 
 void GraphicsContext::savePlatformState()
 {
+    // Note: Do not use this function within this class implementation, since we want to avoid the extra
+    // save of the secondary context (in GraphicsContextPlatformPrivate.h).
     CGContextSaveGState(platformContext());
     CGContextSaveGState(platformContext());
+    m_data->save();
 }
 
 void GraphicsContext::restorePlatformState()
 {
 }
 
 void GraphicsContext::restorePlatformState()
 {
+    // Note: Do not use this function within this class implementation, since we want to avoid the extra
+    // restore of the secondary context (in GraphicsContextPlatformPrivate.h).
     CGContextRestoreGState(platformContext());
     CGContextRestoreGState(platformContext());
+    m_data->restore();
 }
 
 // Draws a filled rectangle with a stroked border.
 }
 
 // Draws a filled rectangle with a stroked border.
@@ -442,11 +448,12 @@ void GraphicsContext::fillRect(const FloatRect& rect, const Color& color)
     }
 }
 
     }
 }
 
-void GraphicsContext::addClip(const IntRect& rect)
+void GraphicsContext::clip(const IntRect& rect)
 {
     if (paintingDisabled())
         return;
     CGContextClipToRect(platformContext(), rect);
 {
     if (paintingDisabled())
         return;
     CGContextClipToRect(platformContext(), rect);
+    m_data->clip(rect);
 }
 
 void GraphicsContext::addRoundedRectClip(const IntRect& rect, const IntSize& topLeft, const IntSize& topRight,
 }
 
 void GraphicsContext::addRoundedRectClip(const IntRect& rect, const IntSize& topLeft, const IntSize& topRight,
@@ -465,7 +472,7 @@ void GraphicsContext::addRoundedRectClip(const IntRect& rect, const IntSize& top
         return;
  
     // Clip to our rect.
         return;
  
     // Clip to our rect.
-    addClip(rect);
+    clip(rect);
 
     // OK, the curves can fit.
     CGContextRef context = platformContext();
 
     // OK, the curves can fit.
     CGContextRef context = platformContext();
@@ -508,7 +515,7 @@ void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect, int thickness
     if (paintingDisabled())
         return;
 
     if (paintingDisabled())
         return;
 
-    addClip(rect);
+    clip(rect);
     CGContextRef context = platformContext();
     
     // Add outer ellipse
     CGContextRef context = platformContext();
     
     // Add outer ellipse
@@ -649,6 +656,7 @@ void GraphicsContext::clip(const Path& path)
     CGContextBeginPath(context);
     CGContextAddPath(context, path.platformPath());
     CGContextClip(context);
     CGContextBeginPath(context);
     CGContextAddPath(context, path.platformPath());
     CGContextClip(context);
+    m_data->clip(path);
 }
 
 void GraphicsContext::scale(const FloatSize& size)
 }
 
 void GraphicsContext::scale(const FloatSize& size)
@@ -656,6 +664,7 @@ void GraphicsContext::scale(const FloatSize& size)
     if (paintingDisabled())
         return;
     CGContextScaleCTM(platformContext(), size.width(), size.height());
     if (paintingDisabled())
         return;
     CGContextScaleCTM(platformContext(), size.width(), size.height());
+    m_data->scale(size);
 }
 
 void GraphicsContext::rotate(float angle)
 }
 
 void GraphicsContext::rotate(float angle)
@@ -663,6 +672,7 @@ void GraphicsContext::rotate(float angle)
     if (paintingDisabled())
         return;
     CGContextRotateCTM(platformContext(), angle);
     if (paintingDisabled())
         return;
     CGContextRotateCTM(platformContext(), angle);
+    m_data->rotate(angle);
 }
 
 void GraphicsContext::translate(float x, float y)
 }
 
 void GraphicsContext::translate(float x, float y)
@@ -670,6 +680,7 @@ void GraphicsContext::translate(float x, float y)
     if (paintingDisabled())
         return;
     CGContextTranslateCTM(platformContext(), x, y);
     if (paintingDisabled())
         return;
     CGContextTranslateCTM(platformContext(), x, y);
+    m_data->translate(x, y);
 }
 
 void GraphicsContext::concatCTM(const AffineTransform& transform)
 }
 
 void GraphicsContext::concatCTM(const AffineTransform& transform)
@@ -677,6 +688,7 @@ void GraphicsContext::concatCTM(const AffineTransform& transform)
     if (paintingDisabled())
         return;
     CGContextConcatCTM(platformContext(), transform);
     if (paintingDisabled())
         return;
     CGContextConcatCTM(platformContext(), transform);
+    m_data->concatCTM(transform);
 }
 
 FloatRect GraphicsContext::roundToDevicePixels(const FloatRect& rect)
 }
 
 FloatRect GraphicsContext::roundToDevicePixels(const FloatRect& rect)
index e1f5fff9fb6469179a9450a0d04cd7828decd1d4..89deadca659da68b6863f8939a1f5e81feaf6437 100644 (file)
@@ -39,6 +39,17 @@ public:
         CGContextRelease(m_cgContext);
     }
 
         CGContextRelease(m_cgContext);
     }
 
+    void save() {}
+    void restore() {}
+    
+    void clip(const IntRect&) {}
+    void clip(const Path&) {}
+
+    void scale(const FloatSize&) {}
+    void rotate(float) {}
+    void translate(float, float) {}
+    void concatCTM(const AffineTransform&) {}
+
     CGContextRef m_cgContext;
     IntRect m_focusRingClip; // Work around CG bug in focus ring clipping.
 };
     CGContextRef m_cgContext;
     IntRect m_focusRingClip; // Work around CG bug in focus ring clipping.
 };
index e2b9b5800477ec357ce8fde893f6c88222f12f73..adfbe1f6a2c96a2d6c6ea7d1b27a2294216c9fc7 100644 (file)
@@ -455,7 +455,7 @@ void GraphicsContext::fillRect(const FloatRect& rect, const Color& c)
     m_data->p().fillRect(rect, QColor(c));
 }
 
     m_data->p().fillRect(rect, QColor(c));
 }
 
-void GraphicsContext::addClip(const IntRect& rect)
+void GraphicsContext::clip(const IntRect& rect)
 {
     if (paintingDisabled())
         return;
 {
     if (paintingDisabled())
         return;
@@ -685,7 +685,7 @@ void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect,
     if (paintingDisabled())
         return;
 
     if (paintingDisabled())
         return;
 
-    addClip(rect);
+    clip(rect);
     QPainterPath path;
 
     // Add outer ellipse
     QPainterPath path;
 
     // Add outer ellipse
@@ -717,7 +717,7 @@ void GraphicsContext::addRoundedRectClip(const IntRect& rect, const IntSize& top
         return;
 
     // Clip to our rect.
         return;
 
     // Clip to our rect.
-    addClip(rect);
+    clip(rect);
 
     // OK, the curves can fit.
     QPainterPath path;
 
     // OK, the curves can fit.
     QPainterPath path;
index e1a3830e38c88af33fb6ba5d70018f36dadc9393..1f8d65e3262d2c9e13ec69f6b50d2fd466fb4ec0 100644 (file)
@@ -615,7 +615,7 @@ void InlineFlowBox::paintBackground(GraphicsContext* p, const Color& c, const Ba
         for (InlineRunBox* curr = this; curr; curr = curr->nextLineBox())
             totalWidth += curr->width();
         p->save();
         for (InlineRunBox* curr = this; curr; curr = curr->nextLineBox())
             totalWidth += curr->width();
         p->save();
-        p->addClip(IntRect(_tx, _ty, width(), height()));
+        p->clip(IntRect(_tx, _ty, width(), height()));
         object()->paintBackgroundExtended(p, c, bgLayer, my, mh, startX, _ty,
                                           totalWidth, h, borderLeft(), borderRight(), paddingLeft(), paddingRight());
         p->restore();
         object()->paintBackgroundExtended(p, c, bgLayer, my, mh, startX, _ty,
                                           totalWidth, h, borderLeft(), borderRight(), paddingLeft(), paddingRight());
         p->restore();
@@ -681,7 +681,7 @@ void InlineFlowBox::paintBackgroundAndBorder(RenderObject::PaintInfo& i, int _tx
                 for (InlineRunBox* curr = this; curr; curr = curr->nextLineBox())
                     totalWidth += curr->width();
                 p->save();
                 for (InlineRunBox* curr = this; curr; curr = curr->nextLineBox())
                     totalWidth += curr->width();
                 p->save();
-                p->addClip(IntRect(_tx, _ty, width(), height()));
+                p->clip(IntRect(_tx, _ty, width(), height()));
                 object()->paintBorder(p, startX, _ty, totalWidth, h, object()->style());
                 p->restore();
             }
                 object()->paintBorder(p, startX, _ty, totalWidth, h, object()->style());
                 p->restore();
             }
index 9d6bc44d335e4d9cdd834f8b0d6ec0ce2e033ea9..033e265cdf9695035e15052f3fa4f3c20b3218da 100644 (file)
@@ -458,7 +458,7 @@ void InlineTextBox::paintSelection(GraphicsContext* p, int tx, int ty, RenderSty
     RootInlineBox* r = root();
     int y = r->selectionTop();
     int h = r->selectionHeight();
     RootInlineBox* r = root();
     int y = r->selectionTop();
     int h = r->selectionHeight();
-    p->addClip(IntRect(m_x + tx, y + ty, m_width, h));
+    p->clip(IntRect(m_x + tx, y + ty, m_width, h));
     p->drawHighlightForText(TextRun(textObject()->string(), m_start, m_len, sPos, ePos), IntPoint(m_x + tx, y + ty), h, 
                             TextStyle(textObject()->tabWidth(), textPos(), m_toAdd, m_reversed, m_dirOverride || style->visuallyOrdered()), c);
     p->restore();
     p->drawHighlightForText(TextRun(textObject()->string(), m_start, m_len, sPos, ePos), IntPoint(m_x + tx, y + ty), h, 
                             TextStyle(textObject()->tabWidth(), textPos(), m_toAdd, m_reversed, m_dirOverride || style->visuallyOrdered()), c);
     p->restore();
@@ -602,7 +602,7 @@ void InlineTextBox::paintTextMatchMarker(GraphicsContext* pt, int _tx, int _ty,
         Color yellow = Color(255, 255, 0);
         pt->save();
         pt->setPen(yellow); // Don't draw text at all!
         Color yellow = Color(255, 255, 0);
         pt->save();
         pt->setPen(yellow); // Don't draw text at all!
-        pt->addClip(IntRect(_tx + m_x, _ty + y, m_width, h));
+        pt->clip(IntRect(_tx + m_x, _ty + y, m_width, h));
         pt->drawHighlightForText(run, startPoint, h, renderStyle, yellow);
         pt->restore();
     }
         pt->drawHighlightForText(run, startPoint, h, renderStyle, yellow);
         pt->restore();
     }
index b4458b3ab04c21febc0fa5b838079af069d477e3..e11197d9bc9fcd05e668a724e055a21cd2830549 100644 (file)
@@ -457,7 +457,7 @@ void RenderBox::paintBackgroundExtended(GraphicsContext* p, const Color& c, cons
         int width = w - bleft - bright - (includePadding ? pleft + pright : 0);
         int height = h - borderTop() - borderBottom() - (includePadding ? paddingTop() + paddingBottom() : 0);
         p->save();
         int width = w - bleft - bright - (includePadding ? pleft + pright : 0);
         int height = h - borderTop() - borderBottom() - (includePadding ? paddingTop() + paddingBottom() : 0);
         p->save();
-        p->addClip(IntRect(x, y, width, height));
+        p->clip(IntRect(x, y, width, height));
     }
 
     CachedImage* bg = bgLayer->backgroundImage();
     }
 
     CachedImage* bg = bgLayer->backgroundImage();
index 99943da1c0ec9754234a4d9c3c91fbdef7def58d..80da83ee89d031c0a86c18467e9a77bfc4dfab3f 100644 (file)
@@ -118,7 +118,7 @@ void RenderButton::paintObject(PaintInfo& i, int _tx, int _ty)
         if (clipRect.width() == 0 || clipRect.height() == 0)
             return;
         i.p->save();
         if (clipRect.width() == 0 || clipRect.height() == 0)
             return;
         i.p->save();
-        i.p->addClip(clipRect);
+        i.p->clip(clipRect);
     }
     
     // Paint the children.
     }
     
     // Paint the children.
index 1e835e6b2ba407be6098d6d5d899a11a47be9bd8..f1eeaea14a63f3a4d76e23f5c17db5925ba9a21b 100644 (file)
@@ -150,7 +150,7 @@ void RenderFileUploadControl::paintObject(PaintInfo& i, int tx, int ty)
         if (clipRect.width() == 0 || clipRect.height() == 0)
             return;
         i.p->save();
         if (clipRect.width() == 0 || clipRect.height() == 0)
             return;
         i.p->save();
-        i.p->addClip(clipRect);
+        i.p->clip(clipRect);
     }
     
     if (i.phase == PaintPhaseForeground) {
     }
     
     if (i.phase == PaintPhaseForeground) {
index 30e7dd6f58a5a626505ca0905b9322cff687d1c4..318000092ab9468e81ab6df759dd07cac03692bf 100644 (file)
@@ -393,7 +393,7 @@ void RenderLayer::beginTransparencyLayers(GraphicsContext* p, const IntRect& pai
         IntRect clipRect = transparencyClipBox(this);
         clipRect.intersect(paintDirtyRect);
         p->save();
         IntRect clipRect = transparencyClipBox(this);
         clipRect.intersect(paintDirtyRect);
         p->save();
-        p->addClip(clipRect);
+        p->clip(clipRect);
         p->beginTransparencyLayer(renderer()->opacity());
     }
 }
         p->beginTransparencyLayer(renderer()->opacity());
     }
 }
@@ -1232,7 +1232,7 @@ static void setClip(GraphicsContext* p, const IntRect& paintDirtyRect, const Int
     if (paintDirtyRect == clipRect)
         return;
     p->save();
     if (paintDirtyRect == clipRect)
         return;
     p->save();
-    p->addClip(clipRect);
+    p->clip(clipRect);
 }
 
 static void restoreClip(GraphicsContext* p, const IntRect& paintDirtyRect, const IntRect& clipRect)
 }
 
 static void restoreClip(GraphicsContext* p, const IntRect& paintDirtyRect, const IntRect& clipRect)
index 626dd48081985820c371f21fefe71a3996094896..6a0745161049adf352835c01e4cfce4bcb678e01 100644 (file)
@@ -208,7 +208,7 @@ void RenderListBox::paintObject(PaintInfo& i, int tx, int ty)
         if (clipRect.width() == 0 || clipRect.height() == 0)
             return;
         i.p->save();
         if (clipRect.width() == 0 || clipRect.height() == 0)
             return;
         i.p->save();
-        i.p->addClip(clipRect);
+        i.p->clip(clipRect);
     }
     
     HTMLSelectElement* select = static_cast<HTMLSelectElement*>(node());
     }
     
     HTMLSelectElement* select = static_cast<HTMLSelectElement*>(node());
index 4f00f179ec56042a403c0a5ca7bbaf08b7f5be24..942660eb675813c4f9e6d6d6cc262a2e14105113 100644 (file)
@@ -164,7 +164,7 @@ void RenderMenuList::paintObject(PaintInfo& i, int x, int y)
         if (clipRect.isEmpty())
             return;
         i.p->save();
         if (clipRect.isEmpty())
             return;
         i.p->save();
-        i.p->addClip(clipRect);
+        i.p->clip(clipRect);
     }
 
     // Paint the children.
     }
 
     // Paint the children.
index b8784e1511f3983dc93614d29b4617c1f55e4209..6e184f0ba501095e12d607e118310de3e2443ab2 100644 (file)
@@ -733,7 +733,7 @@ void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& i, int _tx, int _ty,
             IntRect clipRect(_tx + borderLeft(), _ty + borderTop(),
                 w - borderLeft() - borderRight(), h - borderTop() - borderBottom());
             i.p->save();
             IntRect clipRect(_tx + borderLeft(), _ty + borderTop(),
                 w - borderLeft() - borderRight(), h - borderTop() - borderBottom());
             i.p->save();
-            i.p->addClip(clipRect);
+            i.p->clip(clipRect);
         }
         paintBackground(i.p, c, bgLayer, my, mh, _tx, _ty, w, h);
         if (hasLayer && tableElt->collapseBorders())
         }
         paintBackground(i.p, c, bgLayer, my, mh, _tx, _ty, w, h);
         if (hasLayer && tableElt->collapseBorders())