Bug 497543 - Part 6 - Don't capture thumbnails for SVG/XML documents; r=dietrich
authorTim Taubert <tim.taubert@gmx.de>
Wed, 25 Jan 2012 22:47:39 +0100
changeset 86606 8985a8e405feca43d935333d879a005908051e37
parent 86605 2546d7485d08a7c344ebaed7e58791cea3d326d1
child 86607 c6a3d396b0cd241f0f49095486e6de7a8de2c52d
child 86608 34157f4059bac86d59c587d861e3e2173fd062ad
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdietrich
bugs497543
milestone12.0a1
Bug 497543 - Part 6 - Don't capture thumbnails for SVG/XML documents; r=dietrich
browser/base/content/browser-thumbnails.js
--- a/browser/base/content/browser-thumbnails.js
+++ b/browser/base/content/browser-thumbnails.js
@@ -93,16 +93,23 @@ let gBrowserThumbnails = {
       this._clearTimeout(aBrowser);
       this._capture(aBrowser);
     }.bind(this), this._captureDelayMS);
 
     this._timeouts.set(aBrowser, timeout);
   },
 
   _shouldCapture: function Thumbnails_shouldCapture(aBrowser) {
+    let doc = aBrowser.contentDocument;
+
+    // FIXME Bug 720575 - Don't capture thumbnails for SVG or XML documents as
+    //       that currently regresses Talos SVG tests.
+    if (doc instanceof SVGDocument || doc instanceof XMLDocument)
+      return false;
+
     // There's no point in taking screenshot of loading pages.
     if (aBrowser.docShell.busyFlags != Ci.nsIDocShell.BUSY_FLAGS_NONE)
       return false;
 
     // Don't take screenshots of about: pages.
     if (aBrowser.currentURI.schemeIs("about"))
       return false;