Bug 1265591 patch 1 - Remove Internal/External versions of ReconstructStyleData. r?heycam draft
authorL. David Baron <dbaron@dbaron.org>
Mon, 18 Apr 2016 20:13:40 -0700
changeset 353005 0735296e13899093132a977647b511b30d8df8bf
parent 352861 67ac40fb8f680ea5e03805552187ba1b5e8392a1
child 353006 ec4caefb1676848cb52454bd48b18d7058e8e889
push id15858
push userdbaron@mozilla.com
push dateTue, 19 Apr 2016 03:13:59 +0000
reviewersheycam
bugs1265591, 253889
milestone48.0a1
Bug 1265591 patch 1 - Remove Internal/External versions of ReconstructStyleData. r?heycam This Internal/External difference was added in bug 253889 in the year 2004, when we build layout as a library separate from things like editor. It is no longer needed now that we have libxul, and should not be used by any external callers. MozReview-Commit-ID: 7354lCl3hN8
layout/base/nsIPresShell.h
layout/base/nsPresShell.cpp
--- a/layout/base/nsIPresShell.h
+++ b/layout/base/nsIPresShell.h
@@ -362,23 +362,17 @@ public:
    * all style data for a given pres shell without necessarily reconstructing
    * all of the frames.  This will not reconstruct style synchronously; if
    * you need to do that, call FlushPendingNotifications to flush out style
    * reresolves.
    * // XXXbz why do we have this on the interface anyway?  The only consumer
    * is calling AddOverrideStyleSheet/RemoveOverrideStyleSheet, and I think
    * those should just handle reconstructing style data...
    */
-  virtual void ReconstructStyleDataExternal();
-  void ReconstructStyleDataInternal();
-#ifdef MOZILLA_INTERNAL_API
-  void ReconstructStyleData() { ReconstructStyleDataInternal(); }
-#else
-  void ReconstructStyleData() { ReconstructStyleDataExternal(); }
-#endif
+  void ReconstructStyleData();
 
   /**
    * Update the style set somehow to take into account changed prefs which
    * affect document styling.
    */
   virtual void UpdatePreferenceStyles() = 0;
 
   /**
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -4430,17 +4430,17 @@ PresShell::ReconstructFrames(void)
   nsresult rv = mFrameConstructor->ReconstructDocElementHierarchy();
   VERIFY_STYLE_TREE;
   mFrameConstructor->EndUpdate();
 
   return rv;
 }
 
 void
-nsIPresShell::ReconstructStyleDataInternal()
+nsIPresShell::ReconstructStyleData()
 {
   AutoTArray<RefPtr<mozilla::dom::Element>,1> scopeRoots;
   mChangedScopeStyleRoots.SwapElements(scopeRoots);
 
   if (mStylesHaveChanged) {
     // If we need to restyle everything, no need to restyle individual
     // scoped style roots.
     scopeRoots.Clear();
@@ -4481,22 +4481,16 @@ nsIPresShell::ReconstructStyleDataIntern
     for (Element* scopeRoot : scopeRoots) {
       restyleManager->PostRestyleEvent(scopeRoot, eRestyle_Subtree,
                                        NS_STYLE_HINT_NONE);
     }
   }
 }
 
 void
-nsIPresShell::ReconstructStyleDataExternal()
-{
-  ReconstructStyleDataInternal();
-}
-
-void
 PresShell::RecordStyleSheetChange(StyleSheetHandle aStyleSheet)
 {
   // too bad we can't check that the update is UPDATE_STYLE
   NS_ASSERTION(mUpdateCount != 0, "must be in an update");
 
   if (mStylesHaveChanged)
     return;