final ElemContext push ( ) { ElemContext frame = this . m_next ; if ( frame == null ) { /* We have never been at this depth yet, and there is no * stack frame to re-use, so we now make a new one. */ frame = new ElemContext ( this ) ; this . m_next = frame ; } /* * We shouldn't need to set this true because we should just * be pushing a dummy stack frame that will be instantly popped. * Yet we need to be ready in case this element does have * unexpected children. */ frame . m_startTagOpen = true ; return frame ; }
This method pushes an element stack frame but with no initialization of values in that frame . This method is used for optimization purposes like when pushing a stack frame for an HTML IMG tag which has no children and the stack frame will almost immediately be popped .