Backed out changeset d1b5408d946f (bug 952087) for Android reftest failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 07 Jan 2014 15:46:15 -0500
changeset 179434 cf2d1bd796ea059d2a8dc735c3f75a80a038709f
parent 179433 5c548fcd09f9bc1a7defed445a188eff77586e46
child 179481 f8b2a073d930072cfdf8bed488c4be357501804f
child 179497 f1d83f49a8aab1007339d8b9eb70cb29020ccf5b
child 179511 06a0196b648775a81c23dd029713ef0c1496fca5
push id462
push userraliiev@mozilla.com
push dateTue, 22 Apr 2014 00:22:30 +0000
treeherdermozilla-release@ac5db8c74ac0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs952087
milestone29.0a1
backs outd1b5408d946fab5eb10d586e39157cb6b7d4c1e4
first release with
nightly linux32
cf2d1bd796ea / 29.0a1 / 20140108030203 / files
nightly linux64
cf2d1bd796ea / 29.0a1 / 20140108030203 / files
nightly mac
cf2d1bd796ea / 29.0a1 / 20140108030203 / files
nightly win32
cf2d1bd796ea / 29.0a1 / 20140108030203 / files
nightly win64
cf2d1bd796ea / 29.0a1 / 20140108030203 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset d1b5408d946f (bug 952087) for Android reftest failures. CLOSED TREE
content/base/src/nsDocument.cpp
layout/base/nsDocumentViewer.cpp
layout/reftests/scrolling/deferred-anchor-ref.html
layout/reftests/scrolling/deferred-anchor.html
layout/reftests/scrolling/reftest.list
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -8816,20 +8816,16 @@ nsDocument::SetScrollToRef(nsIURI *aDocu
     mScrollToRef = Substring(start, end);
   }
 }
 
 void
 nsDocument::ScrollToRef()
 {
   if (mScrolledToRefAlready) {
-    nsCOMPtr<nsIPresShell> shell = GetShell();
-    if (shell) {
-      shell->ScrollToAnchor();
-    }
     return;
   }
 
   if (mScrollToRef.IsEmpty()) {
     return;
   }
 
   char* tmpstr = ToNewCString(mScrollToRef);
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -1020,30 +1020,25 @@ nsDocumentViewer::LoadComplete(nsresult 
       bool isInUnload;
       if (docShell && NS_SUCCEEDED(docShell->GetIsInUnload(&isInUnload)) &&
           !isInUnload) {
         mDocument->OnPageShow(restoring, nullptr);
       }
     }
   }
 
-  if (!mStopped) {
-    if (mDocument) {
-      mDocument->ScrollToRef();
-    }
-
-    // Now that the document has loaded, we can tell the presshell
-    // to unsuppress painting.
+  // Now that the document has loaded, we can tell the presshell
+  // to unsuppress painting.
+  if (mPresShell && !mStopped) {
+    nsCOMPtr<nsIPresShell> shellDeathGrip(mPresShell);
+    mPresShell->UnsuppressPainting();
+    // mPresShell could have been removed now, see bug 378682/421432
     if (mPresShell) {
-      nsCOMPtr<nsIPresShell> shellDeathGrip(mPresShell);
-      mPresShell->UnsuppressPainting();
-      // mPresShell could have been removed now, see bug 378682/421432
-      if (mPresShell) {
-        mPresShell->LoadComplete();
-      }
+      mPresShell->ScrollToAnchor();
+      mPresShell->LoadComplete();
     }
   }
 
   nsJSContext::LoadEnd();
 
 #ifdef NS_PRINTING
   // Check to see if someone tried to print during the load
   if (mPrintIsPending) {
deleted file mode 100644
--- a/layout/reftests/scrolling/deferred-anchor-ref.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE HTML>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="UTF-8" />
-</head>
-<body style="margin: 0;">
-<div>
-<div style="height: 50px; width: 50px; background-color: red;"></div>
-<div style="height: 1000px;"></div>
-<div id="d" style="height: 50px; width: 50px; background-color: green;"></div>
-<div style="height: 1000px;"></div>
-</div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/scrolling/deferred-anchor.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta charset="UTF-8" />
-<script>
-var xhr = new XMLHttpRequest();
-xhr.onload = function() {
-  document.body.appendChild(document.importNode(this.responseXML.getElementsByTagName("div")[0], true));
-};
-xhr.open("get", "deferred-anchor-ref.html");
-xhr.responseType = "document";
-xhr.send();
-</script>
-</head>
-<body style="margin: 0;">
-</body>
-</html>
--- a/layout/reftests/scrolling/reftest.list
+++ b/layout/reftests/scrolling/reftest.list
@@ -1,9 +1,8 @@
-== deferred-anchor.html#d deferred-anchor-ref.html#d
 HTTP == fixed-1.html fixed-1.html?ref
 HTTP == fixed-opacity-1.html fixed-opacity-1.html?ref
 skip-if(B2G) HTTP == fixed-opacity-2.html fixed-opacity-2.html?ref
 skip-if(B2G) random-if(gtk2Widget) fuzzy-if(Android,3,60) HTTP == fixed-text-1.html fixed-text-1.html?ref
 HTTP == fixed-text-2.html fixed-text-2.html?ref
 random-if(Android&&!browserIsRemote) == iframe-border-radius.html iframe-border-radius-ref.html # bug 760269
 random-if(Android) HTTP == image-1.html image-1.html?ref
 random-if(Android&&!browserIsRemote) HTTP == opacity-mixed-scrolling-1.html opacity-mixed-scrolling-1.html?ref # bug 760269