Merge backout of 761790684f3b (Bug 553366) for suspicion of causing tsvg_opacity regression.
authorTimothy Nikkel <tnikkel@gmail.com>
Sat, 10 Apr 2010 21:53:23 -0500
changeset 40668 bfc8c8a40286eec0178813e6527372311dfd0281
parent 40666 3185f41673a56b84293e303bc9370b8a2b77d2c4 (current diff)
parent 40667 47ef6d724773f2eb7157f93c1da8d53a8589f26a (diff)
child 40669 5ae0999d2502839073ee61be3ad0ce802c42a1d1
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs553366
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Merge backout of 761790684f3b (Bug 553366) for suspicion of causing tsvg_opacity regression.
layout/base/nsPresShell.cpp
--- a/content/base/public/nsIDocument.h
+++ b/content/base/public/nsIDocument.h
@@ -700,24 +700,16 @@ public:
                                 nsIStyleRule* aStyleRule) = 0;
 
   /**
    * Flush notifications for this document and its parent documents
    * (since those may affect the layout of this one).
    */
   virtual void FlushPendingNotifications(mozFlushType aType) = 0;
 
-  /**
-   * Calls FlushPendingNotifications on any external resources this document
-   * has. If this document has no external resources or is an external resource
-   * itself this does nothing. This should only be called with
-   * aType >= Flush_Style.
-   */
-  virtual void FlushExternalResources(mozFlushType aType) = 0;
-
   nsBindingManager* BindingManager() const
   {
     return mNodeInfoManager->GetBindingManager();
   }
 
   /**
    * Only to be used inside Gecko, you can't really do anything with the
    * pointer outside Gecko anyway.
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -6440,36 +6440,16 @@ nsDocument::FlushPendingNotifications(mo
   }
 
   nsCOMPtr<nsIPresShell> shell = GetPrimaryShell();
   if (shell) {
     shell->FlushPendingNotifications(aType);
   }
 }
 
-static PRBool
-Flush(nsIDocument* aDocument, void* aData)
-{
-  const mozFlushType* type = static_cast<const mozFlushType*>(aData);
-  aDocument->FlushPendingNotifications(*type);
-  return PR_TRUE;
-}
-
-void
-nsDocument::FlushExternalResources(mozFlushType aType)
-{
-  NS_ASSERTION(aType >= Flush_Style,
-    "should only need to flush for style or higher in external resources");
-
-  if (GetDisplayDocument()) {
-    return;
-  }
-  EnumerateExternalResources(Flush, &aType);
-}
-
 nsIScriptEventManager*
 nsDocument::GetScriptEventManager()
 {
   if (!mScriptEventManager) {
     mScriptEventManager = new nsScriptEventManager(this);
     // automatically AddRefs
   }
 
--- a/content/base/src/nsDocument.h
+++ b/content/base/src/nsDocument.h
@@ -699,17 +699,16 @@ public:
                                 nsIStyleRule* aOldStyleRule,
                                 nsIStyleRule* aNewStyleRule);
   virtual void StyleRuleAdded(nsIStyleSheet* aStyleSheet,
                               nsIStyleRule* aStyleRule);
   virtual void StyleRuleRemoved(nsIStyleSheet* aStyleSheet,
                                 nsIStyleRule* aStyleRule);
 
   virtual void FlushPendingNotifications(mozFlushType aType);
-  virtual void FlushExternalResources(mozFlushType aType);
   virtual nsIScriptEventManager* GetScriptEventManager();
   virtual void SetXMLDeclaration(const PRUnichar *aVersion,
                                  const PRUnichar *aEncoding,
                                  const PRInt32 aStandalone);
   virtual void GetXMLDeclaration(nsAString& aVersion,
                                  nsAString& aEncoding,
                                  nsAString& Standalone);
   virtual PRBool IsScriptEnabled();
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -4566,24 +4566,16 @@ PresShell::FlushPendingNotifications(moz
       }
     }
 
     // Style reresolves not in conjunction with reflows can't cause
     // painting or geometry changes, so don't bother with view update
     // batching if we only have style reresolve
     nsIViewManager::UpdateViewBatch batch(mViewManager);
 
-    // We need to make sure external resource documents are flushed too (for
-    // example, svg filters that reference a filter in an external document
-    // need the frames in the external document to be constructed for the
-    // filter to work). We only need external resources to be flushed when the
-    // main document is flushing >= Flush_Frames, so we flush external
-    // resources here instead of nsDocument::FlushPendingNotifications.
-    mDocument->FlushExternalResources(aType);
-
     // Force flushing of any pending content notifications that might have
     // queued up while our event was pending.  That will ensure that we don't
     // construct frames for content right now that's still waiting to be
     // notified on,
     mDocument->FlushPendingNotifications(Flush_ContentAndNotify);
 
     // Process pending restyles, since any flush of the presshell wants
     // up-to-date style data.