diff --git a/dom/html/nsHTMLDocument.cpp b/dom/html/nsHTMLDocument.cpp
index 8a777345c457..8b16eb5186a8 100644
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -2656,7 +2656,7 @@ nsHTMLDocument::TearingDownEditor(nsIEditor *aEditor)
presShell->SetAgentStyleSheets(agentSheets);
- presShell->ReconstructStyleData();
+ presShell->RestyleForCSSRuleChanges();
}
}
@@ -2820,7 +2820,7 @@ nsHTMLDocument::EditingStateChanged()
rv = presShell->SetAgentStyleSheets(agentSheets);
NS_ENSURE_SUCCESS(rv, rv);
- presShell->ReconstructStyleData();
+ presShell->RestyleForCSSRuleChanges();
// Adjust focused element with new style but blur event shouldn't be fired
// until mEditingState is modified with newState.
diff --git a/editor/libeditor/nsHTMLEditor.cpp b/editor/libeditor/nsHTMLEditor.cpp
index 4ca87ad8d4b3..7c176f5522e0 100644
--- a/editor/libeditor/nsHTMLEditor.cpp
+++ b/editor/libeditor/nsHTMLEditor.cpp
@@ -2877,7 +2877,7 @@ nsHTMLEditor::AddOverrideStyleSheet(const nsAString& aURL)
// (This checks if already exists)
ps->AddOverrideStyleSheet(sheet);
- ps->ReconstructStyleData();
+ ps->RestyleForCSSRuleChanges();
// Save as the last-loaded sheet
mLastOverrideStyleSheetURL = aURL;
@@ -2922,7 +2922,7 @@ nsHTMLEditor::RemoveOverrideStyleSheet(const nsAString &aURL)
NS_ENSURE_TRUE(ps, NS_ERROR_NOT_INITIALIZED);
ps->RemoveOverrideStyleSheet(sheet);
- ps->ReconstructStyleData();
+ ps->RestyleForCSSRuleChanges();
// Remove it from our internal list
return rv;
diff --git a/layout/base/nsIPresShell.h b/layout/base/nsIPresShell.h
index 7aba5a834e4c..7193eaa9123f 100644
--- a/layout/base/nsIPresShell.h
+++ b/layout/base/nsIPresShell.h
@@ -367,7 +367,7 @@ public:
* is calling AddOverrideStyleSheet/RemoveOverrideStyleSheet, and I think
* those should just handle reconstructing style data...
*/
- void ReconstructStyleData();
+ void RestyleForCSSRuleChanges();
/**
* Update the style set somehow to take into account changed prefs which
diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp
index 3b63f6ee5dbb..5e432376c22c 100644
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -1350,7 +1350,7 @@ nsIPresShell::SetAuthorStyleDisabled(bool aStyleDisabled)
{
if (aStyleDisabled != mStyleSet->GetAuthorStyleDisabled()) {
mStyleSet->SetAuthorStyleDisabled(aStyleDisabled);
- ReconstructStyleData();
+ RestyleForCSSRuleChanges();
nsCOMPtr observerService =
mozilla::services::GetObserverService();
@@ -1459,7 +1459,7 @@ PresShell::AddUserSheet(nsISupports* aSheet)
mStyleSet->EndUpdate();
- ReconstructStyleData();
+ RestyleForCSSRuleChanges();
}
void
@@ -1475,7 +1475,7 @@ PresShell::AddAgentSheet(nsISupports* aSheet)
}
mStyleSet->AppendStyleSheet(SheetType::Agent, sheet);
- ReconstructStyleData();
+ RestyleForCSSRuleChanges();
}
void
@@ -1498,7 +1498,7 @@ PresShell::AddAuthorSheet(nsISupports* aSheet)
mStyleSet->AppendStyleSheet(SheetType::Doc, sheet);
}
- ReconstructStyleData();
+ RestyleForCSSRuleChanges();
}
void
@@ -1511,7 +1511,7 @@ PresShell::RemoveSheet(SheetType aType, nsISupports* aSheet)
}
mStyleSet->RemoveStyleSheet(aType, sheet);
- ReconstructStyleData();
+ RestyleForCSSRuleChanges();
}
NS_IMETHODIMP
@@ -2405,7 +2405,7 @@ PresShell::EndUpdate(nsIDocument *aDocument, nsUpdateType aUpdateType)
if (aUpdateType & UPDATE_STYLE) {
mStyleSet->EndUpdate();
if (mStylesHaveChanged || !mChangedScopeStyleRoots.IsEmpty())
- ReconstructStyleData();
+ RestyleForCSSRuleChanges();
}
mFrameConstructor->EndUpdate();
@@ -4435,7 +4435,7 @@ PresShell::ReconstructFrames(void)
}
void
-nsIPresShell::ReconstructStyleData()
+nsIPresShell::RestyleForCSSRuleChanges()
{
AutoTArray,1> scopeRoots;
mChangedScopeStyleRoots.SwapElements(scopeRoots);
diff --git a/layout/style/nsCSSRuleProcessor.cpp b/layout/style/nsCSSRuleProcessor.cpp
index e1d5f3398d69..407ac4f4de4e 100644
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -3219,7 +3219,7 @@ nsCSSRuleProcessor::ClearRuleCascades()
// We rely on our caller (perhaps indirectly) to do something that
// will rebuild style data and the user font set (either
- // nsIPresShell::ReconstructStyleData or
+ // nsIPresShell::RestyleForCSSRuleChanges or
// nsPresContext::RebuildAllStyleData).
RuleCascadeData *data = mRuleCascades;
mRuleCascades = nullptr;