Bug 1249443 - add AllChildrenIterator::Phase, r=bz
authorAlexander Surkov <surkov.alexander@gmail.com>
Sat, 05 Mar 2016 16:11:34 -0500
changeset 286956 2d1476dbf842eef4a7fb058cdcefe32f4218d57c
parent 286955 af3b08c0c3373aa15097644ba3817c565a51e50f
child 286957 60fb79d430d82659bff21892764a22305abea2ff
push id18025
push userryanvm@gmail.com
push dateSun, 06 Mar 2016 20:04:05 +0000
treeherderfx-team@b6acf4d4fc20 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1249443
milestone47.0a1
Bug 1249443 - add AllChildrenIterator::Phase, r=bz
dom/base/ChildIterator.h
--- a/dom/base/ChildIterator.h
+++ b/dom/base/ChildIterator.h
@@ -200,27 +200,28 @@ public:
 #endif
 
   bool Seek(nsIContent* aChildToFind);
 
   nsIContent* GetNextChild();
   nsIContent* GetPreviousChild();
   nsIContent* Parent() const { return mOriginalContent; }
 
-private:
   enum IteratorPhase
   {
     eAtBegin,
     eAtBeforeKid,
     eAtExplicitKids,
     eAtAnonKids,
     eAtAfterKid,
     eAtEnd
   };
+  IteratorPhase Phase() const { return mPhase; }
 
+private:
   nsIContent* mOriginalContent;
 
   // mAnonKids is an array of native anonymous children, mAnonKidsIdx is index
   // in the array. If mAnonKidsIdx < mAnonKids.Length() and mPhase is
   // eAtAnonKids then the iterator points at a child at mAnonKidsIdx index. If
   // mAnonKidsIdx == mAnonKids.Length() then the iterator is somewhere after
   // the last native anon child. If mAnonKidsIdx == UINT32_MAX then the iterator
   // is somewhere before the first native anon child.