HTML Parser: Remove conditional parsing of <noembed> content
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Apr 2019 01:55:38 +0000 (01:55 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Apr 2019 01:55:38 +0000 (01:55 +0000)
commite1c8f51a7687c82713476213508690469f241b2f
tree123a15608960cf65de075610ce8d94e31c4e2354
parent4bfdd7e1fb9efb9f3eff9ad05237976895507b0c
HTML Parser: Remove conditional parsing of <noembed> content
https://bugs.webkit.org/show_bug.cgi?id=196514

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Resync WPT after https://github.com/web-platform-tests/wpt/pull/15471 to gain
test coverage. Both Gecko and Blink are passing the new check, only WebKit was
failing.

* web-platform-tests/domparsing/DOMParser-parseFromString-html-expected.txt:
* web-platform-tests/domparsing/DOMParser-parseFromString-html.html:

Source/WebCore:

Our HTML Parser has raw text handling for <noembed> content only if plugins are runnable.
However, the HTML specification doesn't ask such behavior [1], and it doesn't match to
our HTML serializer. We should always handle it as raw text.

Blink already made this change in https://chromium-review.googlesource.com/c/1477556.

[1] https://html.spec.whatwg.org/multipage/parsing.html#parsing-html-fragments:noembed

No new tests, updated existing test.

* html/parser/HTMLParserOptions.cpp:
(WebCore::HTMLParserOptions::HTMLParserOptions):
* html/parser/HTMLParserOptions.h:
* html/parser/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::updateStateFor):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTagForInBody):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/domparsing/DOMParser-parseFromString-html-expected.txt
LayoutTests/imported/w3c/web-platform-tests/domparsing/DOMParser-parseFromString-html.html
Source/WebCore/ChangeLog
Source/WebCore/html/parser/HTMLParserOptions.cpp
Source/WebCore/html/parser/HTMLParserOptions.h
Source/WebCore/html/parser/HTMLTokenizer.cpp
Source/WebCore/html/parser/HTMLTreeBuilder.cpp