Align Range.createContextualFragment() input validation with the specification: - https://w3c.github.io/DOM-Parsing/#dom-element-insertadjacenthtml (Step 2) In particular, we were throwing a NOT_SUPPORTED_ERR when element had localname "html" but was not in the HTML namespace. We should not throw in this case. Firefox complies with the specification here.
Created attachment 285497 [details] Patch
Comment on attachment 285497 [details] Patch Attachment 285497 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/1825540 New failing tests: imported/w3c/web-platform-tests/domparsing/createContextualFragment.html
Created attachment 285500 [details] Archive of layout-test-results from ews117 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-yosemite Platform: Mac OS X 10.10.5
Created attachment 285510 [details] Patch
Comment on attachment 285510 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=285510&action=review > Source/WebCore/editing/markup.cpp:956 > + if (is<HTMLElement>(element) && downcast<HTMLElement>(element).ieForbidsInsertHTML()) { Could move the function ieForbidsInsertHTML to Element from HTMLElement to get rid of this casting. Could also give it a different name since there is probably some nomenclature in the standard now rather than referring to IE.
Comment on attachment 285510 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=285510&action=review >> Source/WebCore/editing/markup.cpp:956 >> + if (is<HTMLElement>(element) && downcast<HTMLElement>(element).ieForbidsInsertHTML()) { > > Could move the function ieForbidsInsertHTML to Element from HTMLElement to get rid of this casting. > > Could also give it a different name since there is probably some nomenclature in the standard now rather than referring to IE. Sounds good. I'll move it to Element. However, I have trouble finding the equivalent in the specification. I suspect it may not be standard behavior. The spec is: - https://w3c.github.io/DOM-Parsing/#idl-def-range-createcontextualfragment(domstring) which points to: - https://html.spec.whatwg.org/#html-fragment-parsing-algorithm
Created attachment 285515 [details] Patch
Comment on attachment 285515 [details] Patch Clearing flags on attachment: 285515 Committed r204235: <http://trac.webkit.org/changeset/204235>
All reviewed patches have been landed. Closing bug.