Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 0620531f3449e3f1339a7051bcd1b19214ebf09d..94ebf032be0e4d2f1613456c76352557ecf3a6ec 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -1663,7 +1663,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); |