|
@@ 3070-3092 (lines=23) @@
|
| 3067 |
|
return $this->inCell($token); |
| 3068 |
|
|
| 3069 |
|
/* An end tag whose tag name is one of: "tbody", "tfoot", "thead" */ |
| 3070 |
|
} elseif($token['type'] === HTML5::ENDTAG && |
| 3071 |
|
in_array($token['name'], array('tbody', 'tfoot', 'thead'))) { |
| 3072 |
|
/* If the stack of open elements does not have an element in table |
| 3073 |
|
scope with the same tag name as the token, this is a parse error. |
| 3074 |
|
Ignore the token. */ |
| 3075 |
|
if(!$this->elementInScope($token['name'], true)) { |
| 3076 |
|
// Ignore. |
| 3077 |
|
|
| 3078 |
|
/* Otherwise: */ |
| 3079 |
|
} else { |
| 3080 |
|
/* Otherwise, act as if an end tag with the tag name "tr" had |
| 3081 |
|
been seen, then reprocess the current token. */ |
| 3082 |
|
$this->inRow(array( |
| 3083 |
|
'name' => 'tr', |
| 3084 |
|
'type' => HTML5::ENDTAG |
| 3085 |
|
)); |
| 3086 |
|
|
| 3087 |
|
return $this->inCell($token); |
| 3088 |
|
} |
| 3089 |
|
|
| 3090 |
|
/* An end tag whose tag name is one of: "body", "caption", "col", |
| 3091 |
|
"colgroup", "html", "td", "th" */ |
| 3092 |
|
} elseif($token['type'] === HTML5::ENDTAG && in_array($token['name'], |
| 3093 |
|
array('body', 'caption', 'col', 'colgroup', 'html', 'td', 'th', 'tr'))) { |
| 3094 |
|
/* Parse error. Ignore the token. */ |
| 3095 |
|
|
|
@@ 3187-3204 (lines=18) @@
|
| 3184 |
|
|
| 3185 |
|
/* An end tag whose tag name is one of: "table", "tbody", "tfoot", |
| 3186 |
|
"thead", "tr" */ |
| 3187 |
|
} elseif($token['type'] === HTML5::ENDTAG && in_array($token['name'], |
| 3188 |
|
array('table', 'tbody', 'tfoot', 'thead', 'tr'))) { |
| 3189 |
|
/* If the stack of open elements does not have an element in table |
| 3190 |
|
scope with the same tag name as that of the token (which can only |
| 3191 |
|
happen for "tbody", "tfoot" and "thead", or, in the innerHTML case), |
| 3192 |
|
then this is a parse error and the token must be ignored. */ |
| 3193 |
|
if(!$this->elementInScope($token['name'], true)) { |
| 3194 |
|
// Ignore. |
| 3195 |
|
|
| 3196 |
|
/* Otherwise, close the cell (see below) and reprocess the current |
| 3197 |
|
token. */ |
| 3198 |
|
} else { |
| 3199 |
|
$this->closeCell(); |
| 3200 |
|
return $this->inRow($token); |
| 3201 |
|
} |
| 3202 |
|
|
| 3203 |
|
/* Anything else */ |
| 3204 |
|
} else { |
| 3205 |
|
/* Process the token as if the insertion mode was "in body". */ |
| 3206 |
|
$this->inBody($token); |
| 3207 |
|
} |