Bug 596765, followup 2: Bail out of nsObjectLoadingContent::LoadObject for SVG-as-an-image documents (and re-enable reftest). r+a=roc
authorDaniel Holbert <dholbert@cs.stanford.edu>
Fri, 18 Feb 2011 23:55:39 -0800
changeset 62856 657c2a92ee2be94a442f9efb5894eb44f68616af
parent 62855 5dd4f10fb1fdac79319254e66c36cf652861b068
child 62857 ede573242c362bc01b63bbd2a929a672f1173427
push id18910
push userdholbert@mozilla.com
push dateSat, 19 Feb 2011 08:02:30 +0000
treeherdermozilla-central@657c2a92ee2b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs596765
milestone2.0b12pre
first release with
nightly linux32
657c2a92ee2b / 4.0b12pre / 20110219030355 / files
nightly linux64
657c2a92ee2b / 4.0b12pre / 20110219030355 / files
nightly mac
657c2a92ee2b / 4.0b12pre / 20110219030355 / files
nightly win32
657c2a92ee2b / 4.0b12pre / 20110219030355 / files
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 596765, followup 2: Bail out of nsObjectLoadingContent::LoadObject for SVG-as-an-image documents (and re-enable reftest). r+a=roc
content/base/src/nsObjectLoadingContent.cpp
layout/reftests/svg/as-image/reftest.list
--- a/content/base/src/nsObjectLoadingContent.cpp
+++ b/content/base/src/nsObjectLoadingContent.cpp
@@ -1189,17 +1189,17 @@ nsObjectLoadingContent::LoadObject(nsIUR
   mURI = aURI;
   mContentType = aTypeHint;
 
   nsCOMPtr<nsIContent> thisContent = 
     do_QueryInterface(static_cast<nsIImageLoadingContent*>(this));
   NS_ASSERTION(thisContent, "must be a content");
 
   nsIDocument* doc = thisContent->GetOwnerDoc();
-  if (!doc) {
+  if (!doc || doc->IsBeingUsedAsImage()) {
     return NS_OK;
   }
 
   // From here on, we will always change the content. This means that a
   // possibly-loading channel should be aborted.
   if (mChannel) {
     LOG(("OBJLC [%p]: Cancelling existing load\n", this));
 
--- a/layout/reftests/svg/as-image/reftest.list
+++ b/layout/reftests/svg/as-image/reftest.list
@@ -56,17 +56,17 @@ fails-if(d2d) == img-simple-7.html  img-
 asserts(72) == img-and-image-1.html img-and-image-1-ref.svg
 
 # More complex <img> tests
 random-if(gtk2Widget) == img-anim-1.html  lime100x100-ref.html # bug 612214
 == img-content-outside-viewBox-1.html img-content-outside-viewBox-1-ref.html
 == img-dyn-1.html img-dyn-1-ref.html
 == img-foreignObject-1.html lime100x100-ref.html
 == img-foreignObject-embed-1.html lime100x100-ref.html
-random == img-foreignObject-embed-2.html lime100x100-ref.html # investigating on bug 596765
+== img-foreignObject-embed-2.html lime100x100-ref.html
 
 fails-if(d2d) == img-widthAndHeight-meet-1.html  img-widthAndHeight-meet-1-ref.html # bug 633072
 == img-widthAndHeight-meet-2.html  img-widthAndHeight-meet-2-ref.html
 fails-if(d2d) == img-widthAndHeight-slice-1.html img-widthAndHeight-slice-1-ref.html # bug 633072
 fails-if(d2d) == img-widthAndHeight-slice-2.html img-widthAndHeight-slice-2-ref.html # bug 633072
 
 fails-if(d2d) == img-height-meet-1.html   img-height-meet-1-ref.html # bug 633072
 == img-height-meet-2.html   img-height-meet-2-ref.html