From 05b7065953090c3f41ac593a46c6d532d7a0424e Mon Sep 17 00:00:00 2001 From: Jeremy Chen Date: Fri, 23 Sep 2016 18:08:01 +0800 Subject: [PATCH] Bug 1305004 - fix ReResolveStyleContext related comments. r=heycam Fix comment only, NPOTB, DONTBUILD. MozReview-Commit-ID: APxOg5yVw7A --HG-- extra : rebase_source : a48180811fedda97eaf374a7777374f8c3616ce3 --- layout/base/RestyleTracker.h | 2 +- layout/style/nsStyleContext.h | 2 +- layout/style/nsStyleStruct.cpp | 6 +++--- layout/style/nsTransitionManager.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/layout/base/RestyleTracker.h b/layout/base/RestyleTracker.h index 95ec9064d80f..10a653cdb837 100644 --- a/layout/base/RestyleTracker.h +++ b/layout/base/RestyleTracker.h @@ -328,7 +328,7 @@ RestyleTracker::AddPendingRestyle(Element* aElement, // We can only treat this element as a restyle root if we would // actually restyle its descendants (so either call - // ReResolveStyleContext on it or just reframe it). + // ElementRestyler::Restyle on it or just reframe it). if ((aRestyleHint & ~eRestyle_LaterSiblings) || (aMinChangeHint & nsChangeHint_ReconstructFrame)) { Element* cur = diff --git a/layout/style/nsStyleContext.h b/layout/style/nsStyleContext.h index 2c9fbfbdd7ab..9226ef434176 100644 --- a/layout/style/nsStyleContext.h +++ b/layout/style/nsStyleContext.h @@ -32,7 +32,7 @@ enum class CSSPseudoElementType : uint8_t; * (with a few exceptions, like system color changes), the data in an * nsStyleContext are also immutable (with the additional exception of * GetUniqueStyleData). When style data change, - * nsFrameManager::ReResolveStyleContext creates a new style context. + * ElementRestyler::Restyle creates a new style context. * * Style contexts are reference counted. References are generally held * by: diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 44ea536fb3ad..fadcab33686b 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -3565,17 +3565,17 @@ nsStyleContent::nsStyleContent(const nsStyleContent& aSource) nsChangeHint nsStyleContent::CalcDifference(const nsStyleContent& aNewData) const { - // In ReResolveStyleContext we assume that if there's no existing + // In ElementRestyler::Restyle we assume that if there's no existing // ::before or ::after and we don't have to restyle children of the // node then we can't end up with a ::before or ::after due to the // restyle of the node itself. That's not quite true, but the only // exception to the above is when the 'content' property of the node // changes and the pseudo-element inherits the changed value. Since // the code here triggers a frame change on the node in that case, - // the optimization in ReResolveStyleContext is ok. But if we ever + // the optimization in ElementRestyler::Restyle is ok. But if we ever // change this code to not reconstruct frames on changes to the // 'content' property, then we will need to revisit the optimization - // in ReResolveStyleContext. + // in ElementRestyler::Restyle. // Unfortunately we need to reframe even if the content lengths are the same; // a simple reflow will not pick up different text or different image URLs, diff --git a/layout/style/nsTransitionManager.h b/layout/style/nsTransitionManager.h index 97748d1312c8..aa82daddc4c6 100644 --- a/layout/style/nsTransitionManager.h +++ b/layout/style/nsTransitionManager.h @@ -337,7 +337,7 @@ public: /** * StyleContextChanged * - * To be called from nsFrameManager::ReResolveStyleContext when the + * To be called from RestyleManager::TryStartingTransition when the * style of an element has changed, to initiate transitions from * that style change. For style contexts with :before and :after * pseudos, aElement is expected to be the generated before/after