Bug 1305004 - fix ReResolveStyleContext related comments. draft
authorJeremy Chen <jeremychen@mozilla.com>
Fri, 23 Sep 2016 18:08:01 +0800
changeset 416967 ad4042c89c43fe0a1885c8b42474a2bdb9db5e7a
parent 416966 9eae36f83dbae7434e74cd9c689a965031778370
child 531993 0a3306cec6d859d098c4d060950006c951a94022
push id30294
push userjichen@mozilla.com
push dateFri, 23 Sep 2016 10:08:38 +0000
bugs1305004
milestone52.0a1
Bug 1305004 - fix ReResolveStyleContext related comments. Fix comment only, NPOTB, DONTBUILD. MozReview-Commit-ID: APxOg5yVw7A
layout/base/RestyleTracker.h
layout/style/nsStyleContext.h
layout/style/nsStyleStruct.cpp
layout/style/nsTransitionManager.h
--- a/layout/base/RestyleTracker.h
+++ b/layout/base/RestyleTracker.h
@@ -323,17 +323,17 @@ RestyleTracker::AddPendingRestyle(Elemen
                                   mozilla::Maybe<Element*> aRestyleRoot)
 {
   bool hadRestyleLaterSiblings =
     AddPendingRestyleToTable(aElement, aRestyleHint, aMinChangeHint,
                              aRestyleHintData);
 
   // 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 =
       aRestyleRoot ? *aRestyleRoot : FindClosestRestyleRoot(aElement);
     if (!cur) {
       mRestyleRoots.AppendElement(aElement);
       cur = aElement;
     }
--- a/layout/style/nsStyleContext.h
+++ b/layout/style/nsStyleContext.h
@@ -27,17 +27,17 @@ enum class CSSPseudoElementType : uint8_
  * nsStyleStruct.h) that are cached either on the style context or in
  * the rule tree (see nsRuleNode.h for a description of this caching and
  * how the cached structs are shared).
  *
  * Since the data in |nsIStyleRule|s and |nsRuleNode|s are immutable
  * (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:
  *  1. the |nsIFrame|s that are using the style context and
  *  2. any *child* style contexts (this might be the reverse of
  *     expectation, but it makes sense in this case)
  */
 
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -3550,27 +3550,27 @@ nsStyleContent::nsStyleContent(const nsS
   , mResets(aSource.mResets)
 {
   MOZ_COUNT_CTOR(nsStyleContent);
 }
 
 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,
   // since we set all that up in the CSSFrameConstructor
   if (mContents != aNewData.mContents ||
       mIncrements != aNewData.mIncrements ||
       mResets != aNewData.mResets) {
     return nsChangeHint_ReconstructFrame;
--- a/layout/style/nsTransitionManager.h
+++ b/layout/style/nsTransitionManager.h
@@ -332,17 +332,17 @@ public:
   NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(nsTransitionManager)
 
   typedef mozilla::AnimationCollection<mozilla::dom::CSSTransition>
     CSSTransitionCollection;
 
   /**
    * 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
    * element.
    *
    * It may modify the new style context (by replacing
    * *aNewStyleContext) to cover up some of the changes for the duration
    * of the restyling of descendants.  If it does, this function will