@@ 3925-3955 (lines=31) @@ | ||
3922 | ||
3923 | /* A start tag whose tag name is one of: "caption", "col", "colgroup", |
|
3924 | "tbody", "td", "tfoot", "th", "thead", "tr" */ |
|
3925 | } elseif ($token['type'] === HTML5::STARTTAG && in_array( |
|
3926 | $token['name'], |
|
3927 | array( |
|
3928 | 'caption', |
|
3929 | 'col', |
|
3930 | 'colgroup', |
|
3931 | 'tbody', |
|
3932 | 'td', |
|
3933 | 'tfoot', |
|
3934 | 'th', |
|
3935 | 'thead', |
|
3936 | 'tr' |
|
3937 | ) |
|
3938 | ) |
|
3939 | ) { |
|
3940 | /* If the stack of open elements does not have a td or th element |
|
3941 | in table scope, then this is a parse error; ignore the token. |
|
3942 | (innerHTML case) */ |
|
3943 | if (!$this->elementInScope(array('td', 'th'), true)) { |
|
3944 | // Ignore. |
|
3945 | ||
3946 | /* Otherwise, close the cell (see below) and reprocess the current |
|
3947 | token. */ |
|
3948 | } else { |
|
3949 | $this->closeCell(); |
|
3950 | return $this->inRow($token); |
|
3951 | } |
|
3952 | ||
3953 | /* A start tag whose tag name is one of: "caption", "col", "colgroup", |
|
3954 | "tbody", "td", "tfoot", "th", "thead", "tr" */ |
|
3955 | } elseif ($token['type'] === HTML5::STARTTAG && in_array( |
|
3956 | $token['name'], |
|
3957 | array( |
|
3958 | 'caption', |
|
@@ 4163-4196 (lines=34) @@ | ||
4160 | ||
4161 | /* An end tag whose tag name is one of: "caption", "table", "tbody", |
|
4162 | "tfoot", "thead", "tr", "td", "th" */ |
|
4163 | } elseif (in_array( |
|
4164 | $token['name'], |
|
4165 | array( |
|
4166 | 'caption', |
|
4167 | 'table', |
|
4168 | 'tbody', |
|
4169 | 'tfoot', |
|
4170 | 'thead', |
|
4171 | 'tr', |
|
4172 | 'td', |
|
4173 | 'th' |
|
4174 | ) |
|
4175 | ) && $token['type'] === HTML5::ENDTAG |
|
4176 | ) { |
|
4177 | /* Parse error. */ |
|
4178 | // w/e |
|
4179 | ||
4180 | /* If the stack of open elements has an element in table scope with |
|
4181 | the same tag name as that of the token, then act as if an end tag |
|
4182 | with the tag name "select" had been seen, and reprocess the token. |
|
4183 | Otherwise, ignore the token. */ |
|
4184 | if ($this->elementInScope($token['name'], true)) { |
|
4185 | $this->inSelect( |
|
4186 | array( |
|
4187 | 'name' => 'select', |
|
4188 | 'type' => HTML5::ENDTAG |
|
4189 | ) |
|
4190 | ); |
|
4191 | ||
4192 | $this->mainPhase($token); |
|
4193 | } |
|
4194 | ||
4195 | /* Anything else */ |
|
4196 | } else { |
|
4197 | /* Parse error. Ignore the token. */ |
|
4198 | } |
|
4199 | } |