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
--- 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;