Bug 1265591 patch 2 - Rename nsIPresShell::ReconstructStyleData to RestyleForCSSRuleChanges. r=heycam

MozReview-Commit-ID: BU3X0fBEKE3
This commit is contained in:
L. David Baron 2016-04-19 11:38:35 -07:00
parent 368f3bb46f
commit b1db407049
5 changed files with 13 additions and 13 deletions

View File

@ -2656,7 +2656,7 @@ nsHTMLDocument::TearingDownEditor(nsIEditor *aEditor)
presShell->SetAgentStyleSheets(agentSheets); presShell->SetAgentStyleSheets(agentSheets);
presShell->ReconstructStyleData(); presShell->RestyleForCSSRuleChanges();
} }
} }
@ -2820,7 +2820,7 @@ nsHTMLDocument::EditingStateChanged()
rv = presShell->SetAgentStyleSheets(agentSheets); rv = presShell->SetAgentStyleSheets(agentSheets);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
presShell->ReconstructStyleData(); presShell->RestyleForCSSRuleChanges();
// Adjust focused element with new style but blur event shouldn't be fired // Adjust focused element with new style but blur event shouldn't be fired
// until mEditingState is modified with newState. // until mEditingState is modified with newState.

View File

@ -2877,7 +2877,7 @@ nsHTMLEditor::AddOverrideStyleSheet(const nsAString& aURL)
// (This checks if already exists) // (This checks if already exists)
ps->AddOverrideStyleSheet(sheet); ps->AddOverrideStyleSheet(sheet);
ps->ReconstructStyleData(); ps->RestyleForCSSRuleChanges();
// Save as the last-loaded sheet // Save as the last-loaded sheet
mLastOverrideStyleSheetURL = aURL; mLastOverrideStyleSheetURL = aURL;
@ -2922,7 +2922,7 @@ nsHTMLEditor::RemoveOverrideStyleSheet(const nsAString &aURL)
NS_ENSURE_TRUE(ps, NS_ERROR_NOT_INITIALIZED); NS_ENSURE_TRUE(ps, NS_ERROR_NOT_INITIALIZED);
ps->RemoveOverrideStyleSheet(sheet); ps->RemoveOverrideStyleSheet(sheet);
ps->ReconstructStyleData(); ps->RestyleForCSSRuleChanges();
// Remove it from our internal list // Remove it from our internal list
return rv; return rv;

View File

@ -367,7 +367,7 @@ public:
* is calling AddOverrideStyleSheet/RemoveOverrideStyleSheet, and I think * is calling AddOverrideStyleSheet/RemoveOverrideStyleSheet, and I think
* those should just handle reconstructing style data... * those should just handle reconstructing style data...
*/ */
void ReconstructStyleData(); void RestyleForCSSRuleChanges();
/** /**
* Update the style set somehow to take into account changed prefs which * Update the style set somehow to take into account changed prefs which

View File

@ -1350,7 +1350,7 @@ nsIPresShell::SetAuthorStyleDisabled(bool aStyleDisabled)
{ {
if (aStyleDisabled != mStyleSet->GetAuthorStyleDisabled()) { if (aStyleDisabled != mStyleSet->GetAuthorStyleDisabled()) {
mStyleSet->SetAuthorStyleDisabled(aStyleDisabled); mStyleSet->SetAuthorStyleDisabled(aStyleDisabled);
ReconstructStyleData(); RestyleForCSSRuleChanges();
nsCOMPtr<nsIObserverService> observerService = nsCOMPtr<nsIObserverService> observerService =
mozilla::services::GetObserverService(); mozilla::services::GetObserverService();
@ -1459,7 +1459,7 @@ PresShell::AddUserSheet(nsISupports* aSheet)
mStyleSet->EndUpdate(); mStyleSet->EndUpdate();
ReconstructStyleData(); RestyleForCSSRuleChanges();
} }
void void
@ -1475,7 +1475,7 @@ PresShell::AddAgentSheet(nsISupports* aSheet)
} }
mStyleSet->AppendStyleSheet(SheetType::Agent, sheet); mStyleSet->AppendStyleSheet(SheetType::Agent, sheet);
ReconstructStyleData(); RestyleForCSSRuleChanges();
} }
void void
@ -1498,7 +1498,7 @@ PresShell::AddAuthorSheet(nsISupports* aSheet)
mStyleSet->AppendStyleSheet(SheetType::Doc, sheet); mStyleSet->AppendStyleSheet(SheetType::Doc, sheet);
} }
ReconstructStyleData(); RestyleForCSSRuleChanges();
} }
void void
@ -1511,7 +1511,7 @@ PresShell::RemoveSheet(SheetType aType, nsISupports* aSheet)
} }
mStyleSet->RemoveStyleSheet(aType, sheet); mStyleSet->RemoveStyleSheet(aType, sheet);
ReconstructStyleData(); RestyleForCSSRuleChanges();
} }
NS_IMETHODIMP NS_IMETHODIMP
@ -2405,7 +2405,7 @@ PresShell::EndUpdate(nsIDocument *aDocument, nsUpdateType aUpdateType)
if (aUpdateType & UPDATE_STYLE) { if (aUpdateType & UPDATE_STYLE) {
mStyleSet->EndUpdate(); mStyleSet->EndUpdate();
if (mStylesHaveChanged || !mChangedScopeStyleRoots.IsEmpty()) if (mStylesHaveChanged || !mChangedScopeStyleRoots.IsEmpty())
ReconstructStyleData(); RestyleForCSSRuleChanges();
} }
mFrameConstructor->EndUpdate(); mFrameConstructor->EndUpdate();
@ -4435,7 +4435,7 @@ PresShell::ReconstructFrames(void)
} }
void void
nsIPresShell::ReconstructStyleData() nsIPresShell::RestyleForCSSRuleChanges()
{ {
AutoTArray<RefPtr<mozilla::dom::Element>,1> scopeRoots; AutoTArray<RefPtr<mozilla::dom::Element>,1> scopeRoots;
mChangedScopeStyleRoots.SwapElements(scopeRoots); mChangedScopeStyleRoots.SwapElements(scopeRoots);

View File

@ -3219,7 +3219,7 @@ nsCSSRuleProcessor::ClearRuleCascades()
// We rely on our caller (perhaps indirectly) to do something that // We rely on our caller (perhaps indirectly) to do something that
// will rebuild style data and the user font set (either // will rebuild style data and the user font set (either
// nsIPresShell::ReconstructStyleData or // nsIPresShell::RestyleForCSSRuleChanges or
// nsPresContext::RebuildAllStyleData). // nsPresContext::RebuildAllStyleData).
RuleCascadeData *data = mRuleCascades; RuleCascadeData *data = mRuleCascades;
mRuleCascades = nullptr; mRuleCascades = nullptr;