# HG changeset patch # User Boris Zbarsky # Date 1425308380 18000 # Mon Mar 02 09:59:40 2015 -0500 # Node ID e5c86f83b6b683bf2b89f69d64ab6ba198ac9bae # Parent 01e5cdc57d2f6dc5034fd458596544c3c40e518b Bug 1135764. Make sure XSLT transform results have a document timeline so things like transitions will work. r=smaug diff --git a/dom/xslt/tests/mochitest/file_bug1135764.xml b/dom/xslt/tests/mochitest/file_bug1135764.xml new file mode 100644 --- /dev/null +++ b/dom/xslt/tests/mochitest/file_bug1135764.xml @@ -0,0 +1,3 @@ + + + diff --git a/dom/xslt/tests/mochitest/file_bug1135764.xsl b/dom/xslt/tests/mochitest/file_bug1135764.xsl new file mode 100644 --- /dev/null +++ b/dom/xslt/tests/mochitest/file_bug1135764.xsl @@ -0,0 +1,19 @@ + + + + + + + + + + + Some text + + + + + diff --git a/dom/xslt/tests/mochitest/mochitest.ini b/dom/xslt/tests/mochitest/mochitest.ini --- a/dom/xslt/tests/mochitest/mochitest.ini +++ b/dom/xslt/tests/mochitest/mochitest.ini @@ -9,10 +9,12 @@ [test_bug511487.html] [test_bug551412.html] [test_bug551654.html] [test_bug566629.html] [test_bug566629.xhtml] [test_bug603159.html] [test_bug616774.html] [test_bug667315.html] +[test_bug1135764.html] +support-files = file_bug1135764.xml file_bug1135764.xsl [test_exslt_regex.html] [test_parameter.html] diff --git a/dom/xslt/tests/mochitest/test_bug1135764.html b/dom/xslt/tests/mochitest/test_bug1135764.html new file mode 100644 --- /dev/null +++ b/dom/xslt/tests/mochitest/test_bug1135764.html @@ -0,0 +1,45 @@ + + + + + + Test for Bug 1135764 + + + + + +Mozilla Bug 1135764 +

+ +

+ +
+
+ + diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -1780,16 +1780,23 @@ nsDocumentViewer::SetDocumentInternal(ns bool aForceReuseInnerWindow) { MOZ_ASSERT(aDocument); // Set new container aDocument->SetContainer(mContainer); if (mDocument != aDocument) { + if (aForceReuseInnerWindow) { + // Transfer the navigation timing information to the new document, since + // we're keeping the same inner and hence should really have the same + // timing information. + aDocument->SetNavigationTiming(mDocument->GetNavigationTiming()); + } + if (mDocument->IsStaticDocument()) { mDocument->SetScriptGlobalObject(nullptr); mDocument->Destroy(); } // Clear the list of old child docshells. Child docshells for the new // document will be constructed as frames are created. if (!aDocument->IsStaticDocument()) {