@@ 1537-1552 (lines=16) @@ | ||
1534 | } |
|
1535 | ||
1536 | /* An end tag with the tag name "head" */ |
|
1537 | } elseif($token['type'] === HTML5::ENDTAG && $token['name'] === 'head') { |
|
1538 | /* If the current node is a head element, pop the current node off |
|
1539 | the stack of open elements. */ |
|
1540 | if($this->head_pointer->isSameNode(end($this->stack))) { |
|
1541 | array_pop($this->stack); |
|
1542 | ||
1543 | /* Otherwise, this is a parse error. */ |
|
1544 | } else { |
|
1545 | // k |
|
1546 | } |
|
1547 | ||
1548 | /* Change the insertion mode to "after head". */ |
|
1549 | $this->mode = self::AFTER_HEAD; |
|
1550 | ||
1551 | /* A start tag with the tag name "head" or an end tag except "html". */ |
|
1552 | } elseif(($token['type'] === HTML5::STARTTAG && $token['name'] === 'head') || |
|
1553 | ($token['type'] === HTML5::ENDTAG && $token['name'] !== 'html')) { |
|
1554 | // Parse error. Ignore the token. |
|
1555 | ||
@@ 2900-2916 (lines=17) @@ | ||
2897 | array_pop($this->stack); |
|
2898 | ||
2899 | /* An end tag whose tag name is "colgroup" */ |
|
2900 | } elseif($token['type'] === HTML5::ENDTAG && |
|
2901 | $token['name'] === 'colgroup') { |
|
2902 | /* If the current node is the root html element, then this is a |
|
2903 | parse error, ignore the token. (innerHTML case) */ |
|
2904 | if(end($this->stack)->nodeName === 'html') { |
|
2905 | // Ignore |
|
2906 | ||
2907 | /* Otherwise, pop the current node (which will be a colgroup |
|
2908 | element) from the stack of open elements. Switch the insertion |
|
2909 | mode to "in table". */ |
|
2910 | } else { |
|
2911 | array_pop($this->stack); |
|
2912 | $this->mode = self::IN_TABLE; |
|
2913 | } |
|
2914 | ||
2915 | /* An end tag whose tag name is "col" */ |
|
2916 | } elseif($token['type'] === HTML5::ENDTAG && $token['name'] === 'col') { |
|
2917 | /* Parse error. Ignore the token. */ |
|
2918 | ||
2919 | /* Anything else */ |
|
@@ 3421-3441 (lines=21) @@ | ||
3418 | $this->insertElement($token); |
|
3419 | ||
3420 | /* An end tag with the tag name "frameset" */ |
|
3421 | } elseif($token['name'] === 'frameset' && |
|
3422 | $token['type'] === HTML5::ENDTAG) { |
|
3423 | /* If the current node is the root html element, then this is a |
|
3424 | parse error; ignore the token. (innerHTML case) */ |
|
3425 | if(end($this->stack)->nodeName === 'html') { |
|
3426 | // Ignore |
|
3427 | ||
3428 | } else { |
|
3429 | /* Otherwise, pop the current node from the stack of open |
|
3430 | elements. */ |
|
3431 | array_pop($this->stack); |
|
3432 | ||
3433 | /* If the parser was not originally created in order to handle |
|
3434 | the setting of an element's innerHTML attribute (innerHTML case), |
|
3435 | and the current node is no longer a frameset element, then change |
|
3436 | the insertion mode to "after frameset". */ |
|
3437 | $this->mode = self::AFTR_FRAME; |
|
3438 | } |
|
3439 | ||
3440 | /* A start tag with the tag name "frame" */ |
|
3441 | } elseif($token['name'] === 'frame' && |
|
3442 | $token['type'] === HTML5::STARTTAG) { |
|
3443 | /* Insert an HTML element for the token. */ |
|
3444 | $this->insertElement($token); |