Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 933e39f58659d1bf940fcef5f4baaaca39a57c26..d83ee91c10b64b93b3be18a5322a9204e72ecc67 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -1671,7 +1671,7 @@ void Document::recalcStyle(StyleChange change) |
renderer()->setStyle(documentStyle.release()); |
} |
- for (Node* n = firstChild(); n; n = n->nextSibling()) { |
+ for (Node* n = lastChild(); n; n = n->previousSibling()) { |
if (!n->isElementNode()) |
continue; |
Element* element = toElement(n); |