<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[210767] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/210767">210767</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2017-01-14 09:35:56 -0800 (Sat, 14 Jan 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Align the innerText setter with the HTML spec and Gecko
https://bugs.webkit.org/show_bug.cgi?id=160971
Reviewed by Alex Christensen.
LayoutTests/imported/w3c:
Rebaseline several W3C tests now that more checks are passing.
* web-platform-tests/domparsing/createContextualFragment-expected.txt:
* web-platform-tests/innerText/setter-expected.txt:
Source/WebCore:
Align the innerText setter and createContextualFragment() with the
HTML specification and Gecko. In particular, they no longer throw
when the context element is a void element. This behavior was there
to match an old IE behavior but Edge dropped this behavior.
Test: fast/dom/br-set-outerText.html
* dom/Element.cpp:
* dom/Element.h:
* editing/markup.cpp:
(WebCore::createContextualFragment):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setInnerText):
(WebCore::HTMLElement::setOuterText):
LayoutTests:
Add test coverage for outerText, which is non-standard.
* fast/dom/br-set-outerText-expected.txt: Added.
* fast/dom/br-set-outerText.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomparsingcreateContextualFragmentexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/domparsing/createContextualFragment-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinnerTextsetterexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomElementcpp">trunk/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#trunkSourceWebCoredomElementh">trunk/Source/WebCore/dom/Element.h</a></li>
<li><a href="#trunkSourceWebCoreeditingmarkupcpp">trunk/Source/WebCore/editing/markup.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLElementcpp">trunk/Source/WebCore/html/HTMLElement.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastdombrsetouterTextexpectedtxt">trunk/LayoutTests/fast/dom/br-set-outerText-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdombrsetouterTexthtml">trunk/LayoutTests/fast/dom/br-set-outerText.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (210766 => 210767)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-01-14 16:19:33 UTC (rev 210766)
+++ trunk/LayoutTests/ChangeLog        2017-01-14 17:35:56 UTC (rev 210767)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2017-01-14 Chris Dumez <cdumez@apple.com>
+
+ Align the innerText setter with the HTML spec and Gecko
+ https://bugs.webkit.org/show_bug.cgi?id=160971
+
+ Reviewed by Alex Christensen.
+
+ Add test coverage for outerText, which is non-standard.
+
+ * fast/dom/br-set-outerText-expected.txt: Added.
+ * fast/dom/br-set-outerText.html: Added.
+
</ins><span class="cx"> 2017-01-13 Ryan Haddad <ryanhaddad@apple.com>
</span><span class="cx">
</span><span class="cx"> Marking inspector/worker/debugger-scripts.html as flaky on macOS.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdombrsetouterTextexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/br-set-outerText-expected.txt (0 => 210767)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/br-set-outerText-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/dom/br-set-outerText-expected.txt        2017-01-14 17:35:56 UTC (rev 210767)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+Tests that br.outerText does not throw
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS br.outerText = 'PASS'; did not throw exception.
+PASS br.parentNode is null
+PASS target.firstChild.data is "PASS"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdombrsetouterTexthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/br-set-outerText.html (0 => 210767)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/br-set-outerText.html         (rev 0)
+++ trunk/LayoutTests/fast/dom/br-set-outerText.html        2017-01-14 17:35:56 UTC (rev 210767)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<body>
+<div id="target"></div>
+<script src="../../resources/js-test-pre.js"></script>
+<script>
+description("Tests that br.outerText does not throw");
+
+var target = document.getElementById("target");
+var br = document.createElement("br");
+target.appendChild(br);
+shouldNotThrow("br.outerText = 'PASS';");
+shouldBeNull("br.parentNode");
+shouldBeEqualToString("target.firstChild.data", "PASS");
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (210766 => 210767)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2017-01-14 16:19:33 UTC (rev 210766)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2017-01-14 17:35:56 UTC (rev 210767)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2017-01-14 Chris Dumez <cdumez@apple.com>
+
+ Align the innerText setter with the HTML spec and Gecko
+ https://bugs.webkit.org/show_bug.cgi?id=160971
+
+ Reviewed by Alex Christensen.
+
+ Rebaseline several W3C tests now that more checks are passing.
+
+ * web-platform-tests/domparsing/createContextualFragment-expected.txt:
+ * web-platform-tests/innerText/setter-expected.txt:
+
</ins><span class="cx"> 2017-01-13 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> Import innerText/ w3c web-platform-tests
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomparsingcreateContextualFragmentexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/domparsing/createContextualFragment-expected.txt (210766 => 210767)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/domparsing/createContextualFragment-expected.txt        2017-01-14 16:19:33 UTC (rev 210766)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/domparsing/createContextualFragment-expected.txt        2017-01-14 17:35:56 UTC (rev 210767)
</span><span class="lines">@@ -4,26 +4,26 @@
</span><span class="cx"> PASS Simple test with paragraphs
</span><span class="cx"> PASS Don't auto-create <body> when applied to <html>
</span><span class="cx"> PASS <script>s should be run when appended to the document (but not before)
</span><del>-FAIL createContextualFragment should work even when the context is <area> The operation is not supported.
-FAIL createContextualFragment should work even when the context is <base> The operation is not supported.
-FAIL createContextualFragment should work even when the context is <basefont> The operation is not supported.
</del><ins>+PASS createContextualFragment should work even when the context is <area>
+PASS createContextualFragment should work even when the context is <base>
+PASS createContextualFragment should work even when the context is <basefont>
</ins><span class="cx"> PASS createContextualFragment should work even when the context is <bgsound>
</span><del>-FAIL createContextualFragment should work even when the context is <br> The operation is not supported.
-FAIL createContextualFragment should work even when the context is <col> The operation is not supported.
-FAIL createContextualFragment should work even when the context is <embed> The operation is not supported.
-FAIL createContextualFragment should work even when the context is <frame> The operation is not supported.
-FAIL createContextualFragment should work even when the context is <hr> The operation is not supported.
-FAIL createContextualFragment should work even when the context is <img> The operation is not supported.
-FAIL createContextualFragment should work even when the context is <input> The operation is not supported.
</del><ins>+PASS createContextualFragment should work even when the context is <br>
+PASS createContextualFragment should work even when the context is <col>
+PASS createContextualFragment should work even when the context is <embed>
+PASS createContextualFragment should work even when the context is <frame>
+PASS createContextualFragment should work even when the context is <hr>
+PASS createContextualFragment should work even when the context is <img>
+PASS createContextualFragment should work even when the context is <input>
</ins><span class="cx"> PASS createContextualFragment should work even when the context is <keygen>
</span><del>-FAIL createContextualFragment should work even when the context is <link> The operation is not supported.
-FAIL createContextualFragment should work even when the context is <meta> The operation is not supported.
-FAIL createContextualFragment should work even when the context is <param> The operation is not supported.
-FAIL createContextualFragment should work even when the context is <source> The operation is not supported.
</del><ins>+PASS createContextualFragment should work even when the context is <link>
+PASS createContextualFragment should work even when the context is <meta>
+PASS createContextualFragment should work even when the context is <param>
+PASS createContextualFragment should work even when the context is <source>
</ins><span class="cx"> PASS createContextualFragment should work even when the context is <track>
</span><del>-FAIL createContextualFragment should work even when the context is <wbr> The operation is not supported.
</del><ins>+PASS createContextualFragment should work even when the context is <wbr>
</ins><span class="cx"> PASS createContextualFragment should work even when the context is <menuitem>
</span><del>-FAIL createContextualFragment should work even when the context is <image> The operation is not supported.
</del><ins>+PASS createContextualFragment should work even when the context is <image>
</ins><span class="cx"> PASS <html> and <body> must work the same, 1
</span><span class="cx"> PASS <html> and <body> must work the same, 2
</span><span class="cx"> PASS Implicit <body> creation
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinnerTextsetterexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter-expected.txt (210766 => 210767)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter-expected.txt        2017-01-14 16:19:33 UTC (rev 210766)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter-expected.txt        2017-01-14 17:35:56 UTC (rev 210767)
</span><span class="lines">@@ -1,3 +1,4 @@
</span><ins>+abc
</ins><span class="cx">
</span><span class="cx"> PASS Simplest possible test
</span><span class="cx"> PASS Newlines convert to <br> in non-white-space:pre elements
</span><span class="lines">@@ -26,33 +27,33 @@
</span><span class="cx"> PASS Assigning the empty string
</span><span class="cx"> PASS Assigning null
</span><span class="cx"> PASS Assigning undefined
</span><del>-FAIL innerText on <area> element The object can not be modified.
-FAIL innerText on <base> element The object can not be modified.
-FAIL innerText on <basefont> element The object can not be modified.
</del><ins>+PASS innerText on <area> element
+PASS innerText on <base> element
+PASS innerText on <basefont> element
</ins><span class="cx"> PASS innerText on <bgsound> element
</span><del>-FAIL innerText on <br> element The object can not be modified.
-FAIL innerText on <col> element The object can not be modified.
-FAIL innerText on <embed> element The object can not be modified.
-FAIL innerText on <frame> element The object can not be modified.
-FAIL innerText on <hr> element The object can not be modified.
-FAIL innerText on <image> element The object can not be modified.
-FAIL innerText on <img> element The object can not be modified.
-FAIL innerText on <input> element The object can not be modified.
</del><ins>+PASS innerText on <br> element
+PASS innerText on <col> element
+PASS innerText on <embed> element
+PASS innerText on <frame> element
+PASS innerText on <hr> element
+PASS innerText on <image> element
+PASS innerText on <img> element
+PASS innerText on <input> element
</ins><span class="cx"> PASS innerText on <keygen> element
</span><del>-FAIL innerText on <link> element The object can not be modified.
</del><ins>+PASS innerText on <link> element
</ins><span class="cx"> PASS innerText on <menuitem> element
</span><del>-FAIL innerText on <meta> element The object can not be modified.
-FAIL innerText on <param> element The object can not be modified.
-FAIL innerText on <source> element The object can not be modified.
</del><ins>+PASS innerText on <meta> element
+PASS innerText on <param> element
+PASS innerText on <source> element
</ins><span class="cx"> PASS innerText on <track> element
</span><del>-FAIL innerText on <wbr> element The object can not be modified.
-FAIL innerText on <colgroup> element The object can not be modified.
-FAIL innerText on <frameset> element The object can not be modified.
-FAIL innerText on <head> element The object can not be modified.
-FAIL innerText on <html> element The object can not be modified.
-FAIL innerText on <table> element The object can not be modified.
-FAIL innerText on <tbody> element The object can not be modified.
-FAIL innerText on <tfoot> element The object can not be modified.
-FAIL innerText on <thead> element The object can not be modified.
-FAIL innerText on <tr> element The object can not be modified.
</del><ins>+PASS innerText on <wbr> element
+PASS innerText on <colgroup> element
+PASS innerText on <frameset> element
+PASS innerText on <head> element
+PASS innerText on <html> element
+PASS innerText on <table> element
+PASS innerText on <tbody> element
+PASS innerText on <tfoot> element
+PASS innerText on <thead> element
+PASS innerText on <tr> element
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (210766 => 210767)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-01-14 16:19:33 UTC (rev 210766)
+++ trunk/Source/WebCore/ChangeLog        2017-01-14 17:35:56 UTC (rev 210767)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2017-01-14 Chris Dumez <cdumez@apple.com>
+
+ Align the innerText setter with the HTML spec and Gecko
+ https://bugs.webkit.org/show_bug.cgi?id=160971
+
+ Reviewed by Alex Christensen.
+
+ Align the innerText setter and createContextualFragment() with the
+ HTML specification and Gecko. In particular, they no longer throw
+ when the context element is a void element. This behavior was there
+ to match an old IE behavior but Edge dropped this behavior.
+
+ Test: fast/dom/br-set-outerText.html
+
+ * dom/Element.cpp:
+ * dom/Element.h:
+ * editing/markup.cpp:
+ (WebCore::createContextualFragment):
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::setInnerText):
+ (WebCore::HTMLElement::setOuterText):
+
</ins><span class="cx"> 2017-01-13 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> Remove ENABLE(DETAILS_ELEMENT) guards
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.cpp (210766 => 210767)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.cpp        2017-01-14 16:19:33 UTC (rev 210766)
+++ trunk/Source/WebCore/dom/Element.cpp        2017-01-14 17:35:56 UTC (rev 210767)
</span><span class="lines">@@ -3578,44 +3578,6 @@
</span><span class="cx"> return URL(base, attribute.value()).string();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool Element::ieForbidsInsertHTML() const
-{
- // FIXME: Supposedly IE disallows setting innerHTML, outerHTML
- // and createContextualFragment on these tags. We have no tests to
- // verify this however, so this list could be totally wrong.
- // This list was moved from the previous endTagRequirement() implementation.
- // This is also called from editing and assumed to be the list of tags
- // for which no end tag should be serialized. It's unclear if the list for
- // IE compat and the list for serialization sanity are the same.
- if (hasTagName(areaTag)
- || hasTagName(baseTag)
- || hasTagName(basefontTag)
- || hasTagName(brTag)
- || hasTagName(colTag)
- || hasTagName(embedTag)
- || hasTagName(frameTag)
- || hasTagName(hrTag)
- || hasTagName(imageTag)
- || hasTagName(imgTag)
- || hasTagName(inputTag)
- || hasTagName(linkTag)
- || hasTagName(metaTag)
- || hasTagName(paramTag)
- || hasTagName(sourceTag)
- || hasTagName(wbrTag))
- return true;
- // FIXME: I'm not sure why dashboard mode would want to change the
- // serialization of <canvas>, that seems like a bad idea.
-#if ENABLE(DASHBOARD_SUPPORT)
- if (hasTagName(canvasTag)) {
- Settings* settings = document().settings();
- if (settings && settings->usesDashboardBackwardCompatibilityMode())
- return true;
- }
-#endif
- return false;
-}
-
</del><span class="cx"> ExceptionOr<Node*> Element::insertAdjacent(const String& where, Ref<Node>&& newChild)
</span><span class="cx"> {
</span><span class="cx"> // In Internet Explorer if the element has no parent and where is "beforeBegin" or "afterEnd",
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.h (210766 => 210767)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.h        2017-01-14 16:19:33 UTC (rev 210766)
+++ trunk/Source/WebCore/dom/Element.h        2017-01-14 17:35:56 UTC (rev 210767)
</span><span class="lines">@@ -313,8 +313,6 @@
</span><span class="cx"> WEBCORE_EXPORT ExceptionOr<void> insertAdjacentHTML(const String& where, const String& html);
</span><span class="cx"> WEBCORE_EXPORT ExceptionOr<void> insertAdjacentText(const String& where, const String& text);
</span><span class="cx">
</span><del>- bool ieForbidsInsertHTML() const;
-
</del><span class="cx"> const RenderStyle* computedStyle(PseudoId = NOPSEUDO) override;
</span><span class="cx">
</span><span class="cx"> bool needsStyleInvalidation() const;
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingmarkupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/markup.cpp (210766 => 210767)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/markup.cpp        2017-01-14 16:19:33 UTC (rev 210766)
+++ trunk/Source/WebCore/editing/markup.cpp        2017-01-14 17:35:56 UTC (rev 210767)
</span><span class="lines">@@ -949,13 +949,6 @@
</span><span class="cx">
</span><span class="cx"> ExceptionOr<Ref<DocumentFragment>> createContextualFragment(Element& element, const String& markup, ParserContentPolicy parserContentPolicy)
</span><span class="cx"> {
</span><del>- if (element.ieForbidsInsertHTML())
- return Exception { NOT_SUPPORTED_ERR };
-
- if (element.hasTagName(colTag) || element.hasTagName(colgroupTag) || element.hasTagName(framesetTag)
- || element.hasTagName(headTag) || element.hasTagName(styleTag) || element.hasTagName(titleTag))
- return Exception { NOT_SUPPORTED_ERR };
-
</del><span class="cx"> auto result = createFragmentForInnerOuterHTML(element, markup, parserContentPolicy);
</span><span class="cx"> if (result.hasException())
</span><span class="cx"> return result.releaseException();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLElement.cpp (210766 => 210767)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLElement.cpp        2017-01-14 16:19:33 UTC (rev 210766)
+++ trunk/Source/WebCore/html/HTMLElement.cpp        2017-01-14 17:35:56 UTC (rev 210767)
</span><span class="lines">@@ -470,20 +470,6 @@
</span><span class="cx"> return WTFMove(fragment);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline bool shouldProhibitSetInnerOuterText(const HTMLElement& element)
-{
- return element.hasTagName(colTag)
- || element.hasTagName(colgroupTag)
- || element.hasTagName(framesetTag)
- || element.hasTagName(headTag)
- || element.hasTagName(htmlTag)
- || element.hasTagName(tableTag)
- || element.hasTagName(tbodyTag)
- || element.hasTagName(tfootTag)
- || element.hasTagName(theadTag)
- || element.hasTagName(trTag);
-}
-
</del><span class="cx"> // Returns the conforming 'dir' value associated with the state the attribute is in (in its canonical case), if any,
</span><span class="cx"> // or the empty string if the attribute is in a state that has no associated keyword value or if the attribute is
</span><span class="cx"> // not in a defined state (e.g. the attribute is missing and there is no missing value default).
</span><span class="lines">@@ -514,11 +500,6 @@
</span><span class="cx">
</span><span class="cx"> ExceptionOr<void> HTMLElement::setInnerText(const String& text)
</span><span class="cx"> {
</span><del>- if (ieForbidsInsertHTML())
- return Exception { NO_MODIFICATION_ALLOWED_ERR };
- if (shouldProhibitSetInnerOuterText(*this))
- return Exception { NO_MODIFICATION_ALLOWED_ERR };
-
</del><span class="cx"> // FIXME: This doesn't take whitespace collapsing into account at all.
</span><span class="cx">
</span><span class="cx"> if (!text.contains('\n') && !text.contains('\r')) {
</span><span class="lines">@@ -551,11 +532,6 @@
</span><span class="cx">
</span><span class="cx"> ExceptionOr<void> HTMLElement::setOuterText(const String& text)
</span><span class="cx"> {
</span><del>- if (ieForbidsInsertHTML())
- return Exception { NO_MODIFICATION_ALLOWED_ERR };
- if (shouldProhibitSetInnerOuterText(*this))
- return Exception { NO_MODIFICATION_ALLOWED_ERR };
-
</del><span class="cx"> RefPtr<ContainerNode> parent = parentNode();
</span><span class="cx"> if (!parent)
</span><span class="cx"> return Exception { NO_MODIFICATION_ALLOWED_ERR };
</span></span></pre>
</div>
</div>
</body>
</html>