|
@@ 3434-3469 (lines=36) @@
|
| 3431 |
|
return $this->mainPhase($token); |
| 3432 |
|
|
| 3433 |
|
/* An end tag whose tag name is "table" */ |
| 3434 |
|
} elseif ($token['type'] === HTML5::ENDTAG && |
| 3435 |
|
$token['name'] === 'table' |
| 3436 |
|
) { |
| 3437 |
|
/* If the stack of open elements does not have an element in table |
| 3438 |
|
scope with the same tag name as the token, this is a parse error. |
| 3439 |
|
Ignore the token. (innerHTML case) */ |
| 3440 |
|
if (!$this->elementInScope($token['name'], true)) { |
| 3441 |
|
return false; |
| 3442 |
|
|
| 3443 |
|
/* Otherwise: */ |
| 3444 |
|
} else { |
| 3445 |
|
/* Generate implied end tags. */ |
| 3446 |
|
$this->generateImpliedEndTags(); |
| 3447 |
|
|
| 3448 |
|
/* Now, if the current node is not a table element, then this |
| 3449 |
|
is a parse error. */ |
| 3450 |
|
// w/e |
| 3451 |
|
|
| 3452 |
|
/* Pop elements from this stack until a table element has been |
| 3453 |
|
popped from the stack. */ |
| 3454 |
|
while (true) { |
| 3455 |
|
$current = end($this->stack)->nodeName; |
| 3456 |
|
array_pop($this->stack); |
| 3457 |
|
|
| 3458 |
|
if ($current === 'table') { |
| 3459 |
|
break; |
| 3460 |
|
} |
| 3461 |
|
} |
| 3462 |
|
|
| 3463 |
|
/* Reset the insertion mode appropriately. */ |
| 3464 |
|
$this->resetInsertionMode(); |
| 3465 |
|
} |
| 3466 |
|
|
| 3467 |
|
/* An end tag whose tag name is one of: "body", "caption", "col", |
| 3468 |
|
"colgroup", "html", "tbody", "td", "tfoot", "th", "thead", "tr" */ |
| 3469 |
|
} elseif ($token['type'] === HTML5::ENDTAG && in_array( |
| 3470 |
|
$token['name'], |
| 3471 |
|
array( |
| 3472 |
|
'body', |
|
@@ 4137-4164 (lines=28) @@
|
| 4134 |
|
} |
| 4135 |
|
|
| 4136 |
|
/* An end tag whose tag name is "select" */ |
| 4137 |
|
} elseif ($token['type'] === HTML5::ENDTAG && |
| 4138 |
|
$token['name'] === 'select' |
| 4139 |
|
) { |
| 4140 |
|
/* If the stack of open elements does not have an element in table |
| 4141 |
|
scope with the same tag name as the token, this is a parse error. |
| 4142 |
|
Ignore the token. (innerHTML case) */ |
| 4143 |
|
if (!$this->elementInScope($token['name'], true)) { |
| 4144 |
|
// w/e |
| 4145 |
|
|
| 4146 |
|
/* Otherwise: */ |
| 4147 |
|
} else { |
| 4148 |
|
/* Pop elements from the stack of open elements until a select |
| 4149 |
|
element has been popped from the stack. */ |
| 4150 |
|
while (true) { |
| 4151 |
|
$current = end($this->stack)->nodeName; |
| 4152 |
|
array_pop($this->stack); |
| 4153 |
|
|
| 4154 |
|
if ($current === 'select') { |
| 4155 |
|
break; |
| 4156 |
|
} |
| 4157 |
|
} |
| 4158 |
|
|
| 4159 |
|
/* Reset the insertion mode appropriately. */ |
| 4160 |
|
$this->resetInsertionMode(); |
| 4161 |
|
} |
| 4162 |
|
|
| 4163 |
|
/* A start tag whose tag name is "select" */ |
| 4164 |
|
} elseif ($token['name'] === 'select' && |
| 4165 |
|
$token['type'] === HTML5::STARTTAG |
| 4166 |
|
) { |
| 4167 |
|
/* Parse error. Act as if the token had been an end tag with the |