From ffe4f656b5ea446149092ad924a45f6a37422f8c Mon Sep 17 00:00:00 2001 From: "cbiesinger%web.de" Date: Sat, 23 Jun 2007 08:44:29 +0000 Subject: [PATCH] bug 382113 set LOAD_DOCUMENT_URI for loads that load a document so that things like onload events work correctly r+sr=bz git-svn-id: svn://10.0.0.236/trunk@228625 18797224-902f-48f8-a5cc-f745e15eee43 --- .../base/src/nsObjectLoadingContent.cpp | 7 ++++ mozilla/content/base/test/Makefile.in | 2 + .../content/base/test/bug382113_object.html | 6 +++ mozilla/content/base/test/test_bug382113.html | 39 +++++++++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 mozilla/content/base/test/bug382113_object.html create mode 100644 mozilla/content/base/test/test_bug382113.html diff --git a/mozilla/content/base/src/nsObjectLoadingContent.cpp b/mozilla/content/base/src/nsObjectLoadingContent.cpp index 831786ced12..3ebe96de5e0 100644 --- a/mozilla/content/base/src/nsObjectLoadingContent.cpp +++ b/mozilla/content/base/src/nsObjectLoadingContent.cpp @@ -373,6 +373,13 @@ nsObjectLoadingContent::OnStartRequest(nsIRequest *aRequest, nsISupports *aConte notifier.Notify(); } + // We're loading a document, so we have to set LOAD_DOCUMENT_URI + // (especially important for firing onload) + nsLoadFlags flags = 0; + chan->GetLoadFlags(&flags); + flags |= nsIChannel::LOAD_DOCUMENT_URI; + chan->SetLoadFlags(flags); + nsCOMPtr docShell; rv = mFrameLoader->GetDocShell(getter_AddRefs(docShell)); NS_ENSURE_SUCCESS(rv, rv); diff --git a/mozilla/content/base/test/Makefile.in b/mozilla/content/base/test/Makefile.in index d1348ae1042..3394ff6438f 100644 --- a/mozilla/content/base/test/Makefile.in +++ b/mozilla/content/base/test/Makefile.in @@ -83,6 +83,8 @@ _TEST_FILES = test_bug5141.html \ test_bug372086.html \ test_bug373181.xhtml \ test_bug375314.html \ + test_bug382113.html \ + bug382113_object.html \ $(NULL) libs:: $(_TEST_FILES) diff --git a/mozilla/content/base/test/bug382113_object.html b/mozilla/content/base/test/bug382113_object.html new file mode 100644 index 00000000000..935f00afd18 --- /dev/null +++ b/mozilla/content/base/test/bug382113_object.html @@ -0,0 +1,6 @@ + + + +

A Document in an <object>

+ + diff --git a/mozilla/content/base/test/test_bug382113.html b/mozilla/content/base/test/test_bug382113.html new file mode 100644 index 00000000000..6de62f792e7 --- /dev/null +++ b/mozilla/content/base/test/test_bug382113.html @@ -0,0 +1,39 @@ + + + + + Test for Bug 382113 + + + + + +Mozilla Bug 382113 +

+
+ +
+
+
+
+
+
+
+ + +