<!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>[199054] 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/199054">199054</a></dd>
<dt>Author</dt> <dd>antti@apple.com</dd>
<dt>Date</dt> <dd>2016-04-05 03:29:31 -0700 (Tue, 05 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use RenderTreeUpdater for text node mutations
https://bugs.webkit.org/show_bug.cgi?id=156107

Reviewed by Andreas Kling.

Source/WebCore:

Use the new mechanism for updating render tree after text node content changes.

* dom/CharacterData.cpp:
(WebCore::CharacterData::parserAppendData):
(WebCore::CharacterData::setDataAndUpdate):
* dom/Text.cpp:
(WebCore::Text::createWithLengthLimit):
(WebCore::Text::updateRendererAfterContentChange):

    Update using RenderTreeUpdater.

(WebCore::Text::formatForDebugger):
* dom/Text.h:
(WebCore::Text::Text):
* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::styleForElement):
(WebCore::Style::resetStyleForNonRenderedDescendants):
(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::elementImplicitVisibility):
(WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded): Deleted.
(WebCore::Style::textRendererIsNeeded): Deleted.
(WebCore::Style::createTextRendererIfNeeded): Deleted.
(WebCore::Style::attachTextRenderer): Deleted.
(WebCore::Style::detachTextRenderer): Deleted.
(WebCore::Style::updateTextRendererAfterContentChange): Deleted.
(WebCore::Style::resolveTextNode): Deleted.

    Kill the old code paths.

* style/StyleTreeResolver.h:

LayoutTests:

Mostly just revert non-rendered whitespace related changes from the earlier patches.

* editing/style/remove-underline-from-stylesheet-expected.txt:
* editing/style/typing-style-003-expected.txt:
* platform/ios-simulator/editing/style/typing-style-003-expected.txt: Removed.
* platform/mac-wk2/editing/mac/spelling/autocorrection-contraction-expected.txt:
* platform/mac/editing/inserting/editable-html-element-expected.txt:
* platform/mac/editing/inserting/editing-empty-divs-expected.txt:
* platform/mac/editing/inserting/insert-at-end-02-expected.txt:
* platform/mac/editing/pasteboard/4989774-expected.txt:
* platform/mac/editing/selection/4983858-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestseditingmacspellingautocorrectioncontractionexpectedtxt">trunk/LayoutTests/editing/mac/spelling/autocorrection-contraction-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditingmacspellingautocorrectionremovingunderlineafterpasteexpectedtxt">trunk/LayoutTests/editing/mac/spelling/autocorrection-removing-underline-after-paste-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditingmacspellingautocorrectionremovingunderlineexpectedtxt">trunk/LayoutTests/editing/mac/spelling/autocorrection-removing-underline-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditingmacspellingautocorrectionsimpleexpectedtxt">trunk/LayoutTests/editing/mac/spelling/autocorrection-simple-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditingstyleremoveunderlinefromstylesheetexpectedtxt">trunk/LayoutTests/editing/style/remove-underline-from-stylesheet-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditingstyletypingstyle003expectedtxt">trunk/LayoutTests/editing/style/typing-style-003-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdombeforeloadremovebadobjectinbeforeloadlistenerexpectedtxt">trunk/LayoutTests/fast/dom/beforeload/remove-bad-object-in-beforeload-listener-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdombeforeloadremoveflashinbeforeloadlistenerexpectedtxt">trunk/LayoutTests/fast/dom/beforeload/remove-flash-in-beforeload-listener-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmaceditinginsertingeditablehtmlelementexpectedtxt">trunk/LayoutTests/platform/mac/editing/inserting/editable-html-element-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmaceditinginsertingeditingemptydivsexpectedtxt">trunk/LayoutTests/platform/mac/editing/inserting/editing-empty-divs-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmaceditinginsertinginsertatend02expectedtxt">trunk/LayoutTests/platform/mac/editing/inserting/insert-at-end-02-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmaceditingpasteboard4989774expectedtxt">trunk/LayoutTests/platform/mac/editing/pasteboard/4989774-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmaceditingselection4983858expectedtxt">trunk/LayoutTests/platform/mac/editing/selection/4983858-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2editingmacspellingautocorrectioncontractionexpectedtxt">trunk/LayoutTests/platform/mac-wk2/editing/mac/spelling/autocorrection-contraction-expected.txt</a></li>
<li><a href="#trunkLayoutTestspluginsfocusexpectedtxt">trunk/LayoutTests/plugins/focus-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomCharacterDatacpp">trunk/Source/WebCore/dom/CharacterData.cpp</a></li>
<li><a href="#trunkSourceWebCoredomTextcpp">trunk/Source/WebCore/dom/Text.cpp</a></li>
<li><a href="#trunkSourceWebCoredomTexth">trunk/Source/WebCore/dom/Text.h</a></li>
<li><a href="#trunkSourceWebCorestyleRenderTreeUpdatercpp">trunk/Source/WebCore/style/RenderTreeUpdater.cpp</a></li>
<li><a href="#trunkSourceWebCorestyleStyleTreeResolvercpp">trunk/Source/WebCore/style/StyleTreeResolver.cpp</a></li>
<li><a href="#trunkSourceWebCorestyleStyleTreeResolverh">trunk/Source/WebCore/style/StyleTreeResolver.h</a></li>
<li><a href="#trunkSourceWebCorestyleStyleUpdatecpp">trunk/Source/WebCore/style/StyleUpdate.cpp</a></li>
<li><a href="#trunkSourceWebCorestyleStyleUpdateh">trunk/Source/WebCore/style/StyleUpdate.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformiossimulatoreditingstyletypingstyle003expectedtxt">trunk/LayoutTests/platform/ios-simulator/editing/style/typing-style-003-expected.txt</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/LayoutTests/ChangeLog        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2016-04-05  Antti Koivisto  &lt;antti@apple.com&gt;
+
+        Use RenderTreeUpdater for text node mutations
+        https://bugs.webkit.org/show_bug.cgi?id=156107
+
+        Reviewed by Andreas Kling.
+
+        Mostly just revert non-rendered whitespace related changes from the earlier patches.
+
+        * editing/style/remove-underline-from-stylesheet-expected.txt:
+        * editing/style/typing-style-003-expected.txt:
+        * platform/ios-simulator/editing/style/typing-style-003-expected.txt: Removed.
+        * platform/mac-wk2/editing/mac/spelling/autocorrection-contraction-expected.txt:
+        * platform/mac/editing/inserting/editable-html-element-expected.txt:
+        * platform/mac/editing/inserting/editing-empty-divs-expected.txt:
+        * platform/mac/editing/inserting/insert-at-end-02-expected.txt:
+        * platform/mac/editing/pasteboard/4989774-expected.txt:
+        * platform/mac/editing/selection/4983858-expected.txt:
+
</ins><span class="cx"> 2016-04-04  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         CSS Triangles Rendering Regression affecting CSS Ribbons.
</span></span></pre></div>
<a id="trunkLayoutTestseditingmacspellingautocorrectioncontractionexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/mac/spelling/autocorrection-contraction-expected.txt (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/mac/spelling/autocorrection-contraction-expected.txt        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/LayoutTests/editing/mac/spelling/autocorrection-contraction-expected.txt        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -279,4 +279,4 @@
</span><span class="cx">           RenderText {#text} at (0,0) size 160x28
</span><span class="cx">             text run at (0,0) width 154: &quot;would' wouldn't&quot;
</span><span class="cx">             text run at (153,0) width 7: &quot; &quot;
</span><del>-caret: position 16 of child 0 {#text} of child 6 {DIV} of child 3 {DIV} of body
</del><ins>+caret: position 16 of child 0 {#text} of child 5 {DIV} of child 3 {DIV} of body
</ins></span></pre></div>
<a id="trunkLayoutTestseditingmacspellingautocorrectionremovingunderlineafterpasteexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/mac/spelling/autocorrection-removing-underline-after-paste-expected.txt (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/mac/spelling/autocorrection-removing-underline-after-paste-expected.txt        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/LayoutTests/editing/mac/spelling/autocorrection-removing-underline-after-paste-expected.txt        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -82,4 +82,4 @@
</span><span class="cx">             text run at (0,28) width 34: &quot;baz&quot;
</span><span class="cx">         RenderBlock {DIV} at (14,70) size 756x28
</span><span class="cx">           RenderBR {BR} at (0,0) size 0x28
</span><del>-caret: position 0 of child 0 {BR} of child 5 {DIV} of child 5 {DIV} of body
</del><ins>+caret: position 0 of child 0 {BR} of child 4 {DIV} of child 5 {DIV} of body
</ins></span></pre></div>
<a id="trunkLayoutTestseditingmacspellingautocorrectionremovingunderlineexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/mac/spelling/autocorrection-removing-underline-expected.txt (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/mac/spelling/autocorrection-removing-underline-expected.txt        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/LayoutTests/editing/mac/spelling/autocorrection-removing-underline-expected.txt        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -78,4 +78,4 @@
</span><span class="cx">           RenderInline {SPAN} at (0,0) size 1x28
</span><span class="cx">         RenderBlock {DIV} at (14,42) size 756x28
</span><span class="cx">           RenderBR {BR} at (0,0) size 0x28
</span><del>-caret: position 0 of child 0 {BR} of child 3 {DIV} of child 5 {DIV} of body
</del><ins>+caret: position 0 of child 0 {BR} of child 2 {DIV} of child 5 {DIV} of body
</ins></span></pre></div>
<a id="trunkLayoutTestseditingmacspellingautocorrectionsimpleexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/mac/spelling/autocorrection-simple-expected.txt (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/mac/spelling/autocorrection-simple-expected.txt        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/LayoutTests/editing/mac/spelling/autocorrection-simple-expected.txt        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -137,4 +137,4 @@
</span><span class="cx">         RenderBlock {DIV} at (14,42) size 756x28
</span><span class="cx">           RenderText {#text} at (0,0) size 138x28
</span><span class="cx">             text run at (0,0) width 138: &quot;the notational,&quot;
</span><del>-caret: position 15 of child 0 {#text} of child 3 {DIV} of child 7 {DIV} of body
</del><ins>+caret: position 15 of child 0 {#text} of child 2 {DIV} of child 7 {DIV} of body
</ins></span></pre></div>
<a id="trunkLayoutTestseditingstyleremoveunderlinefromstylesheetexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/style/remove-underline-from-stylesheet-expected.txt (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/style/remove-underline-from-stylesheet-expected.txt        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/LayoutTests/editing/style/remove-underline-from-stylesheet-expected.txt        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -76,7 +76,5 @@
</span><span class="cx"> | &quot;xxxxxx &quot;
</span><span class="cx"> | &quot;&lt;#selection-anchor&gt;xxxxxx&lt;#selection-focus&gt;&quot;
</span><span class="cx"> | &quot; xxxxxx&quot;
</span><del>-| &quot;
-&quot;
</del><span class="cx"> | &lt;span&gt;
</span><span class="cx"> |   id=&quot;test&quot;
</span></span></pre></div>
<a id="trunkLayoutTestseditingstyletypingstyle003expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/style/typing-style-003-expected.txt (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/style/typing-style-003-expected.txt        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/LayoutTests/editing/style/typing-style-003-expected.txt        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -52,10 +52,10 @@
</span><span class="cx"> EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
</span><span class="cx"> xxxxxxxxxxxxxxx
</span><span class="cx"> execTypeCharacterCommand: x &lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
</span><del>-execTypeCharacterCommand: xx &lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execTypeCharacterCommand: xxx &lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execBoldCommand: xxx &lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execTypeCharacterCommand: xxx&lt;b&gt;x&lt;/b&gt; &lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
</del><ins>+execTypeCharacterCommand: xx&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
+execTypeCharacterCommand: xxx&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
+execBoldCommand: xxx&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
+execTypeCharacterCommand: xxx&lt;b&gt;x&lt;/b&gt;&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
</ins><span class="cx"> execTypeCharacterCommand: xxx&lt;b&gt;xx&lt;/b&gt;&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
</span><span class="cx"> execTypeCharacterCommand: xxx&lt;b&gt;xxx&lt;/b&gt;&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
</span><span class="cx"> execItalicCommand: xxx&lt;b&gt;xxx&lt;/b&gt;&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastdombeforeloadremovebadobjectinbeforeloadlistenerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/beforeload/remove-bad-object-in-beforeload-listener-expected.txt (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/beforeload/remove-bad-object-in-beforeload-listener-expected.txt        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/LayoutTests/fast/dom/beforeload/remove-bad-object-in-beforeload-listener-expected.txt        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -1,4 +1,3 @@
</span><span class="cx"> This page tests that you can correctly remove an object element with an invalid data URL in its beforeload listener without causing a crash.
</span><span class="cx"> 
</span><span class="cx"> PASS
</span><del>-
</del></span></pre></div>
<a id="trunkLayoutTestsfastdombeforeloadremoveflashinbeforeloadlistenerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/beforeload/remove-flash-in-beforeload-listener-expected.txt (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/beforeload/remove-flash-in-beforeload-listener-expected.txt        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/LayoutTests/fast/dom/beforeload/remove-flash-in-beforeload-listener-expected.txt        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -1,4 +1,3 @@
</span><span class="cx"> This page tests that you can correctly remove a flash object in a beforeload listener without causing a crash.
</span><span class="cx"> 
</span><span class="cx"> PASS
</span><del>-
</del></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatoreditingstyletypingstyle003expectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/ios-simulator/editing/style/typing-style-003-expected.txt (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/editing/style/typing-style-003-expected.txt        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/LayoutTests/platform/ios-simulator/editing/style/typing-style-003-expected.txt        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -1,72 +0,0 @@
</span><del>-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV &gt; BODY &gt; HTML &gt; #document to 3 of DIV &gt; BODY &gt; HTML &gt; #document
-EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV &gt; BODY &gt; HTML &gt; #document to 0 of DIV &gt; BODY &gt; HTML &gt; #document toDOMRange:range from 1 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document to 1 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document to 1 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document toDOMRange:range from 2 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document to 2 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document to 2 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document toDOMRange:range from 3 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document to 3 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document to 1 of #text &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document toDOMRange:range from 1 of #text &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document to 1 of #text &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document to 1 of #text &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document toDOMRange:range from 2 of #text &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document to 2 of #text &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document to 2 of #text &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document toDOMRange:range from 3 of #text &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document to 3 of #text &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text &gt; I &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document to 1 of #text &gt; I &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document toDOMRange:range from 1 of #text &gt; I &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document to 1 of #text &gt; I &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text &gt; I &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document to 1 of #text &gt; I &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document toDOMRange:range from 2 of #text &gt; I &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document to 2 of #text &gt; I &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text &gt; I &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document to 2 of #text &gt; I &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document toDOMRange:range from 3 of #text &gt; I &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document to 3 of #text &gt; I &gt; B &gt; DIV &gt; BODY &gt; HTML &gt; #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text &gt; I &gt; DIV &gt; BODY &gt; HTML &gt; #document to 1 of #text &gt; I &gt; DIV &gt; BODY &gt; HTML &gt; #document toDOMRange:range from 1 of #text &gt; I &gt; DIV &gt; BODY &gt; HTML &gt; #document to 1 of #text &gt; I &gt; DIV &gt; BODY &gt; HTML &gt; #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text &gt; I &gt; DIV &gt; BODY &gt; HTML &gt; #document to 1 of #text &gt; I &gt; DIV &gt; BODY &gt; HTML &gt; #document toDOMRange:range from 2 of #text &gt; I &gt; DIV &gt; BODY &gt; HTML &gt; #document to 2 of #text &gt; I &gt; DIV &gt; BODY &gt; HTML &gt; #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text &gt; I &gt; DIV &gt; BODY &gt; HTML &gt; #document to 2 of #text &gt; I &gt; DIV &gt; BODY &gt; HTML &gt; #document toDOMRange:range from 3 of #text &gt; I &gt; DIV &gt; BODY &gt; HTML &gt; #document to 3 of #text &gt; I &gt; DIV &gt; BODY &gt; HTML &gt; #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document to 1 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document toDOMRange:range from 1 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document to 1 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document to 1 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document toDOMRange:range from 2 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document to 2 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document to 2 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document toDOMRange:range from 3 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document to 3 of #text &gt; DIV &gt; BODY &gt; HTML &gt; #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-xxxxxxxxxxxxxxx
-execTypeCharacterCommand: x &lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execTypeCharacterCommand: xx&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execTypeCharacterCommand: xxx&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execBoldCommand: xxx&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execTypeCharacterCommand: xxx&lt;b&gt;x&lt;/b&gt;&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execTypeCharacterCommand: xxx&lt;b&gt;xx&lt;/b&gt;&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execTypeCharacterCommand: xxx&lt;b&gt;xxx&lt;/b&gt;&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execItalicCommand: xxx&lt;b&gt;xxx&lt;/b&gt;&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execTypeCharacterCommand: xxx&lt;b&gt;xxx&lt;i&gt;x&lt;/i&gt;&lt;/b&gt;&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execTypeCharacterCommand: xxx&lt;b&gt;xxx&lt;i&gt;xx&lt;/i&gt;&lt;/b&gt;&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execTypeCharacterCommand: xxx&lt;b&gt;xxx&lt;i&gt;xxx&lt;/i&gt;&lt;/b&gt;&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execBoldCommand: xxx&lt;b&gt;xxx&lt;i&gt;xxx&lt;/i&gt;&lt;/b&gt;&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execTypeCharacterCommand: xxx&lt;b&gt;xxx&lt;/b&gt;&lt;i&gt;&lt;b&gt;xxx&lt;/b&gt;x&lt;/i&gt;&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execTypeCharacterCommand: xxx&lt;b&gt;xxx&lt;/b&gt;&lt;i&gt;&lt;b&gt;xxx&lt;/b&gt;xx&lt;/i&gt;&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execTypeCharacterCommand: xxx&lt;b&gt;xxx&lt;/b&gt;&lt;i&gt;&lt;b&gt;xxx&lt;/b&gt;xxx&lt;/i&gt;&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execItalicCommand: xxx&lt;b&gt;xxx&lt;/b&gt;&lt;i&gt;&lt;b&gt;xxx&lt;/b&gt;xxx&lt;/i&gt;&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execTypeCharacterCommand: xxx&lt;b&gt;xxx&lt;/b&gt;&lt;i&gt;&lt;b&gt;xxx&lt;/b&gt;xxx&lt;/i&gt;x&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execTypeCharacterCommand: xxx&lt;b&gt;xxx&lt;/b&gt;&lt;i&gt;&lt;b&gt;xxx&lt;/b&gt;xxx&lt;/i&gt;xx&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
-execTypeCharacterCommand: xxx&lt;b&gt;xxx&lt;/b&gt;&lt;i&gt;&lt;b&gt;xxx&lt;/b&gt;xxx&lt;/i&gt;xxx&lt;span id=&quot;test&quot;&gt;&lt;/span&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsplatformmaceditinginsertingeditablehtmlelementexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/editing/inserting/editable-html-element-expected.txt (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/editing/inserting/editable-html-element-expected.txt        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/LayoutTests/platform/mac/editing/inserting/editable-html-element-expected.txt        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -22,6 +22,7 @@
</span><span class="cx">           text run at (0,18) width 767: &quot;inserting a paragraph separator doesn't split the body (inserting a paragraph separator usually splits/clones the enclosing&quot;
</span><span class="cx">           text run at (766,18) width 5: &quot; &quot;
</span><span class="cx">           text run at (0,36) width 132: &quot;block flow element).&quot;
</span><ins>+        RenderText {#text} at (0,0) size 0x0
</ins><span class="cx">       RenderBlock {DIV} at (0,54) size 784x18
</span><span class="cx">         RenderBR {BR} at (0,0) size 0x18
</span><span class="cx"> caret: position 0 of child 0 {BR} of child 2 {DIV} of body
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmaceditinginsertingeditingemptydivsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/editing/inserting/editing-empty-divs-expected.txt (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/editing/inserting/editing-empty-divs-expected.txt        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/LayoutTests/platform/mac/editing/inserting/editing-empty-divs-expected.txt        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -65,6 +65,7 @@
</span><span class="cx">       RenderBlock {DIV} at (0,230) size 708x22 [border: (1px dotted #0000FF)]
</span><span class="cx">         RenderText {#text} at (1,1) size 8x18
</span><span class="cx">           text run at (1,1) width 8: &quot;c&quot;
</span><ins>+        RenderText {#text} at (0,0) size 0x0
</ins><span class="cx">       RenderBlock {P} at (0,268) size 784x18
</span><span class="cx">         RenderText {#text} at (0,0) size 240x18
</span><span class="cx">           text run at (0,0) width 240: &quot;This div contains a self-closing p tag.&quot;
</span><span class="lines">@@ -80,5 +81,6 @@
</span><span class="cx">         RenderBlock (anonymous) at (1,1) size 706x18
</span><span class="cx">           RenderText {#text} at (0,0) size 8x18
</span><span class="cx">             text run at (0,0) width 8: &quot;c&quot;
</span><ins>+          RenderText {#text} at (0,0) size 0x0
</ins><span class="cx">         RenderBlock {P} at (1,35) size 706x0
</span><span class="cx"> caret: position 1 of child 0 {#text} of child 21 {DIV} of body
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmaceditinginsertinginsertatend02expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/editing/inserting/insert-at-end-02-expected.txt (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/editing/inserting/insert-at-end-02-expected.txt        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/LayoutTests/platform/mac/editing/inserting/insert-at-end-02-expected.txt        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -29,4 +29,5 @@
</span><span class="cx">         RenderBlock (anonymous) at (2,46) size 780x18
</span><span class="cx">           RenderText {#text} at (0,0) size 8x18
</span><span class="cx">             text run at (0,0) width 8: &quot;x&quot;
</span><ins>+          RenderText {#text} at (0,0) size 0x0
</ins><span class="cx"> caret: position 1 of child 5 {#text} of child 5 {DIV} of body
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmaceditingpasteboard4989774expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/editing/pasteboard/4989774-expected.txt (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/editing/pasteboard/4989774-expected.txt        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/LayoutTests/platform/mac/editing/pasteboard/4989774-expected.txt        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -12,4 +12,6 @@
</span><span class="cx">         text run at (634,103) width 102: &quot;You should see&quot;
</span><span class="cx">         text run at (735,103) width 5: &quot; &quot;
</span><span class="cx">         text run at (0,121) width 364: &quot;several pictures above all in the same line/paragraph.&quot;
</span><ins>+      RenderText {#text} at (0,0) size 0x0
+      RenderText {#text} at (0,0) size 0x0
</ins><span class="cx"> caret: position 164 of child 4 {#text} of body
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmaceditingselection4983858expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/editing/selection/4983858-expected.txt (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/editing/selection/4983858-expected.txt        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/LayoutTests/platform/mac/editing/selection/4983858-expected.txt        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -10,6 +10,7 @@
</span><span class="cx">           text run at (716,0) width 65: &quot;paragraph&quot;
</span><span class="cx">           text run at (780,0) width 4: &quot; &quot;
</span><span class="cx">           text run at (0,18) width 165: &quot;below should be selected:&quot;
</span><ins>+        RenderText {#text} at (0,0) size 0x0
</ins><span class="cx">       RenderBlock {DIV} at (0,36) size 784x18
</span><span class="cx">         RenderText {#text} at (0,0) size 22x18
</span><span class="cx">           text run at (0,0) width 22: &quot;foo&quot;
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2editingmacspellingautocorrectioncontractionexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/editing/mac/spelling/autocorrection-contraction-expected.txt (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/editing/mac/spelling/autocorrection-contraction-expected.txt        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/LayoutTests/platform/mac-wk2/editing/mac/spelling/autocorrection-contraction-expected.txt        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -259,4 +259,4 @@
</span><span class="cx">           RenderText {#text} at (0,0) size 172x28
</span><span class="cx">             text run at (0,0) width 166: &quot;wouldn' wouldn't&quot;
</span><span class="cx">             text run at (165,0) width 7: &quot; &quot;
</span><del>-caret: position 17 of child 0 {#text} of child 6 {DIV} of child 3 {DIV} of body
</del><ins>+caret: position 17 of child 0 {#text} of child 5 {DIV} of child 3 {DIV} of body
</ins></span></pre></div>
<a id="trunkLayoutTestspluginsfocusexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/plugins/focus-expected.txt (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/plugins/focus-expected.txt        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/LayoutTests/plugins/focus-expected.txt        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -24,4 +24,3 @@
</span><span class="cx"> This tests focusing Embeds and Objects. See LayoutTests/java for Applet elements.
</span><span class="cx"> 
</span><span class="cx">    Fallback contents.     Fallback contents. Fallback contents.      
</span><del>-
</del></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/Source/WebCore/ChangeLog        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2016-04-05  Antti Koivisto  &lt;antti@apple.com&gt;
+
+        Use RenderTreeUpdater for text node mutations
+        https://bugs.webkit.org/show_bug.cgi?id=156107
+
+        Reviewed by Andreas Kling.
+
+        Use the new mechanism for updating render tree after text node content changes.
+
+        * dom/CharacterData.cpp:
+        (WebCore::CharacterData::parserAppendData):
+        (WebCore::CharacterData::setDataAndUpdate):
+        * dom/Text.cpp:
+        (WebCore::Text::createWithLengthLimit):
+        (WebCore::Text::updateRendererAfterContentChange):
+
+            Update using RenderTreeUpdater.
+
+        (WebCore::Text::formatForDebugger):
+        * dom/Text.h:
+        (WebCore::Text::Text):
+        * style/StyleTreeResolver.cpp:
+        (WebCore::Style::TreeResolver::styleForElement):
+        (WebCore::Style::resetStyleForNonRenderedDescendants):
+        (WebCore::Style::TreeResolver::resolveElement):
+        (WebCore::Style::elementImplicitVisibility):
+        (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded): Deleted.
+        (WebCore::Style::textRendererIsNeeded): Deleted.
+        (WebCore::Style::createTextRendererIfNeeded): Deleted.
+        (WebCore::Style::attachTextRenderer): Deleted.
+        (WebCore::Style::detachTextRenderer): Deleted.
+        (WebCore::Style::updateTextRendererAfterContentChange): Deleted.
+        (WebCore::Style::resolveTextNode): Deleted.
+
+            Kill the old code paths.
+
+        * style/StyleTreeResolver.h:
+
</ins><span class="cx"> 2016-04-05  Hunseop Jeong  &lt;hs85.jeong@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Curl][Soup] Fix the build after r199039
</span></span></pre></div>
<a id="trunkSourceWebCoredomCharacterDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/CharacterData.cpp (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/CharacterData.cpp        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/Source/WebCore/dom/CharacterData.cpp        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #include &quot;ProcessingInstruction.h&quot;
</span><span class="cx"> #include &quot;RenderText.h&quot;
</span><span class="cx"> #include &quot;StyleInheritedData.h&quot;
</span><del>-#include &quot;StyleTreeResolver.h&quot;
</del><span class="cx"> #include &quot;TextBreakIterator.h&quot;
</span><span class="cx"> #include &lt;wtf/Ref.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -89,8 +88,8 @@
</span><span class="cx">         m_data.append(string.characters16() + offset, characterLengthLimit);
</span><span class="cx"> 
</span><span class="cx">     ASSERT(!renderer() || is&lt;Text&gt;(*this));
</span><del>-    if (is&lt;Text&gt;(*this))
-        Style::updateTextRendererAfterContentChange(downcast&lt;Text&gt;(*this), oldLength, 0);
</del><ins>+    if (is&lt;Text&gt;(*this) &amp;&amp; parentNode())
+        downcast&lt;Text&gt;(*this).updateRendererAfterContentChange(oldLength, 0);
</ins><span class="cx"> 
</span><span class="cx">     document().incDOMTreeVersion();
</span><span class="cx">     // We don't call dispatchModifiedEvent here because we don't want the
</span><span class="lines">@@ -188,8 +187,8 @@
</span><span class="cx">     m_data = newData;
</span><span class="cx"> 
</span><span class="cx">     ASSERT(!renderer() || is&lt;Text&gt;(*this));
</span><del>-    if (is&lt;Text&gt;(*this))
-        Style::updateTextRendererAfterContentChange(downcast&lt;Text&gt;(*this), offsetOfReplacedData, oldLength);
</del><ins>+    if (is&lt;Text&gt;(*this) &amp;&amp; parentNode())
+        downcast&lt;Text&gt;(*this).updateRendererAfterContentChange(offsetOfReplacedData, oldLength);
</ins><span class="cx"> 
</span><span class="cx">     if (is&lt;ProcessingInstruction&gt;(*this))
</span><span class="cx">         downcast&lt;ProcessingInstruction&gt;(*this).checkStyleSheet();
</span></span></pre></div>
<a id="trunkSourceWebCoredomTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Text.cpp (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Text.cpp        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/Source/WebCore/dom/Text.cpp        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -26,12 +26,14 @@
</span><span class="cx"> #include &quot;RenderCombineText.h&quot;
</span><span class="cx"> #include &quot;RenderSVGInlineText.h&quot;
</span><span class="cx"> #include &quot;RenderText.h&quot;
</span><ins>+#include &quot;RenderTreeUpdater.h&quot;
</ins><span class="cx"> #include &quot;SVGElement.h&quot;
</span><span class="cx"> #include &quot;SVGNames.h&quot;
</span><span class="cx"> #include &quot;ScopedEventQueue.h&quot;
</span><span class="cx"> #include &quot;ShadowRoot.h&quot;
</span><span class="cx"> #include &quot;StyleInheritedData.h&quot;
</span><span class="cx"> #include &quot;StyleResolver.h&quot;
</span><ins>+#include &quot;StyleUpdate.h&quot;
</ins><span class="cx"> #include &quot;TextNodeTraversal.h&quot;
</span><span class="cx"> #include &lt;wtf/CheckedArithmetic.h&gt;
</span><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="lines">@@ -217,6 +219,23 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Text::updateRendererAfterContentChange(unsigned offsetOfReplacedData, unsigned lengthOfReplacedData)
+{
+    ASSERT(parentNode());
+    if (styleChangeType() == ReconstructRenderTree)
+        return;
+
+    auto textUpdate = std::make_unique&lt;Style::Update&gt;(document());
+    textUpdate-&gt;addText(*this);
+
+    RenderTreeUpdater renderTreeUpdater(document());
+    renderTreeUpdater.commit(WTFMove(textUpdate));
+
+    if (auto* renderer = this-&gt;renderer())
+        renderer-&gt;setTextWithOffset(data(), offsetOfReplacedData, lengthOfReplacedData);
+}
+
+
</ins><span class="cx"> #if ENABLE(TREE_DEBUGGING)
</span><span class="cx"> void Text::formatForDebugger(char* buffer, unsigned length) const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoredomTexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Text.h (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Text.h        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/Source/WebCore/dom/Text.h        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -53,6 +53,8 @@
</span><span class="cx"> 
</span><span class="cx">     RenderText* renderer() const;
</span><span class="cx"> 
</span><ins>+    void updateRendererAfterContentChange(unsigned offsetOfReplacedData, unsigned lengthOfReplacedData);
+
</ins><span class="cx"> protected:
</span><span class="cx">     Text(Document&amp; document, const String&amp; data, ConstructionType type)
</span><span class="cx">         : CharacterData(document, data, type)
</span></span></pre></div>
<a id="trunkSourceWebCorestyleRenderTreeUpdatercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/RenderTreeUpdater.cpp (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/RenderTreeUpdater.cpp        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/Source/WebCore/style/RenderTreeUpdater.cpp        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(&amp;m_document == &amp;styleUpdate-&gt;document());
</span><span class="cx"> 
</span><del>-    if (!m_document.shouldCreateRenderers())
</del><ins>+    if (!m_document.shouldCreateRenderers() || !m_document.renderView())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     m_styleUpdate = WTFMove(styleUpdate);
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleTreeResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleTreeResolver.cpp (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleTreeResolver.cpp        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/Source/WebCore/style/StyleTreeResolver.cpp        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -50,9 +50,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace Style {
</span><span class="cx"> 
</span><del>-static void attachTextRenderer(Text&amp;, RenderTreePosition&amp;);
-static void resolveTextNode(Text&amp;, RenderTreePosition&amp;);
-
</del><span class="cx"> class SelectorFilterPusher {
</span><span class="cx"> public:
</span><span class="cx">     enum PushMode { Push, NoPush };
</span><span class="lines">@@ -179,103 +176,6 @@
</span><span class="cx">     return WTFMove(elementStyle.renderStyle);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded(Node&amp; current)
-{
-    // FIXME: This needs to traverse in composed tree order.
-
-    // This function finds sibling text renderers where the results of textRendererIsNeeded may have changed as a result of
-    // the current node gaining or losing the renderer. This can only affect white space text nodes.
-    for (Node* sibling = current.nextSibling(); sibling; sibling = sibling-&gt;nextSibling()) {
-        if (sibling-&gt;needsStyleRecalc())
-            return;
-        if (is&lt;Element&gt;(*sibling)) {
-            // Text renderers beyond rendered elements can't be affected.
-            if (!sibling-&gt;renderer() || RenderTreePosition::isRendererReparented(*sibling-&gt;renderer()))
-                continue;
-            return;
-        }
-        if (!is&lt;Text&gt;(*sibling))
-            continue;
-        Text&amp; textSibling = downcast&lt;Text&gt;(*sibling);
-        if (!textSibling.containsOnlyWhitespace())
-            continue;
-        textSibling.setNeedsStyleRecalc();
-    }
-}
-
-static bool textRendererIsNeeded(const Text&amp; textNode, const RenderTreePosition&amp; renderTreePosition)
-{
-    const RenderElement&amp; parentRenderer = renderTreePosition.parent();
-    if (!parentRenderer.canHaveChildren())
-        return false;
-    if (parentRenderer.element() &amp;&amp; !parentRenderer.element()-&gt;childShouldCreateRenderer(textNode))
-        return false;
-    if (textNode.isEditingText())
-        return true;
-    if (!textNode.length())
-        return false;
-    if (!textNode.containsOnlyWhitespace())
-        return true;
-    // This text node has nothing but white space. We may still need a renderer in some cases.
-    if (parentRenderer.isTable() || parentRenderer.isTableRow() || parentRenderer.isTableSection() || parentRenderer.isRenderTableCol() || parentRenderer.isFrameSet())
-        return false;
-    if (parentRenderer.style().preserveNewline()) // pre/pre-wrap/pre-line always make renderers.
-        return true;
-
-    RenderObject* previousRenderer = renderTreePosition.previousSiblingRenderer(textNode);
-    if (previousRenderer &amp;&amp; previousRenderer-&gt;isBR()) // &lt;span&gt;&lt;br/&gt; &lt;br/&gt;&lt;/span&gt;
-        return false;
-
-    if (parentRenderer.isRenderInline()) {
-        // &lt;span&gt;&lt;div/&gt; &lt;div/&gt;&lt;/span&gt;
-        if (previousRenderer &amp;&amp; !previousRenderer-&gt;isInline())
-            return false;
-    } else {
-        if (parentRenderer.isRenderBlock() &amp;&amp; !parentRenderer.childrenInline() &amp;&amp; (!previousRenderer || !previousRenderer-&gt;isInline()))
-            return false;
-        
-        RenderObject* first = parentRenderer.firstChild();
-        while (first &amp;&amp; first-&gt;isFloatingOrOutOfFlowPositioned())
-            first = first-&gt;nextSibling();
-        RenderObject* nextRenderer = renderTreePosition.nextSiblingRenderer(textNode);
-        if (!first || nextRenderer == first) {
-            // Whitespace at the start of a block just goes away. Don't even make a render object for this text.
-            return false;
-        }
-    }
-    return true;
-}
-
-static void createTextRendererIfNeeded(Text&amp; textNode, RenderTreePosition&amp; renderTreePosition)
-{
-    ASSERT(!textNode.renderer());
-
-    if (!textRendererIsNeeded(textNode, renderTreePosition))
-        return;
-
-    auto newRenderer = textNode.createTextRenderer(renderTreePosition.parent().style());
-    ASSERT(newRenderer);
-
-    renderTreePosition.computeNextSibling(textNode);
-
-    if (!renderTreePosition.canInsert(*newRenderer))
-        return;
-
-    // Make sure the RenderObject already knows it is going to be added to a RenderFlowThread before we set the style
-    // for the first time. Otherwise code using inRenderFlowThread() in the styleWillChange and styleDidChange will fail.
-    newRenderer-&gt;setFlowThreadState(renderTreePosition.parent().flowThreadState());
-
-    textNode.setRenderer(newRenderer.get());
-    renderTreePosition.insert(*newRenderer.leakPtr());
-}
-
-void attachTextRenderer(Text&amp; textNode, RenderTreePosition&amp; renderTreePosition)
-{
-    createTextRendererIfNeeded(textNode, renderTreePosition);
-
-    textNode.clearNeedsStyleRecalc();
-}
-
</del><span class="cx"> void detachTextRenderer(Text&amp; textNode)
</span><span class="cx"> {
</span><span class="cx">     if (textNode.renderer())
</span><span class="lines">@@ -283,21 +183,6 @@
</span><span class="cx">     textNode.setRenderer(0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void updateTextRendererAfterContentChange(Text&amp; textNode, unsigned offsetOfReplacedData, unsigned lengthOfReplacedData)
-{
-    auto* renderingParentNode = composedTreeAncestors(textNode).first();
-    if (!renderingParentNode || !renderingParentNode-&gt;renderer())
-        return;
-
-    bool hadRenderer = textNode.renderer();
-
-    RenderTreePosition renderTreePosition(*renderingParentNode-&gt;renderer());
-    resolveTextNode(textNode, renderTreePosition);
-
-    if (hadRenderer &amp;&amp; textNode.renderer())
-        textNode.renderer()-&gt;setTextWithOffset(textNode.data(), offsetOfReplacedData, lengthOfReplacedData);
-}
-
</del><span class="cx"> static void resetStyleForNonRenderedDescendants(Element&amp; current)
</span><span class="cx"> {
</span><span class="cx">     // FIXME: This is not correct with shadow trees. This should be done with ComposedTreeIterator.
</span><span class="lines">@@ -445,25 +330,6 @@
</span><span class="cx">     return update;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void resolveTextNode(Text&amp; text, RenderTreePosition&amp; renderTreePosition)
-{
-    text.clearNeedsStyleRecalc();
-
-    bool hasRenderer = text.renderer();
-    bool needsRenderer = textRendererIsNeeded(text, renderTreePosition);
-    if (hasRenderer) {
-        if (needsRenderer)
-            return;
-        detachTextRenderer(text);
-        invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded(text);
-        return;
-    }
-    if (!needsRenderer)
-        return;
-    attachTextRenderer(text, renderTreePosition);
-    invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded(text);
-}
-
</del><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> static EVisibility elementImplicitVisibility(const Element* element)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleTreeResolverh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleTreeResolver.h (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleTreeResolver.h        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/Source/WebCore/style/StyleTreeResolver.h        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -112,8 +112,6 @@
</span><span class="cx"> void detachRenderTree(Element&amp;, DetachType = NormalDetach);
</span><span class="cx"> void detachTextRenderer(Text&amp;);
</span><span class="cx"> 
</span><del>-void updateTextRendererAfterContentChange(Text&amp;, unsigned offsetOfReplacedData, unsigned lengthOfReplacedData);
-
</del><span class="cx"> void queuePostResolutionCallback(std::function&lt;void ()&gt;);
</span><span class="cx"> bool postResolutionCallbacksAreSuspended();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleUpdatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleUpdate.cpp (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleUpdate.cpp        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/Source/WebCore/style/StyleUpdate.cpp        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> void Update::addElement(Element&amp; element, Element* parent, ElementUpdate&amp; change)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_elements.contains(&amp;element));
</span><del>-    ASSERT(!parent || composedTreeAncestors(element).first() == parent);
</del><ins>+    ASSERT(composedTreeAncestors(element).first() == parent);
</ins><span class="cx"> 
</span><span class="cx">     addPossibleRoot(parent);
</span><span class="cx">     m_elements.add(&amp;element, change);
</span><span class="lines">@@ -72,12 +72,17 @@
</span><span class="cx"> void Update::addText(Text&amp; text, Element* parent)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_texts.contains(&amp;text));
</span><del>-    ASSERT(!parent || composedTreeAncestors(text).first() == parent);
</del><ins>+    ASSERT(composedTreeAncestors(text).first() == parent);
</ins><span class="cx"> 
</span><span class="cx">     addPossibleRoot(parent);
</span><span class="cx">     m_texts.add(&amp;text);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Update::addText(Text&amp; text)
+{
+    addText(text, composedTreeAncestors(text).first());
+}
+
</ins><span class="cx"> void Update::addPossibleRoot(Element* element)
</span><span class="cx"> {
</span><span class="cx">     if (!element) {
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleUpdateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleUpdate.h (199053 => 199054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleUpdate.h        2016-04-05 07:04:27 UTC (rev 199053)
+++ trunk/Source/WebCore/style/StyleUpdate.h        2016-04-05 10:29:31 UTC (rev 199054)
</span><span class="lines">@@ -66,6 +66,7 @@
</span><span class="cx"> 
</span><span class="cx">     void addElement(Element&amp;, Element* parent, ElementUpdate&amp;);
</span><span class="cx">     void addText(Text&amp;, Element* parent);
</span><ins>+    void addText(Text&amp;);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     void addPossibleRoot(Element*);
</span></span></pre>
</div>
</div>

</body>
</html>