3447 |
} |
} |
3448 |
!!!insert-element ($token->{tag_name}, $token->{attributes}); |
!!!insert-element ($token->{tag_name}, $token->{attributes}); |
3449 |
pop @{$self->{open_elements}}; ## ISSUE: This step is missing in the spec. |
pop @{$self->{open_elements}}; ## ISSUE: This step is missing in the spec. |
3450 |
pop @{$self->{open_elements}} |
pop @{$self->{open_elements}} # <head> |
3451 |
if $self->{insertion_mode} == AFTER_HEAD_IM; |
if $self->{insertion_mode} == AFTER_HEAD_IM; |
3452 |
!!!next-token; |
!!!next-token; |
3453 |
redo B; |
redo B; |
3462 |
} |
} |
3463 |
!!!insert-element ($token->{tag_name}, $token->{attributes}); |
!!!insert-element ($token->{tag_name}, $token->{attributes}); |
3464 |
pop @{$self->{open_elements}}; ## ISSUE: This step is missing in the spec. |
pop @{$self->{open_elements}}; ## ISSUE: This step is missing in the spec. |
3465 |
pop @{$self->{open_elements}} |
pop @{$self->{open_elements}} # <head> |
3466 |
if $self->{insertion_mode} == AFTER_HEAD_IM; |
if $self->{insertion_mode} == AFTER_HEAD_IM; |
3467 |
!!!next-token; |
!!!next-token; |
3468 |
redo B; |
redo B; |
3523 |
} |
} |
3524 |
} |
} |
3525 |
|
|
3526 |
pop @{$self->{open_elements}} |
pop @{$self->{open_elements}} # <head> |
3527 |
if $self->{insertion_mode} == AFTER_HEAD_IM; |
if $self->{insertion_mode} == AFTER_HEAD_IM; |
3528 |
!!!next-token; |
!!!next-token; |
3529 |
redo B; |
redo B; |
3548 |
my $parent = defined $self->{head_element} ? $self->{head_element} |
my $parent = defined $self->{head_element} ? $self->{head_element} |
3549 |
: $self->{open_elements}->[-1]->[0]; |
: $self->{open_elements}->[-1]->[0]; |
3550 |
$parse_rcdata->(RCDATA_CONTENT_MODEL); |
$parse_rcdata->(RCDATA_CONTENT_MODEL); |
3551 |
pop @{$self->{open_elements}} |
pop @{$self->{open_elements}} # <head> |
3552 |
if $self->{insertion_mode} == AFTER_HEAD_IM; |
if $self->{insertion_mode} == AFTER_HEAD_IM; |
3553 |
redo B; |
redo B; |
3554 |
} elsif ($token->{tag_name} eq 'style') { |
} elsif ($token->{tag_name} eq 'style') { |
3563 |
!!!cp ('t115'); |
!!!cp ('t115'); |
3564 |
} |
} |
3565 |
$parse_rcdata->(CDATA_CONTENT_MODEL); |
$parse_rcdata->(CDATA_CONTENT_MODEL); |
3566 |
pop @{$self->{open_elements}} |
pop @{$self->{open_elements}} # <head> |
3567 |
if $self->{insertion_mode} == AFTER_HEAD_IM; |
if $self->{insertion_mode} == AFTER_HEAD_IM; |
3568 |
redo B; |
redo B; |
3569 |
} elsif ($token->{tag_name} eq 'noscript') { |
} elsif ($token->{tag_name} eq 'noscript') { |
3602 |
} |
} |
3603 |
|
|
3604 |
## NOTE: There is a "as if in head" code clone. |
## NOTE: There is a "as if in head" code clone. |
3605 |
$script_start_tag->($insert_to_current); |
$script_start_tag->(); |
3606 |
pop @{$self->{open_elements}} |
pop @{$self->{open_elements}} # <head> |
3607 |
if $self->{insertion_mode} == AFTER_HEAD_IM; |
if $self->{insertion_mode} == AFTER_HEAD_IM; |
3608 |
redo B; |
redo B; |
3609 |
} elsif ($token->{tag_name} eq 'body' or |
} elsif ($token->{tag_name} eq 'body' or |
4492 |
|
|
4493 |
## reprocess |
## reprocess |
4494 |
redo B; |
redo B; |
4495 |
|
} elsif ($token->{tag_name} eq 'style') { |
4496 |
|
if (not $open_tables->[-1]->[1]) { # tainted |
4497 |
|
!!!cp ('t227.8'); |
4498 |
|
## NOTE: This is a "as if in head" code clone. |
4499 |
|
$parse_rcdata->(CDATA_CONTENT_MODEL); |
4500 |
|
redo B; |
4501 |
|
} else { |
4502 |
|
!!!cp ('t227.7'); |
4503 |
|
# |
4504 |
|
} |
4505 |
|
} elsif ($token->{tag_name} eq 'script') { |
4506 |
|
if (not $open_tables->[-1]->[1]) { # tainted |
4507 |
|
!!!cp ('t227.6'); |
4508 |
|
## NOTE: This is a "as if in head" code clone. |
4509 |
|
$script_start_tag->(); |
4510 |
|
redo B; |
4511 |
|
} else { |
4512 |
|
!!!cp ('t227.5'); |
4513 |
|
# |
4514 |
|
} |
4515 |
} elsif ($token->{tag_name} eq 'input') { |
} elsif ($token->{tag_name} eq 'input') { |
4516 |
if (not $open_tables->[-1]->[1]) { # tainted |
if (not $open_tables->[-1]->[1]) { # tainted |
4517 |
if ($token->{attributes}->{type}) { ## TODO: case |
if ($token->{attributes}->{type}) { ## TODO: case |
5342 |
if ($token->{tag_name} eq 'script') { |
if ($token->{tag_name} eq 'script') { |
5343 |
!!!cp ('t332'); |
!!!cp ('t332'); |
5344 |
## NOTE: This is an "as if in head" code clone |
## NOTE: This is an "as if in head" code clone |
5345 |
$script_start_tag->($insert); |
$script_start_tag->(); |
5346 |
redo B; |
redo B; |
5347 |
} elsif ($token->{tag_name} eq 'style') { |
} elsif ($token->{tag_name} eq 'style') { |
5348 |
!!!cp ('t333'); |
!!!cp ('t333'); |