RenderSnapshottedPlugIn::paint should use iterator for traversal.
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Apr 2014 10:46:51 +0000 (10:46 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Apr 2014 10:46:51 +0000 (10:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=131158

Reviewed by Dean Jackson.

* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::paint):

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

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp

index 27bac93..cc7c987 100644 (file)
@@ -1,3 +1,13 @@
+2014-04-03  Antti Koivisto  <antti@apple.com>
+
+        RenderSnapshottedPlugIn::paint should use iterator for traversal.
+        https://bugs.webkit.org/show_bug.cgi?id=131158
+
+        Reviewed by Dean Jackson.
+
+        * rendering/RenderSnapshottedPlugIn.cpp:
+        (WebCore::RenderSnapshottedPlugIn::paint):
+
 2014-03-27  Sergio Villar Senin  <svillar@igalia.com>
 
         [CSS Grid Layout] <string> not allowed in grid-{area | row | column} syntax
index 74c39a1..7259fc5 100644 (file)
@@ -42,6 +42,7 @@
 #include "PaintInfo.h"
 #include "Path.h"
 #include "PlatformMouseEvent.h"
+#include "RenderIterator.h"
 #include "RenderView.h"
 #include <wtf/StackStats.h>
 
@@ -103,10 +104,10 @@ void RenderSnapshottedPlugIn::paint(PaintInfo& paintInfo, const LayoutPoint& pai
     paintInfoForChild.phase = newPhase;
     paintInfoForChild.updateSubtreePaintRootForChildren(this);
 
-    for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
-        LayoutPoint childPoint = flipForWritingModeForChild(child, paintOffset);
-        if (!child->hasSelfPaintingLayer() && !child->isFloating())
-            child->paint(paintInfoForChild, childPoint);
+    for (auto& child : childrenOfType<RenderBox>(*this)) {
+        LayoutPoint childPoint = flipForWritingModeForChild(&child, paintOffset);
+        if (!child.hasSelfPaintingLayer() && !child.isFloating())
+            child.paint(paintInfoForChild, childPoint);
     }
 
     RenderEmbeddedObject::paint(paintInfo, paintOffset);