2007-10-14 Eric Seidel <eric@webkit.org>
authoreseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 14 Oct 2007 09:03:22 +0000 (09:03 +0000)
committereseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 14 Oct 2007 09:03:22 +0000 (09:03 +0000)
        Reviewed by aroben.

        Remove senseless malloc from paintOutline
        No tests needed, no functional change.

        * rendering/RenderFlow.cpp:
        (WebCore::RenderFlow::paintOutline): remove unneeded malloc

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

WebCore/ChangeLog
WebCore/rendering/RenderFlow.cpp

index 49ea6dd..a57ffeb 100644 (file)
@@ -1,3 +1,13 @@
+2007-10-14  Eric Seidel  <eric@webkit.org>
+
+        Reviewed by aroben.
+
+        Remove senseless malloc from paintOutline
+        No tests needed, no functional change.
+
+        * rendering/RenderFlow.cpp:
+        (WebCore::RenderFlow::paintOutline): remove unneeded malloc
+
 2007-10-13  Eric Seidel  <eric@webkit.org>
 
         Reviewed by Mark Rowe.
index 7e60112..ebb107f 100644 (file)
@@ -759,17 +759,16 @@ void RenderFlow::paintOutline(GraphicsContext* graphicsContext, int tx, int ty)
     if (style()->outlineStyleIsAuto() || style()->outlineStyle() <= BHIDDEN)
         return;
 
-    Vector<IntRect*> rects;
+    Vector<IntRect> rects;
 
-    rects.append(new IntRect);
+    rects.append(IntRect());
     for (InlineRunBox* curr = firstLineBox(); curr; curr = curr->nextLineBox())
-        rects.append(new IntRect(curr->xPos(), curr->yPos(), curr->width(), curr->height()));
+        rects.append(IntRect(curr->xPos(), curr->yPos(), curr->width(), curr->height()));
 
-    rects.append(new IntRect);
+    rects.append(IntRect());
 
     for (unsigned i = 1; i < rects.size() - 1; i++)
-        paintOutlineForLine(graphicsContext, tx, ty, *rects.at(i - 1), *rects.at(i), *rects.at(i + 1));
-    deleteAllValues(rects);
+        paintOutlineForLine(graphicsContext, tx, ty, rects.at(i - 1), rects.at(i), rects.at(i + 1));
 }
 
 void RenderFlow::paintOutlineForLine(GraphicsContext* graphicsContext, int tx, int ty,