New issue
Advanced search Search tips

Issue 674496 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Sync HTML parser CDATA tokenization with spec

Project Member Reported by f...@opera.com, Dec 15 2016

Issue description

What's currently implemented differs slightly from the spec [1], making us fail a few tests in WPT.

[1] https://html.spec.whatwg.org/multipage/syntax.html#cdata-section-state
 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e02441191c08939fd05e7a5fdf619b68e91558a2

commit e02441191c08939fd05e7a5fdf619b68e91558a2
Author: fs <fs@opera.com>
Date: Mon Dec 19 03:11:10 2016

Fix HTML parser CDATA edge-case and sync state names with spec

When encountering a sequence of ']]]' at the end of a CDATA section, we
should only buffer one ']' (the first one) and "remember" the other two.

The states exists in the spec[1][2][3] nowadays, so sync the names and remove
the comment about the states not being in the spec.

Fixes two subtests of wpt/html/syntax/parsing/html5lib_tests21.html.

[1] https://html.spec.whatwg.org/multipage/syntax.html#cdata-section-state
[2] https://html.spec.whatwg.org/multipage/syntax.html#cdata-section-bracket-state
[3] https://html.spec.whatwg.org/multipage/syntax.html#cdata-section-end-state

BUG= 674496 

Review-Url: https://codereview.chromium.org/2576373002
Cr-Commit-Position: refs/heads/master@{#439396}

[delete] https://crrev.com/3ba27dc9d493c491e6172b6537d44617a22ea81a/third_party/WebKit/LayoutTests/imported/wpt/html/syntax/parsing/html5lib_tests21-expected.txt
[modify] https://crrev.com/e02441191c08939fd05e7a5fdf619b68e91558a2/third_party/WebKit/Source/core/html/parser/HTMLTokenizer.cpp
[modify] https://crrev.com/e02441191c08939fd05e7a5fdf619b68e91558a2/third_party/WebKit/Source/core/html/parser/HTMLTokenizer.h

Comment 2 by f...@opera.com, Dec 19 2016

Status: Fixed (was: Assigned)

Sign in to add a comment