280 |
zwnj => "\x{200C}", |
zwnj => "\x{200C}", |
281 |
}; # $entity_char |
}; # $entity_char |
282 |
|
|
283 |
|
## TODO: Ensure that this table match to <http://html5.org/tools/web-apps-tracker?from=868&to=869>. |
284 |
## <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2006-December/thread.html#8562> |
## <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2006-December/thread.html#8562> |
285 |
my $c1_entity_char = { |
my $c1_entity_char = { |
286 |
128, 8364, |
128, 8364, |
375 |
} elsif ($self->{next_input_character} > 0x10FFFF) { |
} elsif ($self->{next_input_character} > 0x10FFFF) { |
376 |
$self->{next_input_character} = 0xFFFD; # REPLACEMENT CHARACTER # MUST |
$self->{next_input_character} = 0xFFFD; # REPLACEMENT CHARACTER # MUST |
377 |
} elsif ($self->{next_input_character} == 0x0000) { # NULL |
} elsif ($self->{next_input_character} == 0x0000) { # NULL |
378 |
|
!!!parse-error (type => 'NULL'); |
379 |
|
## TODO: test |
380 |
$self->{next_input_character} = 0xFFFD; # REPLACEMENT CHARACTER # MUST |
$self->{next_input_character} = 0xFFFD; # REPLACEMENT CHARACTER # MUST |
381 |
} |
} |
382 |
}; |
}; |
447 |
## has completed loading. If one has, then it MUST be executed |
## has completed loading. If one has, then it MUST be executed |
448 |
## and removed from the list. |
## and removed from the list. |
449 |
|
|
450 |
|
## ISSUE: <http://html5.org/tools/web-apps-tracker?from=874&to=876> |
451 |
|
|
452 |
sub _get_next_token ($) { |
sub _get_next_token ($) { |
453 |
my $self = shift; |
my $self = shift; |
454 |
if (@{$self->{token}}) { |
if (@{$self->{token}}) { |
1543 |
$num = 0xFFFD; # REPLACEMENT CHARACTER |
$num = 0xFFFD; # REPLACEMENT CHARACTER |
1544 |
## ISSUE: Why this is not an error? |
## ISSUE: Why this is not an error? |
1545 |
} elsif (0x80 <= $num and $num <= 0x9F) { |
} elsif (0x80 <= $num and $num <= 0x9F) { |
1546 |
## NOTE: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2006-December/thread.html#8562> |
!!!parse-error (type => sprintf 'c1 entity:U+%04X', $num); |
|
## ISSUE: Not in the spec yet; parse error? |
|
1547 |
$num = $c1_entity_char->{$num}; |
$num = $c1_entity_char->{$num}; |
1548 |
} |
} |
1549 |
|
|
1573 |
$code = 0xFFFD; # REPLACEMENT CHARACTER |
$code = 0xFFFD; # REPLACEMENT CHARACTER |
1574 |
## ISSUE: Why this is not an error? |
## ISSUE: Why this is not an error? |
1575 |
} elsif (0x80 <= $code and $code <= 0x9F) { |
} elsif (0x80 <= $code and $code <= 0x9F) { |
1576 |
## NOTE: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2006-December/thread.html#8562> |
!!!parse-error (type => sprintf 'c1 entity:U+%04X', $code); |
|
## ISSUE: Not in the spec yet; parse error? |
|
1577 |
$code = $c1_entity_char->{$code}; |
$code = $c1_entity_char->{$code}; |
1578 |
} |
} |
1579 |
|
|
2366 |
LI: { |
LI: { |
2367 |
## Step 2 |
## Step 2 |
2368 |
if ($node->[1] eq 'li') { |
if ($node->[1] eq 'li') { |
2369 |
|
if ($i != -1) { |
2370 |
|
!!!parse-error (type => 'end tag missing:'. |
2371 |
|
$self->{open_elements}->[-1]->[1]); |
2372 |
|
## TODO: test |
2373 |
|
} |
2374 |
splice @{$self->{open_elements}}, $i; |
splice @{$self->{open_elements}}, $i; |
2375 |
last LI; |
last LI; |
2376 |
} |
} |
2414 |
LI: { |
LI: { |
2415 |
## Step 2 |
## Step 2 |
2416 |
if ($node->[1] eq 'dt' or $node->[1] eq 'dd') { |
if ($node->[1] eq 'dt' or $node->[1] eq 'dd') { |
2417 |
|
if ($i != -1) { |
2418 |
|
!!!parse-error (type => 'end tag missing:'. |
2419 |
|
$self->{open_elements}->[-1]->[1]); |
2420 |
|
## TODO: test |
2421 |
|
} |
2422 |
splice @{$self->{open_elements}}, $i; |
splice @{$self->{open_elements}}, $i; |
2423 |
last LI; |
last LI; |
2424 |
} |
} |
2704 |
|
|
2705 |
if ($token->{tag_name} eq 'textarea') { |
if ($token->{tag_name} eq 'textarea') { |
2706 |
## TODO: $self->{form_element} if defined |
## TODO: $self->{form_element} if defined |
2707 |
|
## TODO: ignore first LF <http://html5.org/tools/web-apps-tracker?from=866&to=867> |
2708 |
$self->{content_model_flag} = 'RCDATA'; |
$self->{content_model_flag} = 'RCDATA'; |
2709 |
} else { |
} else { |
2710 |
$self->{content_model_flag} = 'CDATA'; |
$self->{content_model_flag} = 'CDATA'; |
2728 |
$token->{tag_name} eq $tag_name) { |
$token->{tag_name} eq $tag_name) { |
2729 |
## Ignore the token |
## Ignore the token |
2730 |
} else { |
} else { |
2731 |
if ($token->{tag_name} eq 'textarea') { |
if ($token->{tag_name} eq 'textarea') { ## TODO: This is incorrect maybe |
2732 |
|
## TODO: <http://html5.org/tools/web-apps-tracker?from=866&to=867> |
2733 |
!!!parse-error (type => 'in CDATA:#'.$token->{type}); |
!!!parse-error (type => 'in CDATA:#'.$token->{type}); |
2734 |
} else { |
} else { |
2735 |
!!!parse-error (type => 'in RCDATA:#'.$token->{type}); |
!!!parse-error (type => 'in RCDATA:#'.$token->{type}); |
2890 |
strong => 1, tt => 1, u => 1, |
strong => 1, tt => 1, u => 1, |
2891 |
}->{$token->{tag_name}}) { |
}->{$token->{tag_name}}) { |
2892 |
$formatting_end_tag->($token->{tag_name}); |
$formatting_end_tag->($token->{tag_name}); |
2893 |
|
## TODO: <http://html5.org/tools/web-apps-tracker?from=883&to=884> |
2894 |
return; |
return; |
2895 |
} elsif ({ |
} elsif ({ |
2896 |
caption => 1, col => 1, colgroup => 1, frame => 1, |
caption => 1, col => 1, colgroup => 1, frame => 1, |