Index: Source/core/rendering/RenderRegion.cpp |
diff --git a/Source/core/rendering/RenderRegion.cpp b/Source/core/rendering/RenderRegion.cpp |
index 651b8886e46fc280ce742a434250b37c6968da1b..680a98cd806b1dba8772a9e65a70649226a48631 100644 |
--- a/Source/core/rendering/RenderRegion.cpp |
+++ b/Source/core/rendering/RenderRegion.cpp |
@@ -550,7 +550,7 @@ PassRefPtr<RenderStyle> RenderRegion::computeStyleInRegion(const RenderObject* o |
void RenderRegion::computeChildrenStyleInRegion(const RenderObject* object) |
{ |
- for (RenderObject* child = object->firstChild(); child; child = child->nextSibling()) { |
+ for (RenderObject* child = object->lastChild(); child; child = child->previousSibling()) { |
RenderObjectRegionStyleMap::iterator it = m_renderObjectRegionStyle.find(child); |
@@ -602,7 +602,7 @@ void RenderRegion::clearObjectStyleInRegion(const RenderObject* object) |
m_renderObjectRegionStyle.remove(object); |
// Clear the style for the children of this object. |
- for (RenderObject* child = object->firstChild(); child; child = child->nextSibling()) |
+ for (RenderObject* child = object->lastChild(); child; child = child->previousSibling()) |
clearObjectStyleInRegion(child); |
} |