Changeset 243782 in webkit
- Timestamp:
- Apr 2, 2019, 6:55:38 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/domparsing/DOMParser-parseFromString-html-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/domparsing/DOMParser-parseFromString-html.html (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/html/parser/HTMLParserOptions.cpp (modified) (2 diffs)
-
Source/WebCore/html/parser/HTMLParserOptions.h (modified) (1 diff)
-
Source/WebCore/html/parser/HTMLTokenizer.cpp (modified) (1 diff)
-
Source/WebCore/html/parser/HTMLTreeBuilder.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r243765 r243782 1 2019-04-02 Chris Dumez <cdumez@apple.com> 2 3 HTML Parser: Remove conditional parsing of <noembed> content 4 https://bugs.webkit.org/show_bug.cgi?id=196514 5 6 Reviewed by Geoffrey Garen. 7 8 Resync WPT after https://github.com/web-platform-tests/wpt/pull/15471 to gain 9 test coverage. Both Gecko and Blink are passing the new check, only WebKit was 10 failing. 11 12 * web-platform-tests/domparsing/DOMParser-parseFromString-html-expected.txt: 13 * web-platform-tests/domparsing/DOMParser-parseFromString-html.html: 14 1 15 2019-04-02 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/LayoutTests/imported/w3c/web-platform-tests/domparsing/DOMParser-parseFromString-html-expected.txt
r216046 r243782 9 9 PASS Location value 10 10 PASS DOMParser parses HTML tag soup with no problems 11 PASS DOMParser should handle the content of <noembed> as raw text 11 12 PASS DOMParser throws on an invalid enum value 12 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/domparsing/DOMParser-parseFromString-html.html
r216354 r243782 68 68 69 69 test(function() { 70 const doc = new DOMParser().parseFromString('<noembed><a></noembed>', 'text/html'); 71 assert_equals(doc.querySelector('noembed').textContent, '<a>'); 72 }, 'DOMParser should handle the content of <noembed> as raw text'); 73 74 test(function() { 70 75 assert_throws(new TypeError(), function() { 71 76 new DOMParser().parseFromString("", "text/foo-this-is-invalid"); -
trunk/Source/WebCore/ChangeLog
r243765 r243782 1 2019-04-02 Chris Dumez <cdumez@apple.com> 2 3 HTML Parser: Remove conditional parsing of <noembed> content 4 https://bugs.webkit.org/show_bug.cgi?id=196514 5 6 Reviewed by Geoffrey Garen. 7 8 Our HTML Parser has raw text handling for <noembed> content only if plugins are runnable. 9 However, the HTML specification doesn't ask such behavior [1], and it doesn't match to 10 our HTML serializer. We should always handle it as raw text. 11 12 Blink already made this change in https://chromium-review.googlesource.com/c/1477556. 13 14 [1] https://html.spec.whatwg.org/multipage/parsing.html#parsing-html-fragments:noembed 15 16 No new tests, updated existing test. 17 18 * html/parser/HTMLParserOptions.cpp: 19 (WebCore::HTMLParserOptions::HTMLParserOptions): 20 * html/parser/HTMLParserOptions.h: 21 * html/parser/HTMLTokenizer.cpp: 22 (WebCore::HTMLTokenizer::updateStateFor): 23 * html/parser/HTMLTreeBuilder.cpp: 24 (WebCore::HTMLTreeBuilder::processStartTagForInBody): 25 1 26 2019-04-02 Chris Dumez <cdumez@apple.com> 2 27 -
trunk/Source/WebCore/html/parser/HTMLParserOptions.cpp
r223644 r243782 38 38 HTMLParserOptions::HTMLParserOptions() 39 39 : scriptEnabled(false) 40 , pluginsEnabled(false)41 40 , usePreHTML5ParserQuirks(false) 42 41 , maximumDOMTreeDepth(Settings::defaultMaximumHTMLParserDOMTreeDepth) … … 48 47 RefPtr<Frame> frame = document.frame(); 49 48 scriptEnabled = frame && frame->script().canExecuteScripts(NotAboutToExecuteScript); 50 pluginsEnabled = frame && frame->loader().subframeLoader().allowPlugins();51 49 52 50 usePreHTML5ParserQuirks = document.settings().usePreHTML5ParserQuirks(); -
trunk/Source/WebCore/html/parser/HTMLParserOptions.h
r208179 r243782 36 36 37 37 bool scriptEnabled; 38 bool pluginsEnabled;39 38 bool usePreHTML5ParserQuirks; 40 39 unsigned maximumDOMTreeDepth; -
trunk/Source/WebCore/html/parser/HTMLTokenizer.cpp
r240641 r243782 1417 1417 || tagName == iframeTag 1418 1418 || tagName == xmpTag 1419 || (tagName == noembedTag && m_options.pluginsEnabled)1419 || (tagName == noembedTag) 1420 1420 || tagName == noframesTag 1421 1421 || (tagName == noscriptTag && m_options.scriptEnabled)) -
trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp
r237266 r243782 788 788 return; 789 789 } 790 if (token.name() == noembedTag && m_options.pluginsEnabled) {790 if (token.name() == noembedTag) { 791 791 processGenericRawTextStartTag(WTFMove(token)); 792 792 return;
Note:
See TracChangeset
for help on using the changeset viewer.