Lines Matching refs:stack

730 …     $the_same = count($this->tree->stack) > 0 && $next_node === end($this->tree->stack)->nodeName;
1579 public $stack = array(); variable in HTML5TreeConstructer
1829 $this->stack[] = $html;
1854 if (!$this->stack[0]->hasAttribute($attr['name'])) {
1855 $this->stack[0]->setAttribute($attr['name'], $attr['value']);
1992 end($this->stack)->nodeName,
2008 array_pop($this->stack);
2064 array_pop($this->stack);
2074 if ($this->head_pointer->isSameNode(end($this->stack))) {
2075 array_pop($this->stack);
2095 if ($this->head_pointer->isSameNode(end($this->stack))) {
2225 if (count($this->stack) === 1 || $this->stack[1]->nodeName !== 'body') {
2235 if (!$this->stack[1]->hasAttribute($attr['name'])) {
2236 $this->stack[1]->setAttribute($attr['name'], $attr['value']);
2317 $stack_length = count($this->stack) - 1;
2323 $node = $this->stack[$n];
2333 array_pop($this->stack);
2399 array_pop($this->stack);
2560 array_pop($this->stack);
2580 array_pop($this->stack);
2604 : end($this->stack)->appendChild($element);
2607 array_pop($this->stack);
2808 if (count($this->stack) < 2 || $this->stack[1]->nodeName !== 'body') {
2813 } elseif (end($this->stack)->nodeName !== 'body') {
2866 for ($n = count($this->stack) - 1; $n >= 0; $n--) {
2867 if ($this->stack[$n]->nodeName === $token['name']) {
2871 array_pop($this->stack);
2886 if (end($this->stack)->nodeName !== $token['name']) {
2896 array_pop($this->stack);
2917 for ($n = count($this->stack) - 1; $n >= 0; $n--) {
2919 array_pop($this->stack);
2947 for ($n = count($this->stack) - 1; $n >= 0; $n--) {
2948 if ($this->stack[$n]->nodeName === $token['name']) {
2952 array_pop($this->stack);
2982 array_pop($this->stack);
3016 $in_stack = in_array($formatting_element, $this->stack, true);
3046 $fe_s_pos = array_search($formatting_element, $this->stack, true);
3047 $length = count($this->stack);
3050 $category = $this->getElementCategory($this->stack[$s]->nodeName);
3053 $furthest_block = $this->stack[$s];
3065 array_pop($this->stack);
3076 $common_ancestor = $this->stack[$fe_s_pos - 1];
3096 … for ($n = array_search($node, $this->stack, true) - 1; $n >= 0; $n--) {
3099 $node = $this->stack[$n];
3106 unset($this->stack[$n]);
3107 $this->stack = array_merge($this->stack);
3136 $s_pos = array_search($node, $this->stack, true);
3139 $this->stack[$s_pos] = $clone;
3199 $fe_s_pos = array_search($formatting_element, $this->stack, true);
3200 $fb_s_pos = array_search($furthest_block, $this->stack, true);
3201 unset($this->stack[$fe_s_pos]);
3203 $s_part1 = array_slice($this->stack, 0, $fb_s_pos);
3204 … $s_part2 = array_slice($this->stack, $fb_s_pos + 1, count($this->stack));
3205 $this->stack = array_merge($s_part1, array($clone), $s_part2);
3232 for ($n = count($this->stack) - 1; $n >= 0; $n--) {
3233 if ($this->stack[$n]->nodeName === $token['name']) {
3237 array_pop($this->stack);
3276 for ($n = count($this->stack) - 1; $n >= 0; $n--) {
3279 $node = end($this->stack);
3294 for ($x = count($this->stack) - $n; $x >= $n; $x--) {
3295 array_pop($this->stack);
3328 end($this->stack)->appendChild($text);
3335 end($this->stack)->appendChild($comment);
3447 $current = end($this->stack)->nodeName;
3448 array_pop($this->stack);
3489 end($this->stack)->nodeName,
3504 for ($n = count($this->stack) - 1; $n >= 0; $n--) {
3505 if ($this->stack[$n]->nodeName === 'table') {
3506 $table = $this->stack[$n];
3515 $this->foster_parent = $this->stack[0];
3520 $this->foster_parent = $this->stack[$n - 1];
3550 $node = end($this->stack)->nodeName;
3551 array_pop($this->stack);
3633 end($this->stack)->appendChild($text);
3640 end($this->stack)->appendChild($comment);
3647 array_pop($this->stack);
3655 if (end($this->stack)->nodeName === 'html') {
3662 array_pop($this->stack);
3732 array_pop($this->stack);
3760 'name' => end($this->stack)->nodeName,
3820 array_pop($this->stack);
3907 $node = end($this->stack)->nodeName;
3908 array_pop($this->stack);
4042 if (end($this->stack)->nodeName === 'option') {
4060 if (end($this->stack)->nodeName === 'option') {
4071 if (end($this->stack)->nodeName === 'optgroup') {
4091 $elements_in_stack = count($this->stack);
4093 if ($this->stack[$elements_in_stack - 1]->nodeName === 'option' &&
4094 $this->stack[$elements_in_stack - 2]->nodeName === 'optgroup'
4107 if ($this->stack[$elements_in_stack - 1] === 'optgroup') {
4108 array_pop($this->stack);
4118 if (end($this->stack)->nodeName === 'option') {
4119 array_pop($this->stack);
4137 $current = end($this->stack)->nodeName;
4138 array_pop($this->stack);
4222 $this->stack[0]->appendChild($comment);
4274 if (end($this->stack)->nodeName === 'html') {
4280 array_pop($this->stack);
4297 array_pop($this->stack);
4418 $this->stack[] = $el;
4438 end($this->stack)->appendChild($node);
4447 for ($n = count($this->stack) - 1; $n >= 0; $n--) {
4448 if ($this->stack[$n]->nodeName === 'table' &&
4449 $this->stack[$n]->parentNode !== null
4451 $table = $this->stack[$n];
4478 $leng = count($this->stack);
4483 $node = $this->stack[$leng - 1 - $n];
4544 if ($entry === self::MARKER || in_array($entry, $this->stack, true)) {
4563 if ($entry === self::MARKER || in_array($entry, $this->stack, true)) {
4581 end($this->stack)->appendChild($clone);
4582 $this->stack[] = $clone;
4627 $node = end($this->stack);
4630 while (in_array(end($this->stack)->nodeName, $elements)) {
4631 array_pop($this->stack);
4657 $node = end($this->stack)->nodeName;
4662 array_pop($this->stack);
4671 $leng = count($this->stack);
4675 $node = $this->stack[$n];
4681 if ($this->stack[0]->isSameNode($node)) {