Bug 502567. Get rid of the silly ShouldBuildChildFrames check. r=neil
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 07 Oct 2009 21:00:38 -0400
changeset 33641 eef814b58a9c6251e82e26b61085118423657364
parent 33640 4f66b143dc543f922f6d0a0ae827fc5be256f3ef
child 33642 eec6a2c6a390cc4dc3d525ffdef9bdefc6f77206
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)
reviewersneil
bugs502567
milestone1.9.3a1pre
Bug 502567. Get rid of the silly ShouldBuildChildFrames check. r=neil
content/xbl/src/nsBindingManager.cpp
content/xbl/src/nsBindingManager.h
content/xbl/src/nsXBLBinding.cpp
content/xbl/src/nsXBLBinding.h
content/xbl/src/nsXBLPrototypeBinding.cpp
content/xbl/src/nsXBLPrototypeBinding.h
layout/base/nsCSSFrameConstructor.cpp
--- a/content/xbl/src/nsBindingManager.cpp
+++ b/content/xbl/src/nsBindingManager.cpp
@@ -1368,24 +1368,16 @@ nsBindingManager::MediumFeaturesChanged(
   if (!set.IsInitialized())
     return NS_OK;
 
   MediumFeaturesChangedData data = { aPresContext, aRulesChanged };
   set.EnumerateEntries(EnumMediumFeaturesChanged, &data);
   return NS_OK;
 }
 
-PRBool
-nsBindingManager::ShouldBuildChildFrames(nsIContent* aContent)
-{
-  nsXBLBinding *binding = GetBinding(aContent);
-
-  return !binding || binding->ShouldBuildChildFrames();
-}
-
 nsIContent*
 nsBindingManager::GetNestedInsertionPoint(nsIContent* aParent, nsIContent* aChild)
 {
   // Check to see if the content is anonymous.
   if (aChild->GetBindingParent() == aParent)
     return nsnull; // It is anonymous. Don't use the insertion point, since that's only
                    // for the explicit kids.
 
--- a/content/xbl/src/nsBindingManager.h
+++ b/content/xbl/src/nsBindingManager.h
@@ -190,18 +190,16 @@ public:
   nsresult PutLoadingDocListener(nsIURI* aURL, nsIStreamListener* aListener);
   nsIStreamListener* GetLoadingDocListener(nsIURI* aURL);
   void RemoveLoadingDocListener(nsIURI* aURL);
 
   void FlushSkinBindings();
 
   nsresult GetBindingImplementation(nsIContent* aContent, REFNSIID aIID, void** aResult);
 
-  PRBool ShouldBuildChildFrames(nsIContent* aContent);
-
   // Style rule methods
   nsresult WalkRules(nsIStyleRuleProcessor::EnumFunc aFunc,
                      RuleProcessorData* aData,
                      PRBool* aCutOffInheritance);
   /**
    * Do any processing that needs to happen as a result of a change in
    * the characteristics of the medium, and return whether this rule
    * processor's rules have changed (e.g., because of media queries).
--- a/content/xbl/src/nsXBLBinding.cpp
+++ b/content/xbl/src/nsXBLBinding.cpp
@@ -1584,20 +1584,8 @@ nsXBLBinding::GetAnonymousNodes()
     return mContent->GetChildNodesList();
   }
 
   if (mNextBinding)
     return mNextBinding->GetAnonymousNodes();
 
   return nsnull;
 }
-
-PRBool
-nsXBLBinding::ShouldBuildChildFrames() const
-{
-  if (mContent)
-    return mPrototypeBinding->ShouldBuildChildFrames();
-
-  if (mNextBinding) 
-    return mNextBinding->ShouldBuildChildFrames();
-
-  return PR_TRUE;
-}
--- a/content/xbl/src/nsXBLBinding.h
+++ b/content/xbl/src/nsXBLBinding.h
@@ -111,17 +111,16 @@ public:
   void SetIsStyleBinding(PRBool aIsStyle) { mIsStyleBinding = aIsStyle; }
 
   void MarkForDeath();
   PRBool MarkedForDeath() const { return mMarkedForDeath; }
 
   PRBool HasStyleSheets() const;
   PRBool InheritsStyle() const;
   PRBool ImplementsInterface(REFNSIID aIID) const;
-  PRBool ShouldBuildChildFrames() const;
 
   void GenerateAnonymousContent();
   void InstallAnonymousContent(nsIContent* aAnonParent, nsIContent* aElement);
   static void UninstallAnonymousContent(nsIDocument* aDocument,
                                         nsIContent* aAnonParent);
   void InstallEventHandlers();
   nsresult InstallImplementation();
 
--- a/content/xbl/src/nsXBLPrototypeBinding.cpp
+++ b/content/xbl/src/nsXBLPrototypeBinding.cpp
@@ -1052,33 +1052,16 @@ nsXBLPrototypeBinding::GetStyleSheets()
 {
   if (mResources) {
     return &mResources->mStyleSheetList;
   }
 
   return nsnull;
 }
 
-PRBool
-nsXBLPrototypeBinding::ShouldBuildChildFrames() const
-{
-  if (!mAttributeTable)
-    return PR_TRUE;
-  nsPRUint32Key nskey(kNameSpaceID_XBL);
-  nsObjectHashtable* xblAttributes =
-    static_cast<nsObjectHashtable*>(mAttributeTable->Get(&nskey));
-  if (xblAttributes) {
-    nsISupportsKey key(nsGkAtoms::text);
-    void* entry = xblAttributes->Get(&key);
-    return !entry;
-  }
-
-  return PR_TRUE;
-}
-
 static PRBool
 DeleteAttributeEntry(nsHashKey* aKey, void* aData, void* aClosure)
 {
   nsXBLAttributeEntry::Destroy(static_cast<nsXBLAttributeEntry*>(aData));
   return PR_TRUE;
 }
 
 static PRBool
--- a/content/xbl/src/nsXBLPrototypeBinding.h
+++ b/content/xbl/src/nsXBLPrototypeBinding.h
@@ -166,18 +166,16 @@ public:
                                       nsIContent* aCopyRoot,
                                       PRUint32* aIndex, PRBool* aMultiple);
 
   nsIAtom* GetBaseTag(PRInt32* aNamespaceID);
   void SetBaseTag(PRInt32 aNamespaceID, nsIAtom* aTag);
 
   PRBool ImplementsInterface(REFNSIID aIID) const;
 
-  PRBool ShouldBuildChildFrames() const;
-
   nsresult AddResourceListener(nsIContent* aBoundElement);
 
   void Initialize();
 
   const nsCOMArray<nsXBLKeyEventHandler>* GetKeyEventHandlers()
   {
     if (!mKeyHandlersRegistered) {
       CreateKeyHandlers();
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -9548,18 +9548,17 @@ nsCSSFrameConstructor::ProcessChildren(n
                  "If you need to use CreateFrameFor, you need to call "
                  "CreateAnonymousFrames manually and not follow the standard "
                  "ProcessChildren() codepath for this frame");
 #endif
     AddFrameConstructionItems(aState, anonymousItems[i], -1, aFrame,
                               itemsToConstruct);
   }
 
-  if (!aFrame->IsLeaf() &&
-      mDocument->BindingManager()->ShouldBuildChildFrames(aContent)) {
+  if (!aFrame->IsLeaf()) {
     // :before/:after content should have the same style context parent
     // as normal kids.
     // Note that we don't use this style context for looking up things like
     // special block styles because in some cases involving table pseudo-frames
     // it has nothing to do with the parent frame's desired behavior.
     nsStyleContext* styleContext;
 
     if (aCanHaveGeneratedContent) {