<!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>[198847] 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/198847">198847</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-03-30 11:24:26 -0700 (Wed, 30 Mar 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/198828">r198828</a>.
https://bugs.webkit.org/show_bug.cgi?id=156030
Confirming PLT regression (Requested by anttik on #webkit).
Reverted changeset:
"Separate render tree updating from style resolve"
https://bugs.webkit.org/show_bug.cgi?id=155298
http://trac.webkit.org/changeset/198828</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestscss3blendingrepaintblendmodeisolatestackingcontextexpectedtxt">trunk/LayoutTests/css3/blending/repaint/blend-mode-isolate-stacking-context-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsresizeexpectedtxt">trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize-expected.txt</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="#trunkLayoutTestsplatformiossimulatorTestExpectations">trunk/LayoutTests/platform/ios-simulator/TestExpectations</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="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCore/css/StyleResolver.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolverh">trunk/Source/WebCore/css/StyleResolver.h</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumenth">trunk/Source/WebCore/dom/Document.h</a></li>
<li><a href="#trunkSourceWebCoredomElementcpp">trunk/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodecpp">trunk/Source/WebCore/dom/Node.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderElementh">trunk/Source/WebCore/rendering/RenderElement.h</a></li>
<li><a href="#trunkSourceWebCorestyleRenderTreePositioncpp">trunk/Source/WebCore/style/RenderTreePosition.cpp</a></li>
<li><a href="#trunkSourceWebCorestyleStyleRelationscpp">trunk/Source/WebCore/style/StyleRelations.cpp</a></li>
<li><a href="#trunkSourceWebCorestyleStyleRelationsh">trunk/Source/WebCore/style/StyleRelations.h</a></li>
<li><a href="#trunkSourceWebCorestyleStyleSharingResolvercpp">trunk/Source/WebCore/style/StyleSharingResolver.cpp</a></li>
<li><a href="#trunkSourceWebCorestyleStyleSharingResolverh">trunk/Source/WebCore/style/StyleSharingResolver.h</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="#trunkSourceWebCoresvgSVGElementh">trunk/Source/WebCore/svg/SVGElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGUseElementcpp">trunk/Source/WebCore/svg/SVGUseElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGUseElementh">trunk/Source/WebCore/svg/SVGUseElement.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>
<li><a href="#trunkSourceWebCorestyleRenderTreeUpdatercpp">trunk/Source/WebCore/style/RenderTreeUpdater.cpp</a></li>
<li><a href="#trunkSourceWebCorestyleRenderTreeUpdaterh">trunk/Source/WebCore/style/RenderTreeUpdater.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>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/LayoutTests/ChangeLog        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-03-30 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r198828.
+ https://bugs.webkit.org/show_bug.cgi?id=156030
+
+ Confirming PLT regression (Requested by anttik on #webkit).
+
+ Reverted changeset:
+
+ "Separate render tree updating from style resolve"
+ https://bugs.webkit.org/show_bug.cgi?id=155298
+ http://trac.webkit.org/changeset/198828
+
</ins><span class="cx"> 2016-03-30 Keith Miller <keith_miller@apple.com>
</span><span class="cx">
</span><span class="cx"> Unreviewed, rollout r198808. The patch causes crashes on 32-bit and appears to be a JSBench regression.
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/LayoutTests/TestExpectations        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -988,9 +988,6 @@
</span><span class="cx"> storage/indexeddb/modern/exceed-open-file-limit.html [ Skip ]
</span><span class="cx"> webkit.org/b/155028 storage/indexeddb/modern/256-open-databases.html [ Skip ]
</span><span class="cx">
</span><del>-# Fixed by upcoming MathML refactoring
-webkit.org/b/155019 mathml/presentation/menclose-notation-attribute-change-value.html [ Skip ]
-
</del><span class="cx"> ### END OF IndexedDB failures
</span><span class="cx"> ########################################
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestscss3blendingrepaintblendmodeisolatestackingcontextexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/blending/repaint/blend-mode-isolate-stacking-context-expected.txt (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/blending/repaint/blend-mode-isolate-stacking-context-expected.txt        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/LayoutTests/css3/blending/repaint/blend-mode-isolate-stacking-context-expected.txt        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -21,10 +21,10 @@
</span><span class="cx"> (rect 48 290 60 60)
</span><span class="cx"> (rect 28 290 60 60)
</span><span class="cx"> (rect 48 290 60 60)
</span><ins>+ (rect 48 408 60 60)
+ (rect 48 408 60 60)
</ins><span class="cx"> (rect 28 526 60 60)
</span><span class="cx"> (rect 48 526 60 60)
</span><del>- (rect 48 408 60 60)
- (rect 48 408 60 60)
</del><span class="cx"> (rect 48 644 60 60)
</span><span class="cx"> (rect 68 644 60 60)
</span><span class="cx"> (rect 48 644 60 60)
</span></span></pre></div>
<a id="trunkLayoutTestscss3viewportpercentagelengthsviewportpercentagelengthsresizeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize-expected.txt (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize-expected.txt        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-resize-expected.txt        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -17,19 +17,19 @@
</span><span class="cx"> PASS getComputedStyle(test).fontSize is "30px"
</span><span class="cx"> PASS getComputedStyle(test).width is "450px"
</span><span class="cx"> PASS getComputedStyle(testpseudo, ':after').marginLeft is "120px"
</span><del>-PASS getComputedStyle(testpseudo, ':after').paddingRight is "225px"
</del><ins>+FAIL getComputedStyle(testpseudo, ':after').paddingRight should be 225px. Was 200px.
</ins><span class="cx"> PASS innerWidth is 900
</span><span class="cx"> PASS innerHeight is 640
</span><span class="cx"> PASS getComputedStyle(test).fontSize is "32px"
</span><span class="cx"> PASS getComputedStyle(test).width is "450px"
</span><del>-PASS getComputedStyle(testpseudo, ':after').marginLeft is "128px"
-PASS getComputedStyle(testpseudo, ':after').paddingRight is "225px"
</del><ins>+FAIL getComputedStyle(testpseudo, ':after').marginLeft should be 128px. Was 120px.
+FAIL getComputedStyle(testpseudo, ':after').paddingRight should be 225px. Was 200px.
</ins><span class="cx"> PASS innerWidth is 500
</span><span class="cx"> PASS innerHeight is 640
</span><span class="cx"> PASS getComputedStyle(test).fontSize is "32px"
</span><span class="cx"> PASS getComputedStyle(test).width is "250px"
</span><del>-PASS getComputedStyle(testpseudo, ':after').marginLeft is "100px"
-PASS getComputedStyle(testpseudo, ':after').paddingRight is "160px"
</del><ins>+FAIL getComputedStyle(testpseudo, ':after').marginLeft should be 100px. Was 120px.
+FAIL getComputedStyle(testpseudo, ':after').paddingRight should be 160px. Was 200px.
</ins><span class="cx"> PASS innerWidth is 800
</span><span class="cx"> PASS innerHeight is 600
</span><span class="cx"> PASS getComputedStyle(test).fontSize is "30px"
</span></span></pre></div>
<a id="trunkLayoutTestseditingmacspellingautocorrectioncontractionexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/mac/spelling/autocorrection-contraction-expected.txt (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/mac/spelling/autocorrection-contraction-expected.txt        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/LayoutTests/editing/mac/spelling/autocorrection-contraction-expected.txt        2016-03-30 18:24:26 UTC (rev 198847)
</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: "would' wouldn't"
</span><span class="cx"> text run at (153,0) width 7: " "
</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 (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/mac/spelling/autocorrection-removing-underline-after-paste-expected.txt        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/LayoutTests/editing/mac/spelling/autocorrection-removing-underline-after-paste-expected.txt        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -82,4 +82,4 @@
</span><span class="cx"> text run at (0,28) width 34: "baz"
</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 (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/mac/spelling/autocorrection-removing-underline-expected.txt        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/LayoutTests/editing/mac/spelling/autocorrection-removing-underline-expected.txt        2016-03-30 18:24:26 UTC (rev 198847)
</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 (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/mac/spelling/autocorrection-simple-expected.txt        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/LayoutTests/editing/mac/spelling/autocorrection-simple-expected.txt        2016-03-30 18:24:26 UTC (rev 198847)
</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: "the notational,"
</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 (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/style/remove-underline-from-stylesheet-expected.txt        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/LayoutTests/editing/style/remove-underline-from-stylesheet-expected.txt        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -76,7 +76,5 @@
</span><span class="cx"> | "xxxxxx "
</span><span class="cx"> | "<#selection-anchor>xxxxxx<#selection-focus>"
</span><span class="cx"> | " xxxxxx"
</span><del>-| "
-"
</del><span class="cx"> | <span>
</span><span class="cx"> | id="test"
</span></span></pre></div>
<a id="trunkLayoutTestseditingstyletypingstyle003expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/style/typing-style-003-expected.txt (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/style/typing-style-003-expected.txt        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/LayoutTests/editing/style/typing-style-003-expected.txt        2016-03-30 18:24:26 UTC (rev 198847)
</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 <span id="test"></span>
</span><del>-execTypeCharacterCommand: xx <span id="test"></span>
-execTypeCharacterCommand: xxx <span id="test"></span>
-execBoldCommand: xxx <span id="test"></span>
-execTypeCharacterCommand: xxx<b>x</b> <span id="test"></span>
</del><ins>+execTypeCharacterCommand: xx<span id="test"></span>
+execTypeCharacterCommand: xxx<span id="test"></span>
+execBoldCommand: xxx<span id="test"></span>
+execTypeCharacterCommand: xxx<b>x</b><span id="test"></span>
</ins><span class="cx"> execTypeCharacterCommand: xxx<b>xx</b><span id="test"></span>
</span><span class="cx"> execTypeCharacterCommand: xxx<b>xxx</b><span id="test"></span>
</span><span class="cx"> execItalicCommand: xxx<b>xxx</b><span id="test"></span>
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -2043,7 +2043,6 @@
</span><span class="cx"> fast/regions/percentage-margins-mixed-rtl-dominant-regions.html [ ImageOnlyFailure ]
</span><span class="cx"> fast/regions/percentage-margins-rtl-variable-width-regions.html [ ImageOnlyFailure ]
</span><span class="cx"> fast/regions/percentage-margins-variable-width-regions.html [ ImageOnlyFailure ]
</span><del>-fast/regions/position-writing-modes-in-variable-width-regions.html [ ImageOnlyFailure ]
</del><span class="cx"> fast/regions/positioning/fixed-in-named-flow-position-changed.html [ ImageOnlyFailure ]
</span><span class="cx"> fast/regions/positioning/fixed-inside-fixed-in-named-flow.html [ ImageOnlyFailure ]
</span><span class="cx"> fast/regions/positioning/fixed-inside-named-flow-zIndex.html [ ImageOnlyFailure ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatoreditingstyletypingstyle003expectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/ios-simulator/editing/style/typing-style-003-expected.txt (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/editing/style/typing-style-003-expected.txt        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/LayoutTests/platform/ios-simulator/editing/style/typing-style-003-expected.txt        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -1,72 +0,0 @@
</span><del>-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
-EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #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 > B > DIV > BODY > HTML > #document to 1 of #text > B > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > B > DIV > BODY > HTML > #document to 1 of #text > B > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > B > DIV > BODY > HTML > #document to 1 of #text > B > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > B > DIV > BODY > HTML > #document to 2 of #text > B > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > B > DIV > BODY > HTML > #document to 2 of #text > B > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > B > DIV > BODY > HTML > #document to 3 of #text > B > DIV > BODY > HTML > #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 > I > B > DIV > BODY > HTML > #document to 1 of #text > I > B > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > I > B > DIV > BODY > HTML > #document to 1 of #text > I > B > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > I > B > DIV > BODY > HTML > #document to 1 of #text > I > B > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > I > B > DIV > BODY > HTML > #document to 2 of #text > I > B > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > I > B > DIV > BODY > HTML > #document to 2 of #text > I > B > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > I > B > DIV > BODY > HTML > #document to 3 of #text > I > B > DIV > BODY > HTML > #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 > I > DIV > BODY > HTML > #document to 1 of #text > I > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > I > DIV > BODY > HTML > #document to 1 of #text > I > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > I > DIV > BODY > HTML > #document to 1 of #text > I > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > I > DIV > BODY > HTML > #document to 2 of #text > I > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > I > DIV > BODY > HTML > #document to 2 of #text > I > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > I > DIV > BODY > HTML > #document to 3 of #text > I > DIV > BODY > HTML > #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 > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-xxxxxxxxxxxxxxx
-execTypeCharacterCommand: x <span id="test"></span>
-execTypeCharacterCommand: xx<span id="test"></span>
-execTypeCharacterCommand: xxx<span id="test"></span>
-execBoldCommand: xxx<span id="test"></span>
-execTypeCharacterCommand: xxx<b>x</b><span id="test"></span>
-execTypeCharacterCommand: xxx<b>xx</b><span id="test"></span>
-execTypeCharacterCommand: xxx<b>xxx</b><span id="test"></span>
-execItalicCommand: xxx<b>xxx</b><span id="test"></span>
-execTypeCharacterCommand: xxx<b>xxx<i>x</i></b><span id="test"></span>
-execTypeCharacterCommand: xxx<b>xxx<i>xx</i></b><span id="test"></span>
-execTypeCharacterCommand: xxx<b>xxx<i>xxx</i></b><span id="test"></span>
-execBoldCommand: xxx<b>xxx<i>xxx</i></b><span id="test"></span>
-execTypeCharacterCommand: xxx<b>xxx</b><i><b>xxx</b>x</i><span id="test"></span>
-execTypeCharacterCommand: xxx<b>xxx</b><i><b>xxx</b>xx</i><span id="test"></span>
-execTypeCharacterCommand: xxx<b>xxx</b><i><b>xxx</b>xxx</i><span id="test"></span>
-execItalicCommand: xxx<b>xxx</b><i><b>xxx</b>xxx</i><span id="test"></span>
-execTypeCharacterCommand: xxx<b>xxx</b><i><b>xxx</b>xxx</i>x<span id="test"></span>
-execTypeCharacterCommand: xxx<b>xxx</b><i><b>xxx</b>xxx</i>xx<span id="test"></span>
-execTypeCharacterCommand: xxx<b>xxx</b><i><b>xxx</b>xxx</i>xxx<span id="test"></span>
</del></span></pre></div>
<a id="trunkLayoutTestsplatformmaceditinginsertingeditablehtmlelementexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/editing/inserting/editable-html-element-expected.txt (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/editing/inserting/editable-html-element-expected.txt        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/LayoutTests/platform/mac/editing/inserting/editable-html-element-expected.txt        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -22,6 +22,7 @@
</span><span class="cx"> text run at (0,18) width 767: "inserting a paragraph separator doesn't split the body (inserting a paragraph separator usually splits/clones the enclosing"
</span><span class="cx"> text run at (766,18) width 5: " "
</span><span class="cx"> text run at (0,36) width 132: "block flow element)."
</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 (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/editing/inserting/editing-empty-divs-expected.txt        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/LayoutTests/platform/mac/editing/inserting/editing-empty-divs-expected.txt        2016-03-30 18:24:26 UTC (rev 198847)
</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: "c"
</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: "This div contains a self-closing p tag."
</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: "c"
</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 (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/editing/inserting/insert-at-end-02-expected.txt        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/LayoutTests/platform/mac/editing/inserting/insert-at-end-02-expected.txt        2016-03-30 18:24:26 UTC (rev 198847)
</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: "x"
</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 (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/editing/pasteboard/4989774-expected.txt        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/LayoutTests/platform/mac/editing/pasteboard/4989774-expected.txt        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -12,4 +12,6 @@
</span><span class="cx"> text run at (634,103) width 102: "You should see"
</span><span class="cx"> text run at (735,103) width 5: " "
</span><span class="cx"> text run at (0,121) width 364: "several pictures above all in the same line/paragraph."
</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 (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/editing/selection/4983858-expected.txt        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/LayoutTests/platform/mac/editing/selection/4983858-expected.txt        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -10,6 +10,7 @@
</span><span class="cx"> text run at (716,0) width 65: "paragraph"
</span><span class="cx"> text run at (780,0) width 4: " "
</span><span class="cx"> text run at (0,18) width 165: "below should be selected:"
</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: "foo"
</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 (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/editing/mac/spelling/autocorrection-contraction-expected.txt        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/LayoutTests/platform/mac-wk2/editing/mac/spelling/autocorrection-contraction-expected.txt        2016-03-30 18:24:26 UTC (rev 198847)
</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: "wouldn' wouldn't"
</span><span class="cx"> text run at (165,0) width 7: " "
</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="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -2626,14 +2626,12 @@
</span><span class="cx"> style/IdChangeInvalidation.cpp
</span><span class="cx"> style/InlineTextBoxStyle.cpp
</span><span class="cx"> style/RenderTreePosition.cpp
</span><del>- style/RenderTreeUpdater.cpp
</del><span class="cx"> style/StyleChange.cpp
</span><span class="cx"> style/StyleFontSizeFunctions.cpp
</span><span class="cx"> style/StyleRelations.cpp
</span><span class="cx"> style/StyleResolveForDocument.cpp
</span><span class="cx"> style/StyleSharingResolver.cpp
</span><span class="cx"> style/StyleTreeResolver.cpp
</span><del>- style/StyleUpdate.cpp
</del><span class="cx">
</span><span class="cx"> svg/SVGAElement.cpp
</span><span class="cx"> svg/SVGAltGlyphDefElement.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/ChangeLog        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-03-30 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r198828.
+ https://bugs.webkit.org/show_bug.cgi?id=156030
+
+ Confirming PLT regression (Requested by anttik on #webkit).
+
+ Reverted changeset:
+
+ "Separate render tree updating from style resolve"
+ https://bugs.webkit.org/show_bug.cgi?id=155298
+ http://trac.webkit.org/changeset/198828
+
</ins><span class="cx"> 2016-03-30 Keith Miller <keith_miller@apple.com>
</span><span class="cx">
</span><span class="cx"> Unreviewed, rollout r198808. The patch causes crashes on 32-bit and appears to be a JSBench regression.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -6555,8 +6555,6 @@
</span><span class="cx">                 E424A3A01330DF1E00CF6DC9 /* LegacyTileGridTile.mm in Sources */ = {isa = PBXBuildFile; fileRef = E424A39F1330DF1E00CF6DC9 /* LegacyTileGridTile.mm */; };
</span><span class="cx">                 E425A49A18292B840020CFCF /* CollectionIndexCache.h in Headers */ = {isa = PBXBuildFile; fileRef = E425A49918292B840020CFCF /* CollectionIndexCache.h */; };
</span><span class="cx">                 E4295FA412B0614E00D1ACE0 /* ResourceLoadPriority.h in Headers */ = {isa = PBXBuildFile; fileRef = E4295FA312B0614E00D1ACE0 /* ResourceLoadPriority.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                E42E76DA1C7AF76C00E3614D /* StyleUpdate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E42E76D91C7AF76C00E3614D /* StyleUpdate.cpp */; };
-                E42E76DC1C7AF77600E3614D /* StyleUpdate.h in Headers */ = {isa = PBXBuildFile; fileRef = E42E76DB1C7AF77600E3614D /* StyleUpdate.h */; };
</del><span class="cx">                 E43105B816750F0C00DB2FB8 /* NodeTraversal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E43105B716750F0C00DB2FB8 /* NodeTraversal.cpp */; };
</span><span class="cx">                 E43105BB16750F1600DB2FB8 /* NodeTraversal.h in Headers */ = {isa = PBXBuildFile; fileRef = E43105BA16750F1600DB2FB8 /* NodeTraversal.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 E43A023B17EB370A004CDD25 /* RenderElement.h in Headers */ = {isa = PBXBuildFile; fileRef = E43A023A17EB370A004CDD25 /* RenderElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -6612,8 +6610,6 @@
</span><span class="cx">                 E45390490EAFD637003695C8 /* WebCoreSystemInterfaceIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = E45390380EAFD637003695C8 /* WebCoreSystemInterfaceIOS.mm */; };
</span><span class="cx">                 E453904D0EAFD637003695C8 /* WidgetIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = E453903C0EAFD637003695C8 /* WidgetIOS.mm */; };
</span><span class="cx">                 E45390AE0EAFF4B5003695C8 /* SystemMemoryIOS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E45390AD0EAFF4B5003695C8 /* SystemMemoryIOS.cpp */; };
</span><del>-                E46180291C8A06CD0026C02C /* RenderTreeUpdater.h in Headers */ = {isa = PBXBuildFile; fileRef = E46180281C8A06CD0026C02C /* RenderTreeUpdater.h */; };
-                E461802B1C8A06D90026C02C /* RenderTreeUpdater.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E461802A1C8A06D90026C02C /* RenderTreeUpdater.cpp */; };
</del><span class="cx">                 E461802D1C8DD2900026C02C /* StyleRelations.h in Headers */ = {isa = PBXBuildFile; fileRef = E461802C1C8DD2900026C02C /* StyleRelations.h */; };
</span><span class="cx">                 E461802F1C8DD4D20026C02C /* StyleRelations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E461802E1C8DD4D20026C02C /* StyleRelations.cpp */; };
</span><span class="cx">                 E461D65D1BB0C7F000CB5645 /* AuthorStyleSheets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E461D65C1BB0C7F000CB5645 /* AuthorStyleSheets.cpp */; };
</span><span class="lines">@@ -14591,8 +14587,6 @@
</span><span class="cx">                 E424A39F1330DF1E00CF6DC9 /* LegacyTileGridTile.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LegacyTileGridTile.mm; sourceTree = "<group>"; };
</span><span class="cx">                 E425A49918292B840020CFCF /* CollectionIndexCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectionIndexCache.h; sourceTree = "<group>"; };
</span><span class="cx">                 E4295FA312B0614E00D1ACE0 /* ResourceLoadPriority.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLoadPriority.h; sourceTree = "<group>"; };
</span><del>-                E42E76D91C7AF76C00E3614D /* StyleUpdate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleUpdate.cpp; sourceTree = "<group>"; };
-                E42E76DB1C7AF77600E3614D /* StyleUpdate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleUpdate.h; sourceTree = "<group>"; };
</del><span class="cx">                 E43105B716750F0C00DB2FB8 /* NodeTraversal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NodeTraversal.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 E43105BA16750F1600DB2FB8 /* NodeTraversal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeTraversal.h; sourceTree = "<group>"; };
</span><span class="cx">                 E43A023A17EB370A004CDD25 /* RenderElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderElement.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -14640,8 +14634,6 @@
</span><span class="cx">                 E45390380EAFD637003695C8 /* WebCoreSystemInterfaceIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreSystemInterfaceIOS.mm; sourceTree = "<group>"; };
</span><span class="cx">                 E453903C0EAFD637003695C8 /* WidgetIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WidgetIOS.mm; sourceTree = "<group>"; };
</span><span class="cx">                 E45390AD0EAFF4B5003695C8 /* SystemMemoryIOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SystemMemoryIOS.cpp; sourceTree = "<group>"; };
</span><del>-                E46180281C8A06CD0026C02C /* RenderTreeUpdater.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderTreeUpdater.h; sourceTree = "<group>"; };
-                E461802A1C8A06D90026C02C /* RenderTreeUpdater.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTreeUpdater.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 E461802C1C8DD2900026C02C /* StyleRelations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleRelations.h; sourceTree = "<group>"; };
</span><span class="cx">                 E461802E1C8DD4D20026C02C /* StyleRelations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleRelations.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 E461D65C1BB0C7F000CB5645 /* AuthorStyleSheets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AuthorStyleSheets.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -23508,8 +23500,6 @@
</span><span class="cx">                                 1C0106FF192594DF008A4201 /* InlineTextBoxStyle.h */,
</span><span class="cx">                                 5824ABA81AE849C8009074B7 /* RenderTreePosition.cpp */,
</span><span class="cx">                                 5824ABA91AE849C8009074B7 /* RenderTreePosition.h */,
</span><del>-                                E461802A1C8A06D90026C02C /* RenderTreeUpdater.cpp */,
-                                E46180281C8A06CD0026C02C /* RenderTreeUpdater.h */,
</del><span class="cx">                                 E401E0A51C3C0CF700F34D10 /* StyleChange.cpp */,
</span><span class="cx">                                 E401E0A31C3C0B8300F34D10 /* StyleChange.h */,
</span><span class="cx">                                 E4D58EB617B4ED8900CBDCA8 /* StyleFontSizeFunctions.cpp */,
</span><span class="lines">@@ -23522,8 +23512,6 @@
</span><span class="cx">                                 E47A3AC41C5EAC7900CCBFA7 /* StyleSharingResolver.h */,
</span><span class="cx">                                 E4DEAA1517A93DC3000E0430 /* StyleTreeResolver.cpp */,
</span><span class="cx">                                 E4DEAA1617A93DC3000E0430 /* StyleTreeResolver.h */,
</span><del>-                                E42E76D91C7AF76C00E3614D /* StyleUpdate.cpp */,
-                                E42E76DB1C7AF77600E3614D /* StyleUpdate.h */,
</del><span class="cx">                         );
</span><span class="cx">                         path = style;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="lines">@@ -25959,7 +25947,6 @@
</span><span class="cx">                                 5C4304B1191AC908000E2BC0 /* EXTShaderTextureLOD.h in Headers */,
</span><span class="cx">                                 7728694F14F8882500F484DC /* EXTTextureFilterAnisotropic.h in Headers */,
</span><span class="cx">                                 A75E8B890E1DE2D6007F2481 /* FEBlend.h in Headers */,
</span><del>-                                E46180291C8A06CD0026C02C /* RenderTreeUpdater.h in Headers */,
</del><span class="cx">                                 A75E8B8B0E1DE2D6007F2481 /* FEColorMatrix.h in Headers */,
</span><span class="cx">                                 A75E8B8D0E1DE2D6007F2481 /* FEComponentTransfer.h in Headers */,
</span><span class="cx">                                 A75E8B8F0E1DE2D6007F2481 /* FEComposite.h in Headers */,
</span><span class="lines">@@ -26151,7 +26138,6 @@
</span><span class="cx">                                 A8EA79F70A1916DF00A8EF5F /* HTMLDListElement.h in Headers */,
</span><span class="cx">                                 93F198E508245E59001E9ABC /* HTMLDocument.h in Headers */,
</span><span class="cx">                                 977B3867122883E900B81FF8 /* HTMLDocumentParser.h in Headers */,
</span><del>-                                E42E76DC1C7AF77600E3614D /* StyleUpdate.h in Headers */,
</del><span class="cx">                                 93309DE8099E64920056E581 /* htmlediting.h in Headers */,
</span><span class="cx">                                 93F198E608245E59001E9ABC /* HTMLElement.h in Headers */,
</span><span class="cx">                                 A17C81230F2A5CF7005DAAEB /* HTMLElementFactory.h in Headers */,
</span><span class="lines">@@ -30537,7 +30523,6 @@
</span><span class="cx">                                 A84EBD780CB8C89200079609 /* JSStyleSheetListCustom.cpp in Sources */,
</span><span class="cx">                                 E1FF8F64180745D800132674 /* JSSubtleCrypto.cpp in Sources */,
</span><span class="cx">                                 E1FF8F681807460800132674 /* JSSubtleCryptoCustom.cpp in Sources */,
</span><del>-                                E461802B1C8A06D90026C02C /* RenderTreeUpdater.cpp in Sources */,
</del><span class="cx">                                 B20111070AB7740500DB0E68 /* JSSVGAElement.cpp in Sources */,
</span><span class="cx">                                 24D9129113CA951E00D21915 /* JSSVGAltGlyphDefElement.cpp in Sources */,
</span><span class="cx">                                 6515EC910D9723FF0063D49A /* JSSVGAltGlyphElement.cpp in Sources */,
</span><span class="lines">@@ -31076,7 +31061,6 @@
</span><span class="cx">                                 0F43C85D189E10CF00019AE2 /* PerformanceTiming.cpp in Sources */,
</span><span class="cx">                                 FD581FB41520F93B003A7A75 /* PeriodicWave.cpp in Sources */,
</span><span class="cx">                                 49D5DC2D0F423A73008F20FD /* PerspectiveTransformOperation.cpp in Sources */,
</span><del>-                                E42E76DA1C7AF76C00E3614D /* StyleUpdate.cpp in Sources */,
</del><span class="cx">                                 D0FF2A5D11F8C45A007E74E0 /* PingLoader.cpp in Sources */,
</span><span class="cx">                                 CD7D33431C7A123F00041293 /* PixelBufferConformerCV.cpp in Sources */,
</span><span class="cx">                                 0FDF45A71BD1C6FD00E4FA8C /* PlatformCAAnimation.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.cpp (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.cpp        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/css/StyleResolver.cpp        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -335,7 +335,7 @@
</span><span class="cx"> m_matchedPropertiesCacheAdditionsSinceLastSweep = 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-StyleResolver::State::State(Element& element, RenderStyle* parentStyle, RenderStyle* documentElementStyle, const RenderRegion* regionForStyling, const SelectorFilter* selectorFilter)
</del><ins>+StyleResolver::State::State(Element& element, RenderStyle* parentStyle, const RenderRegion* regionForStyling, const SelectorFilter* selectorFilter)
</ins><span class="cx"> : m_element(&element)
</span><span class="cx"> , m_parentStyle(parentStyle)
</span><span class="cx"> , m_regionForStyling(regionForStyling)
</span><span class="lines">@@ -348,10 +348,7 @@
</span><span class="cx">
</span><span class="cx"> auto& document = element.document();
</span><span class="cx"> auto* documentElement = document.documentElement();
</span><del>- if (!documentElement || documentElement == &element)
- m_rootElementStyle = document.renderStyle();
- else
- m_rootElementStyle = documentElementStyle ? documentElementStyle : documentElement->renderStyle();
</del><ins>+ m_rootElementStyle = (!documentElement || documentElement == &element) ? document.renderStyle() : documentElement->renderStyle();
</ins><span class="cx">
</span><span class="cx"> updateConversionData();
</span><span class="cx"> }
</span><span class="lines">@@ -378,7 +375,7 @@
</span><span class="cx"> {
</span><span class="cx"> RELEASE_ASSERT(!m_inLoadPendingImages);
</span><span class="cx">
</span><del>- m_state = State(element, parentStyle, m_overrideDocumentElementStyle.get(), regionForStyling, selectorFilter);
</del><ins>+ m_state = State(element, parentStyle, regionForStyling, selectorFilter);
</ins><span class="cx"> State& state = m_state;
</span><span class="cx">
</span><span class="cx"> if (state.parentStyle()) {
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolverh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.h (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.h        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/css/StyleResolver.h        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -164,8 +164,6 @@
</span><span class="cx">
</span><span class="cx"> const MediaQueryEvaluator& mediaQueryEvaluator() const { return *m_medium; }
</span><span class="cx">
</span><del>- void setOverrideDocumentElementStyle(RenderStyle* style) { m_overrideDocumentElementStyle = style; }
-
</del><span class="cx"> private:
</span><span class="cx"> Ref<RenderStyle> styleForKeyframe(const RenderStyle*, const StyleKeyframe*, KeyframeValue&);
</span><span class="cx">
</span><span class="lines">@@ -361,7 +359,7 @@
</span><span class="cx"> class State {
</span><span class="cx"> public:
</span><span class="cx"> State() { }
</span><del>- State(Element&, RenderStyle* parentStyle, RenderStyle* documentElementStyle = nullptr, const RenderRegion* regionForStyling = nullptr, const SelectorFilter* = nullptr);
</del><ins>+ State(Element&, RenderStyle* parentStyle, const RenderRegion* regionForStyling = nullptr, const SelectorFilter* = nullptr);
</ins><span class="cx">
</span><span class="cx"> public:
</span><span class="cx"> void clear();
</span><span class="lines">@@ -526,8 +524,6 @@
</span><span class="cx">
</span><span class="cx"> bool m_matchAuthorAndUserStyles;
</span><span class="cx">
</span><del>- RefPtr<RenderStyle> m_overrideDocumentElementStyle;
-
</del><span class="cx"> Vector<std::unique_ptr<MediaQueryResult>> m_viewportDependentMediaQueryResults;
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_DEVICE_ADAPTATION)
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/dom/Document.cpp        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -133,7 +133,6 @@
</span><span class="cx"> #include "ProcessingInstruction.h"
</span><span class="cx"> #include "RenderChildIterator.h"
</span><span class="cx"> #include "RenderLayerCompositor.h"
</span><del>-#include "RenderTreeUpdater.h"
</del><span class="cx"> #include "RenderView.h"
</span><span class="cx"> #include "RenderWidget.h"
</span><span class="cx"> #include "ResourceLoadObserver.h"
</span><span class="lines">@@ -1927,22 +1926,15 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Style::TreeResolver resolver(*this);
</span><del>- auto styleUpdate = resolver.resolve(change);
</del><ins>+ resolver.resolve(change);
</ins><span class="cx">
</span><ins>+ updatedCompositingLayers = frameView.updateCompositingLayersAfterStyleChange();
+
</ins><span class="cx"> clearNeedsStyleRecalc();
</span><span class="cx"> clearChildNeedsStyleRecalc();
</span><span class="cx"> unscheduleStyleRecalc();
</span><span class="cx">
</span><span class="cx"> m_inStyleRecalc = false;
</span><del>-
- if (styleUpdate) {
- TemporaryChange<bool> inRenderTreeUpdate(m_inRenderTreeUpdate, true);
-
- RenderTreeUpdater updater(*this);
- updater.commit(WTFMove(styleUpdate));
- }
-
- updatedCompositingLayers = frameView.updateCompositingLayersAfterStyleChange();
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // If we wanted to call implicitClose() during recalcStyle, do so now that we're finished.
</span><span class="lines">@@ -2060,10 +2052,7 @@
</span><span class="cx"> TemporaryChange<bool> change(m_ignorePendingStylesheets, true);
</span><span class="cx"> auto elementStyle = element.resolveStyle(parentStyle);
</span><span class="cx">
</span><del>- if (elementStyle.relations) {
- Style::Update emptyUpdate(*this);
- Style::commitRelations(WTFMove(elementStyle.relations), emptyUpdate);
- }
</del><ins>+ Style::commitRelationsToDocument(WTFMove(elementStyle.relations));
</ins><span class="cx">
</span><span class="cx"> return WTFMove(elementStyle.renderStyle);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.h (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.h        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/dom/Document.h        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -1244,8 +1244,7 @@
</span><span class="cx"> void setNeedsNotifyRemoveAllPendingStylesheet() { m_needsNotifyRemoveAllPendingStylesheet = true; }
</span><span class="cx"> void clearStyleResolver();
</span><span class="cx">
</span><del>- bool inStyleRecalc() const { return m_inStyleRecalc; }
- bool inRenderTreeUpdate() const { return m_inRenderTreeUpdate; }
</del><ins>+ bool inStyleRecalc() { return m_inStyleRecalc; }
</ins><span class="cx">
</span><span class="cx"> // Return a Locale for the default locale if the argument is null or empty.
</span><span class="cx"> Locale& getCachedLocale(const AtomicString& locale = nullAtom);
</span><span class="lines">@@ -1509,7 +1508,6 @@
</span><span class="cx"> bool m_pendingStyleRecalcShouldForce;
</span><span class="cx"> bool m_inStyleRecalc;
</span><span class="cx"> bool m_closeAfterStyleRecalc;
</span><del>- bool m_inRenderTreeUpdate { false };
</del><span class="cx">
</span><span class="cx"> bool m_gotoAnchorNeededAfterStylesheetsLoad;
</span><span class="cx"> bool m_isDNSPrefetchEnabled;
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.cpp (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.cpp        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/dom/Element.cpp        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -2564,6 +2564,8 @@
</span><span class="cx"> void Element::setChildIndex(unsigned index)
</span><span class="cx"> {
</span><span class="cx"> ElementRareData& rareData = ensureElementRareData();
</span><ins>+ if (RenderStyle* style = renderStyle())
+ style->setUnique();
</ins><span class="cx"> rareData.setChildIndex(index);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.cpp (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.cpp        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/dom/Node.cpp        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -772,10 +772,6 @@
</span><span class="cx"> if (!inRenderedDocument())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- // FIXME: This should eventually be an ASSERT.
- if (document().inRenderTreeUpdate())
- return;
-
</del><span class="cx"> StyleChangeType existingChangeType = styleChangeType();
</span><span class="cx"> if (changeType > existingChangeType)
</span><span class="cx"> setStyleChange(changeType);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -381,6 +381,10 @@
</span><span class="cx"> bool isBodyRenderer = isBody();
</span><span class="cx"> bool isDocElementRenderer = isDocumentElementRenderer();
</span><span class="cx">
</span><ins>+ // Set the text color if we're the body.
+ if (isBodyRenderer)
+ document().setTextColor(newStyle.visitedDependentColor(CSSPropertyColor));
+
</ins><span class="cx"> if (isDocElementRenderer || isBodyRenderer) {
</span><span class="cx"> // Propagate the new writing mode and direction up to the RenderView.
</span><span class="cx"> auto* documentElementRenderer = document().documentElement()->renderer();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderElement.h (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderElement.h        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/rendering/RenderElement.h        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -50,6 +50,9 @@
</span><span class="cx"> // continue even if the style isn't different from the current style.
</span><span class="cx"> void setStyle(Ref<RenderStyle>&&, StyleDifference minimalStyleDifference = StyleDifferenceEqual);
</span><span class="cx">
</span><ins>+ // Called to update a style that is allowed to trigger animations.
+ void setAnimatableStyle(Ref<RenderStyle>&&, StyleDifference minimalStyleDifference);
+
</ins><span class="cx"> // The pseudo element style can be cached or uncached. Use the cached method if the pseudo element doesn't respect
</span><span class="cx"> // any pseudo classes (and therefore has no concept of changing state).
</span><span class="cx"> RenderStyle* getCachedPseudoStyle(PseudoId, RenderStyle* parentStyle = nullptr) const;
</span><span class="lines">@@ -340,6 +343,15 @@
</span><span class="cx"> static bool s_noLongerAffectsParentBlock;
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+inline void RenderElement::setAnimatableStyle(Ref<RenderStyle>&& style, StyleDifference minimalStyleDifference)
+{
+ Ref<RenderStyle> animatedStyle = WTFMove(style);
+ if (animation().updateAnimations(*this, animatedStyle, animatedStyle))
+ minimalStyleDifference = std::max(minimalStyleDifference, StyleDifferenceRecompositeLayer);
+
+ setStyle(WTFMove(animatedStyle), minimalStyleDifference);
+}
+
</ins><span class="cx"> inline void RenderElement::setAncestorLineBoxDirty(bool f)
</span><span class="cx"> {
</span><span class="cx"> m_ancestorLineBoxDirty = f;
</span></span></pre></div>
<a id="trunkSourceWebCorestyleRenderTreePositioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/RenderTreePosition.cpp (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/RenderTreePosition.cpp        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/style/RenderTreePosition.cpp        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx"> #include "RenderTreePosition.h"
</span><span class="cx">
</span><span class="cx"> #include "ComposedTreeIterator.h"
</span><del>-#include "HTMLSlotElement.h"
</del><span class="cx"> #include "PseudoElement.h"
</span><span class="cx"> #include "RenderObject.h"
</span><span class="cx"> #include "ShadowRoot.h"
</span><span class="lines">@@ -83,22 +82,13 @@
</span><span class="cx"> if (node.isAfterPseudoElement())
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- auto composedDescendants = composedTreeDescendants(*parentElement);
- auto it = node.isBeforePseudoElement() ? composedDescendants.begin() : composedDescendants.at(node);
- auto end = composedDescendants.end();
</del><ins>+ auto composedChildren = composedTreeChildren(*parentElement);
</ins><span class="cx">
</span><del>- while (it != end) {
- auto& node = *it;
- bool hasDisplayContents = is<HTMLSlotElement>(node);
- if (hasDisplayContents) {
- it.traverseNext();
- continue;
- }
- RenderObject* renderer = node.renderer();
</del><ins>+ auto it = node.isBeforePseudoElement() ? composedChildren.begin() : composedChildren.at(node);
+ for (auto end = composedChildren.end(); it != end; ++it) {
+ RenderObject* renderer = it->renderer();
</ins><span class="cx"> if (renderer && !isRendererReparented(*renderer))
</span><span class="cx"> return renderer;
</span><del>-
- it.traverseNextSkippingChildren();
</del><span class="cx"> }
</span><span class="cx"> if (PseudoElement* after = parentElement->afterPseudoElement())
</span><span class="cx"> return after->renderer();
</span></span></pre></div>
<a id="trunkSourceWebCorestyleRenderTreeUpdatercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/style/RenderTreeUpdater.cpp (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/RenderTreeUpdater.cpp        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/style/RenderTreeUpdater.cpp        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -1,511 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "RenderTreeUpdater.h"
-
-#include "AXObjectCache.h"
-#include "ComposedTreeAncestorIterator.h"
-#include "ComposedTreeIterator.h"
-#include "Document.h"
-#include "Element.h"
-#include "FlowThreadController.h"
-#include "HTMLSlotElement.h"
-#include "InspectorInstrumentation.h"
-#include "PseudoElement.h"
-#include "RenderFullScreen.h"
-#include "RenderNamedFlowThread.h"
-#include "StyleResolver.h"
-#include "StyleTreeResolver.h"
-
-namespace WebCore {
-
-RenderTreeUpdater::Parent::Parent(ContainerNode& root)
- : element(is<Document>(root) ? nullptr : downcast<Element>(&root))
- , renderTreePosition(RenderTreePosition(*root.renderer()))
-{
-}
-
-RenderTreeUpdater::Parent::Parent(Element& element, Style::Change styleChange)
- : element(&element)
- , styleChange(styleChange)
- , renderTreePosition(element.renderer() ? makeOptional(RenderTreePosition(*element.renderer())) : Nullopt)
-{
-}
-
-
-RenderTreeUpdater::RenderTreeUpdater(Document& document)
- : m_document(document)
-{
-}
-
-// Slots have implicit display:contents until it is supported for reals.
-static bool hasDisplayContents(const Node& node)
-{
- return is<HTMLSlotElement>(node);
-}
-
-static ContainerNode& findRenderingRoot(ContainerNode& node)
-{
- auto& document = node.document();
- for (ComposedTreeAncestorIterator it(document, node), end(document); it != end; ++it) {
- if (it->renderer())
- return *it;
- ASSERT(hasDisplayContents(*it));
- }
- ASSERT_NOT_REACHED();
- return document;
-}
-
-void RenderTreeUpdater::commit(std::unique_ptr<const Style::Update> styleUpdate)
-{
- ASSERT(&m_document == &styleUpdate->document());
-
- if (!m_document.shouldCreateRenderers())
- return;
-
- m_styleUpdate = WTFMove(styleUpdate);
-
- for (auto* root : m_styleUpdate->roots())
- updateRenderTree(findRenderingRoot(*root));
-
- m_styleUpdate = nullptr;
-}
-
-static bool shouldCreateRenderer(const Element& element, const RenderElement& parentRenderer)
-{
- if (!parentRenderer.canHaveChildren() && !(element.isPseudoElement() && parentRenderer.canHaveGeneratedChildren()))
- return false;
- if (parentRenderer.element() && !parentRenderer.element()->childShouldCreateRenderer(element))
- return false;
- return true;
-}
-
-void RenderTreeUpdater::updateRenderTree(ContainerNode& root)
-{
- ASSERT(root.renderer());
- ASSERT(m_parentStack.isEmpty());
-
- m_parentStack.append(Parent(root));
-
- auto descendants = composedTreeDescendants(root);
- auto it = descendants.begin();
- auto end = descendants.end();
-
- // FIXME: SVG <use> element may cause tree mutations during style recalc.
- it.dropAssertions();
-
- while (it != end) {
- popParentsToDepth(it.depth());
-
- auto& node = *it;
-
- if (auto* renderer = node.renderer())
- renderTreePosition().invalidateNextSibling(*renderer);
-
- if (is<Text>(node)) {
- auto& text = downcast<Text>(node);
- if (parent().styleChange == Style::Detach || m_styleUpdate->textUpdate(text) || m_invalidatedWhitespaceOnlyTextSiblings.contains(&text))
- updateTextRenderer(text);
-
- it.traverseNextSkippingChildren();
- continue;
- }
-
- auto& element = downcast<Element>(node);
-
- auto* elementUpdate = m_styleUpdate->elementUpdate(element);
-
- auto changeType = Style::NoChange;
- if (elementUpdate) {
- if (hasDisplayContents(element)) {
- if (!shouldCreateRenderer(element, renderTreePosition().parent())) {
- it.traverseNextSkippingChildren();
- continue;
- }
- pushParent(element, parent().styleChange);
- it.traverseNext();
- continue;
- }
-
- updateElementRenderer(element, *elementUpdate);
- changeType = elementUpdate->change;
- }
-
- if (!element.renderer() || !elementUpdate) {
- it.traverseNextSkippingChildren();
- continue;
- }
-
- pushParent(element, changeType);
-
- it.traverseNext();
- }
-
- popParentsToDepth(0);
-
- m_invalidatedWhitespaceOnlyTextSiblings.clear();
-}
-
-RenderTreePosition& RenderTreeUpdater::renderTreePosition()
-{
- for (unsigned i = m_parentStack.size(); i; --i) {
- if (auto& position = m_parentStack[i - 1].renderTreePosition)
- return *position;
- }
- ASSERT_NOT_REACHED();
- return *m_parentStack.last().renderTreePosition;
-}
-
-void RenderTreeUpdater::pushParent(Element& element, Style::Change changeType)
-{
- m_parentStack.append(Parent(element, changeType));
-
- updateBeforeOrAfterPseudoElement(element, BEFORE);
-}
-
-void RenderTreeUpdater::popParent()
-{
- auto& parent = m_parentStack.last();
-
- if (parent.element) {
- updateBeforeOrAfterPseudoElement(*parent.element, AFTER);
-
- if (parent.element->hasCustomStyleResolveCallbacks() && parent.styleChange == Style::Detach && parent.element->renderer())
- parent.element->didAttachRenderers();
- }
- m_parentStack.removeLast();
-}
-
-void RenderTreeUpdater::popParentsToDepth(unsigned depth)
-{
- ASSERT(m_parentStack.size() >= depth);
-
- while (m_parentStack.size() > depth)
- popParent();
-}
-
-static bool pseudoStyleCacheIsInvalid(RenderElement* renderer, RenderStyle* newStyle)
-{
- const RenderStyle& currentStyle = renderer->style();
-
- const PseudoStyleCache* pseudoStyleCache = currentStyle.cachedPseudoStyles();
- if (!pseudoStyleCache)
- return false;
-
- for (auto& cache : *pseudoStyleCache) {
- RefPtr<RenderStyle> newPseudoStyle;
- PseudoId pseudoId = cache->styleType();
- if (pseudoId == FIRST_LINE || pseudoId == FIRST_LINE_INHERITED)
- newPseudoStyle = renderer->uncachedFirstLineStyle(newStyle);
- else
- newPseudoStyle = renderer->getUncachedPseudoStyle(PseudoStyleRequest(pseudoId), newStyle, newStyle);
- if (!newPseudoStyle)
- return true;
- if (*newPseudoStyle != *cache) {
- if (pseudoId < FIRST_INTERNAL_PSEUDOID)
- newStyle->setHasPseudoStyle(pseudoId);
- newStyle->addCachedPseudoStyle(newPseudoStyle);
- if (pseudoId == FIRST_LINE || pseudoId == FIRST_LINE_INHERITED) {
- // FIXME: We should do an actual diff to determine whether a repaint vs. layout
- // is needed, but for now just assume a layout will be required. The diff code
- // in RenderObject::setStyle would need to be factored out so that it could be reused.
- renderer->setNeedsLayoutAndPrefWidthsRecalc();
- }
- return true;
- }
- }
- return false;
-}
-
-void RenderTreeUpdater::updateElementRenderer(Element& element, const Style::ElementUpdate& update)
-{
- bool shouldTearDownRenderers = update.change == Style::Detach && (element.renderer() || element.isNamedFlowContentNode());
- if (shouldTearDownRenderers)
- detachRenderTree(element, Style::ReattachDetach);
-
- bool shouldCreateNewRenderer = !element.renderer() && update.style;
- if (shouldCreateNewRenderer) {
- if (element.hasCustomStyleResolveCallbacks())
- element.willAttachRenderers();
- createRenderer(element, *update.style);
- invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded(element);
- return;
- }
-
- if (!element.renderer())
- return;
- auto& renderer = *element.renderer();
-
- if (update.isSynthetic) {
- renderer.setStyle(*update.style, StyleDifferenceRecompositeLayer);
- return;
- }
-
- if (update.change == Style::NoChange) {
- if (pseudoStyleCacheIsInvalid(&renderer, update.style.get()) || (parent().styleChange == Style::Force && renderer.requiresForcedStyleRecalcPropagation())) {
- renderer.setStyle(*update.style, StyleDifferenceEqual);
- return;
- }
- return;
- }
-
- renderer.setStyle(*update.style, StyleDifferenceEqual);
-}
-
-#if ENABLE(CSS_REGIONS)
-static RenderNamedFlowThread* moveToFlowThreadIfNeeded(Element& element, const RenderStyle& style)
-{
- if (!element.shouldMoveToFlowThread(style))
- return nullptr;
-
- FlowThreadController& flowThreadController = element.document().renderView()->flowThreadController();
- RenderNamedFlowThread& parentFlowRenderer = flowThreadController.ensureRenderFlowThreadWithName(style.flowThread());
- flowThreadController.registerNamedFlowContentElement(element, parentFlowRenderer);
- return &parentFlowRenderer;
-}
-#endif
-
-void RenderTreeUpdater::createRenderer(Element& element, RenderStyle& style)
-{
- if (!shouldCreateRenderer(element, renderTreePosition().parent()))
- return;
-
- RenderNamedFlowThread* parentFlowRenderer = nullptr;
-#if ENABLE(CSS_REGIONS)
- parentFlowRenderer = moveToFlowThreadIfNeeded(element, style);
-#endif
-
- if (!element.rendererIsNeeded(style))
- return;
-
- renderTreePosition().computeNextSibling(element);
-
- RenderTreePosition insertionPosition = parentFlowRenderer
- ? RenderTreePosition(*parentFlowRenderer, parentFlowRenderer->nextRendererForElement(element))
- : renderTreePosition();
-
- RenderElement* newRenderer = element.createElementRenderer(style, insertionPosition).leakPtr();
- if (!newRenderer)
- return;
- if (!insertionPosition.canInsert(*newRenderer)) {
- newRenderer->destroy();
- 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->setFlowThreadState(insertionPosition.parent().flowThreadState());
-
- element.setRenderer(newRenderer);
-
- Ref<RenderStyle> animatedStyle = newRenderer->style();
- newRenderer->animation().updateAnimations(*newRenderer, animatedStyle, animatedStyle);
- newRenderer->setStyleInternal(WTFMove(animatedStyle));
-
- newRenderer->initializeStyle();
-
-#if ENABLE(FULLSCREEN_API)
- if (m_document.webkitIsFullScreen() && m_document.webkitCurrentFullScreenElement() == &element) {
- newRenderer = RenderFullScreen::wrapRenderer(newRenderer, &insertionPosition.parent(), m_document);
- if (!newRenderer)
- return;
- }
-#endif
- // Note: Adding newRenderer instead of renderer(). renderer() may be a child of newRenderer.
- insertionPosition.insert(*newRenderer);
-
- if (AXObjectCache* cache = m_document.axObjectCache())
- cache->updateCacheAfterNodeIsAttached(&element);
-}
-
-static bool textRendererIsNeeded(const Text& textNode, const RenderTreePosition& renderTreePosition)
-{
- const RenderElement& parentRenderer = renderTreePosition.parent();
- if (!parentRenderer.canHaveChildren())
- return false;
- if (parentRenderer.element() && !parentRenderer.element()->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 && previousRenderer->isBR()) // <span><br/> <br/></span>
- return false;
-
- if (parentRenderer.isRenderInline()) {
- // <span><div/> <div/></span>
- if (previousRenderer && !previousRenderer->isInline())
- return false;
- } else {
- if (parentRenderer.isRenderBlock() && !parentRenderer.childrenInline() && (!previousRenderer || !previousRenderer->isInline()))
- return false;
-
- RenderObject* first = parentRenderer.firstChild();
- while (first && first->isFloatingOrOutOfFlowPositioned())
- first = first->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 createTextRenderer(Text& textNode, RenderTreePosition& renderTreePosition)
-{
- ASSERT(!textNode.renderer());
-
- 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->setFlowThreadState(renderTreePosition.parent().flowThreadState());
-
- textNode.setRenderer(newRenderer.get());
- renderTreePosition.insert(*newRenderer.leakPtr());
-}
-
-void RenderTreeUpdater::updateTextRenderer(Text& text)
-{
- bool hasRenderer = text.renderer();
- bool needsRenderer = textRendererIsNeeded(text, renderTreePosition());
- if (hasRenderer) {
- if (needsRenderer)
- return;
- Style::detachTextRenderer(text);
- invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded(text);
- return;
- }
- if (!needsRenderer)
- return;
- createTextRenderer(text, renderTreePosition());
- invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded(text);
-}
-
-void RenderTreeUpdater::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded(Node& 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->nextSibling()) {
- if (is<Element>(*sibling)) {
- if (m_styleUpdate->elementUpdate(downcast<Element>(*sibling)))
- return;
- // Text renderers beyond rendered elements can't be affected.
- if (!sibling->renderer() || RenderTreePosition::isRendererReparented(*sibling->renderer()))
- continue;
- return;
- }
- if (!is<Text>(*sibling))
- continue;
- Text& textSibling = downcast<Text>(*sibling);
- if (m_styleUpdate->textUpdate(textSibling))
- return;
- if (!textSibling.containsOnlyWhitespace())
- continue;
- m_invalidatedWhitespaceOnlyTextSiblings.add(&textSibling);
- }
-}
-
-static bool needsPseudoElement(Element& current, PseudoId pseudoId)
-{
- if (!current.renderer() || !current.renderer()->canHaveGeneratedChildren())
- return false;
- if (current.isPseudoElement())
- return false;
- if (!pseudoElementRendererIsNeeded(current.renderer()->getCachedPseudoStyle(pseudoId)))
- return false;
- return true;
-}
-
-void RenderTreeUpdater::updateBeforeOrAfterPseudoElement(Element& current, PseudoId pseudoId)
-{
- PseudoElement* pseudoElement = pseudoId == BEFORE ? current.beforePseudoElement() : current.afterPseudoElement();
-
- auto* renderer = pseudoElement ? pseudoElement->renderer() : nullptr;
- if (renderer)
- renderTreePosition().invalidateNextSibling(*renderer);
-
- bool needsPseudoElement = WebCore::needsPseudoElement(current, pseudoId);
- if (!needsPseudoElement) {
- if (pseudoElement) {
- if (pseudoId == BEFORE)
- current.clearBeforePseudoElement();
- else
- current.clearAfterPseudoElement();
- }
- return;
- }
-
- Style::ElementUpdate elementUpdate;
-
- Ref<RenderStyle> newStyle = *current.renderer()->getCachedPseudoStyle(pseudoId, &current.renderer()->style());
-
- if (renderer && m_document.frame()->animation().updateAnimations(*renderer, newStyle, newStyle))
- elementUpdate.isSynthetic = true;
-
- elementUpdate.change = renderer ? Style::determineChange(renderer->style(), newStyle) : Style::Detach;
- elementUpdate.style = WTFMove(newStyle);
-
- if (elementUpdate.change == Style::NoChange)
- return;
-
- if (!pseudoElement) {
- auto newPseudoElement = PseudoElement::create(current, pseudoId);
- pseudoElement = newPseudoElement.ptr();
- InspectorInstrumentation::pseudoElementCreated(m_document.page(), newPseudoElement);
- if (pseudoId == BEFORE)
- current.setBeforePseudoElement(WTFMove(newPseudoElement));
- else
- current.setAfterPseudoElement(WTFMove(newPseudoElement));
- }
-
- updateElementRenderer(*pseudoElement, elementUpdate);
-
- if (elementUpdate.change == Style::Detach)
- pseudoElement->didAttachRenderers();
- else
- pseudoElement->didRecalcStyle(elementUpdate.change);
-}
-
-}
</del></span></pre></div>
<a id="trunkSourceWebCorestyleRenderTreeUpdaterh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/style/RenderTreeUpdater.h (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/RenderTreeUpdater.h        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/style/RenderTreeUpdater.h        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -1,85 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef RenderTreeUpdater_h
-#define RenderTreeUpdater_h
-
-#include "RenderTreePosition.h"
-#include "StyleChange.h"
-#include "StyleUpdate.h"
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
-#include <wtf/ListHashSet.h>
-#include <wtf/RefPtr.h>
-#include <wtf/Vector.h>
-
-namespace WebCore {
-
-class ContainerNode;
-class Document;
-class Element;
-class Node;
-class RenderStyle;
-class Text;
-
-class RenderTreeUpdater {
-public:
- RenderTreeUpdater(Document&);
-
- void commit(std::unique_ptr<const Style::Update>);
-
-private:
- void updateRenderTree(ContainerNode& root);
- void updateTextRenderer(Text&);
- void updateElementRenderer(Element&, const Style::ElementUpdate&);
- void createRenderer(Element&, RenderStyle&);
- void invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded(Node&);
- void updateBeforeOrAfterPseudoElement(Element&, PseudoId);
-
- struct Parent {
- Element* element { nullptr };
- Style::Change styleChange { Style::NoChange };
- Optional<RenderTreePosition> renderTreePosition;
-
- Parent(ContainerNode& root);
- Parent(Element&, Style::Change);
- };
- Parent& parent() { return m_parentStack.last(); }
- RenderTreePosition& renderTreePosition();
-
- void pushParent(Element&, Style::Change);
- void popParent();
- void popParentsToDepth(unsigned depth);
-
- Document& m_document;
- std::unique_ptr<const Style::Update> m_styleUpdate;
-
- Vector<Parent> m_parentStack;
-
- HashSet<Text*> m_invalidatedWhitespaceOnlyTextSiblings;
-};
-
-}
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorestyleStyleRelationscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleRelations.cpp (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleRelations.cpp        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/style/StyleRelations.cpp        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> #include "Element.h"
</span><span class="cx"> #include "NodeRenderStyle.h"
</span><span class="cx"> #include "RenderStyle.h"
</span><del>-#include "StyleUpdate.h"
</del><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> namespace Style {
</span><span class="lines">@@ -86,7 +85,7 @@
</span><span class="cx"> return remainingRelations;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void commitRelations(std::unique_ptr<Relations> relations, Update& update)
</del><ins>+void commitRelationsToDocument(std::unique_ptr<Relations> relations)
</ins><span class="cx"> {
</span><span class="cx"> if (!relations)
</span><span class="cx"> return;
</span><span class="lines">@@ -125,20 +124,18 @@
</span><span class="cx"> element.setChildrenAffectedByLastChildRules();
</span><span class="cx"> break;
</span><span class="cx"> case Relation::FirstChild:
</span><del>- if (auto* style = update.elementStyle(element))
</del><ins>+ if (auto* style = element.renderStyle())
</ins><span class="cx"> style->setFirstChildState();
</span><span class="cx"> break;
</span><span class="cx"> case Relation::LastChild:
</span><del>- if (auto* style = update.elementStyle(element))
</del><ins>+ if (auto* style = element.renderStyle())
</ins><span class="cx"> style->setLastChildState();
</span><span class="cx"> break;
</span><span class="cx"> case Relation::NthChildIndex:
</span><del>- if (auto* style = update.elementStyle(element))
- style->setUnique();
</del><span class="cx"> element.setChildIndex(relation.value);
</span><span class="cx"> break;
</span><span class="cx"> case Relation::Unique:
</span><del>- if (auto* style = update.elementStyle(element))
</del><ins>+ if (auto* style = element.renderStyle())
</ins><span class="cx"> style->setUnique();
</span><span class="cx"> break;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleRelationsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleRelations.h (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleRelations.h        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/style/StyleRelations.h        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -35,8 +35,6 @@
</span><span class="cx">
</span><span class="cx"> namespace Style {
</span><span class="cx">
</span><del>-class Update;
-
</del><span class="cx"> struct Relation {
</span><span class="cx"> enum Type {
</span><span class="cx"> AffectedByActive,
</span><span class="lines">@@ -68,7 +66,7 @@
</span><span class="cx"> using Relations = Vector<Relation, 8>;
</span><span class="cx">
</span><span class="cx"> std::unique_ptr<Relations> commitRelationsToRenderStyle(RenderStyle&, const Element&, const Relations&);
</span><del>-void commitRelations(std::unique_ptr<Relations>, Update&);
</del><ins>+void commitRelationsToDocument(std::unique_ptr<Relations>);
</ins><span class="cx">
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleSharingResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleSharingResolver.cpp (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleSharingResolver.cpp        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/style/StyleSharingResolver.cpp        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx"> #include "NodeRenderStyle.h"
</span><span class="cx"> #include "RenderStyle.h"
</span><span class="cx"> #include "SVGElement.h"
</span><del>-#include "StyleUpdate.h"
</del><span class="cx"> #include "StyledElement.h"
</span><span class="cx"> #include "VisitedLinkState.h"
</span><span class="cx"> #include "WebVTTElement.h"
</span><span class="lines">@@ -45,7 +44,6 @@
</span><span class="cx"> static const unsigned cStyleSearchThreshold = 10;
</span><span class="cx">
</span><span class="cx"> struct SharingResolver::Context {
</span><del>- const Update& update;
</del><span class="cx"> const StyledElement& element;
</span><span class="cx"> bool elementAffectedByClassRules;
</span><span class="cx"> EInsideLink elementLinkState;
</span><span class="lines">@@ -69,7 +67,7 @@
</span><span class="cx"> return is<HTMLElement>(element) && downcast<HTMLElement>(element).hasDirectionAuto();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<RenderStyle> SharingResolver::resolve(const Element& searchElement, const Update& update)
</del><ins>+RefPtr<RenderStyle> SharingResolver::resolve(const Element& searchElement)
</ins><span class="cx"> {
</span><span class="cx"> if (!is<StyledElement>(searchElement))
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -79,7 +77,7 @@
</span><span class="cx"> auto& parentElement = *element.parentElement();
</span><span class="cx"> if (parentElement.shadowRoot())
</span><span class="cx"> return nullptr;
</span><del>- if (!update.elementStyle(parentElement))
</del><ins>+ if (!parentElement.renderStyle())
</ins><span class="cx"> return nullptr;
</span><span class="cx"> // If the element has inline style it is probably unique.
</span><span class="cx"> if (element.inlineStyle())
</span><span class="lines">@@ -97,7 +95,6 @@
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> Context context {
</span><del>- update,
</del><span class="cx"> element,
</span><span class="cx"> element.hasClass() && classNamesAffectedByRules(element.classNames()),
</span><span class="cx"> m_document.visitedLinkState().determineLinkState(element)
</span><span class="lines">@@ -130,7 +127,7 @@
</span><span class="cx">
</span><span class="cx"> m_elementsSharingStyle.add(&element, shareElement);
</span><span class="cx">
</span><del>- return RenderStyle::clone(update.elementStyle(*shareElement));
</del><ins>+ return RenderStyle::clone(shareElement->renderStyle());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> StyledElement* SharingResolver::findSibling(const Context& context, Node* node, unsigned& count) const
</span><span class="lines">@@ -198,7 +195,7 @@
</span><span class="cx"> bool SharingResolver::canShareStyleWithElement(const Context& context, const StyledElement& candidateElement) const
</span><span class="cx"> {
</span><span class="cx"> auto& element = context.element;
</span><del>- auto* style = context.update.elementStyle(candidateElement);
</del><ins>+ auto* style = candidateElement.renderStyle();
</ins><span class="cx"> if (!style)
</span><span class="cx"> return false;
</span><span class="cx"> if (style->unique())
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleSharingResolverh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleSharingResolver.h (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleSharingResolver.h        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/style/StyleSharingResolver.h        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -42,13 +42,11 @@
</span><span class="cx">
</span><span class="cx"> namespace Style {
</span><span class="cx">
</span><del>-class Update;
-
</del><span class="cx"> class SharingResolver {
</span><span class="cx"> public:
</span><span class="cx"> SharingResolver(const Document&, const DocumentRuleSets&, const SelectorFilter&);
</span><span class="cx">
</span><del>- RefPtr<RenderStyle> resolve(const Element&, const Update&);
</del><ins>+ RefPtr<RenderStyle> resolve(const Element&);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> struct Context;
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleTreeResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleTreeResolver.cpp (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleTreeResolver.cpp        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/style/StyleTreeResolver.cpp        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> * (C) 2001 Peter Kelly (pmk@post.com)
</span><span class="cx"> * (C) 2001 Dirk Mueller (mueller@kde.org)
</span><span class="cx"> * (C) 2007 David Smith (catfish.man@gmail.com)
</span><del>- * Copyright (C) 2004-2010, 2012-2016 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2004-2010, 2012-2014 Apple Inc. All rights reserved.
</ins><span class="cx"> * (C) 2007 Eric Seidel (eric@webkit.org)
</span><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="lines">@@ -26,17 +26,27 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "StyleTreeResolver.h"
</span><span class="cx">
</span><ins>+#include "AXObjectCache.h"
+#include "AnimationController.h"
</ins><span class="cx"> #include "AuthorStyleSheets.h"
</span><span class="cx"> #include "CSSFontSelector.h"
</span><span class="cx"> #include "ComposedTreeAncestorIterator.h"
</span><span class="cx"> #include "ComposedTreeIterator.h"
</span><span class="cx"> #include "ElementIterator.h"
</span><del>-#include "HTMLBodyElement.h"
</del><ins>+#include "ElementRareData.h"
+#include "FlowThreadController.h"
</ins><span class="cx"> #include "HTMLSlotElement.h"
</span><ins>+#include "InspectorInstrumentation.h"
</ins><span class="cx"> #include "LoaderStrategy.h"
</span><span class="cx"> #include "MainFrame.h"
</span><span class="cx"> #include "NodeRenderStyle.h"
</span><ins>+#include "NodeTraversal.h"
</ins><span class="cx"> #include "PlatformStrategies.h"
</span><ins>+#include "RenderFullScreen.h"
+#include "RenderNamedFlowThread.h"
+#include "RenderText.h"
+#include "RenderTreePosition.h"
+#include "RenderWidget.h"
</ins><span class="cx"> #include "Settings.h"
</span><span class="cx"> #include "ShadowRoot.h"
</span><span class="cx"> #include "StyleResolver.h"
</span><span class="lines">@@ -50,7 +60,10 @@
</span><span class="cx">
</span><span class="cx"> namespace Style {
</span><span class="cx">
</span><ins>+enum DetachType { NormalDetach, ReattachDetach };
+
</ins><span class="cx"> static void attachTextRenderer(Text&, RenderTreePosition&);
</span><ins>+static void detachRenderTree(Element&, DetachType);
</ins><span class="cx"> static void resolveTextNode(Text&, RenderTreePosition&);
</span><span class="cx">
</span><span class="cx"> class SelectorFilterPusher {
</span><span class="lines">@@ -118,14 +131,16 @@
</span><span class="cx"> TreeResolver::Parent::Parent(Document& document, Change change)
</span><span class="cx"> : element(nullptr)
</span><span class="cx"> , style(*document.renderStyle())
</span><ins>+ , renderTreePosition(*document.renderView())
</ins><span class="cx"> , change(change)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-TreeResolver::Parent::Parent(Element& element, ElementUpdate& update)
</del><ins>+TreeResolver::Parent::Parent(Element& element, RenderStyle& style, RenderTreePosition renderTreePosition, Change change)
</ins><span class="cx"> : element(&element)
</span><del>- , style(*update.style)
- , change(update.change)
</del><ins>+ , style(style)
+ , renderTreePosition(renderTreePosition)
+ , change(change)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -145,6 +160,17 @@
</span><span class="cx"> return m_scopeStack.removeLast();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static bool shouldCreateRenderer(const Element& element, const RenderElement& parentRenderer)
+{
+ if (!element.document().shouldCreateRenderers())
+ return false;
+ if (!parentRenderer.canHaveChildren() && !(element.isPseudoElement() && parentRenderer.canHaveGeneratedChildren()))
+ return false;
+ if (parentRenderer.element() && !parentRenderer.element()->childShouldCreateRenderer(element))
+ return false;
+ return true;
+}
+
</ins><span class="cx"> Ref<RenderStyle> TreeResolver::styleForElement(Element& element, RenderStyle& inheritedStyle)
</span><span class="cx"> {
</span><span class="cx"> if (!m_document.haveStylesheetsLoaded() && !element.renderer()) {
</span><span class="lines">@@ -152,29 +178,89 @@
</span><span class="cx"> return *placeholderStyle;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- scope().styleResolver.setOverrideDocumentElementStyle(m_documentElementStyle.get());
-
</del><span class="cx"> if (element.hasCustomStyleResolveCallbacks()) {
</span><del>- RenderStyle* shadowHostStyle = scope().shadowRoot ? m_update->elementStyle(*scope().shadowRoot->host()) : nullptr;
</del><ins>+ RenderStyle* shadowHostStyle = scope().shadowRoot ? scope().shadowRoot->host()->renderStyle() : nullptr;
</ins><span class="cx"> if (auto customStyle = element.resolveCustomStyle(inheritedStyle, shadowHostStyle)) {
</span><del>- if (customStyle->relations)
- commitRelations(WTFMove(customStyle->relations), *m_update);
-
</del><ins>+ Style::commitRelationsToDocument(WTFMove(customStyle->relations));
</ins><span class="cx"> return WTFMove(customStyle->renderStyle);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (auto style = scope().sharingResolver.resolve(element, *m_update))
</del><ins>+ if (auto style = scope().sharingResolver.resolve(element))
</ins><span class="cx"> return *style;
</span><span class="cx">
</span><span class="cx"> auto elementStyle = scope().styleResolver.styleForElement(element, &inheritedStyle, MatchAllRules, nullptr, &scope().selectorFilter);
</span><span class="cx">
</span><del>- if (elementStyle.relations)
- commitRelations(WTFMove(elementStyle.relations), *m_update);
-
</del><ins>+ Style::commitRelationsToDocument(WTFMove(elementStyle.relations));
</ins><span class="cx"> return WTFMove(elementStyle.renderStyle);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if ENABLE(CSS_REGIONS)
+static RenderNamedFlowThread* moveToFlowThreadIfNeeded(Element& element, const RenderStyle& style)
+{
+ if (!element.shouldMoveToFlowThread(style))
+ return 0;
+
+ FlowThreadController& flowThreadController = element.document().renderView()->flowThreadController();
+ RenderNamedFlowThread& parentFlowRenderer = flowThreadController.ensureRenderFlowThreadWithName(style.flowThread());
+ flowThreadController.registerNamedFlowContentElement(element, parentFlowRenderer);
+ return &parentFlowRenderer;
+}
+#endif
+
+void TreeResolver::createRenderer(Element& element, RenderTreePosition& renderTreePosition, RefPtr<RenderStyle>&& resolvedStyle)
+{
+ ASSERT(shouldCreateRenderer(element, renderTreePosition.parent()));
+ ASSERT(resolvedStyle);
+
+ RenderNamedFlowThread* parentFlowRenderer = 0;
+#if ENABLE(CSS_REGIONS)
+ parentFlowRenderer = moveToFlowThreadIfNeeded(element, *resolvedStyle);
+#endif
+
+ if (!element.rendererIsNeeded(*resolvedStyle))
+ return;
+
+ renderTreePosition.computeNextSibling(element);
+
+ RenderTreePosition insertionPosition = parentFlowRenderer
+ ? RenderTreePosition(*parentFlowRenderer, parentFlowRenderer->nextRendererForElement(element))
+ : renderTreePosition;
+
+ RenderElement* newRenderer = element.createElementRenderer(resolvedStyle.releaseNonNull(), insertionPosition).leakPtr();
+ if (!newRenderer)
+ return;
+ if (!insertionPosition.canInsert(*newRenderer)) {
+ newRenderer->destroy();
+ 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->setFlowThreadState(insertionPosition.parent().flowThreadState());
+
+ // Code below updateAnimations() can depend on Element::renderer() already being set.
+ element.setRenderer(newRenderer);
+
+ // FIXME: There's probably a better way to factor this.
+ // This just does what setAnimatedStyle() does, except with setStyleInternal() instead of setStyle().
+ Ref<RenderStyle> animatedStyle = newRenderer->style();
+ newRenderer->animation().updateAnimations(*newRenderer, animatedStyle, animatedStyle);
+ newRenderer->setStyleInternal(WTFMove(animatedStyle));
+
+ newRenderer->initializeStyle();
+
+#if ENABLE(FULLSCREEN_API)
+ if (m_document.webkitIsFullScreen() && m_document.webkitCurrentFullScreenElement() == &element) {
+ newRenderer = RenderFullScreen::wrapRenderer(newRenderer, &insertionPosition.parent(), m_document);
+ if (!newRenderer)
+ return;
+ }
+#endif
+ // Note: Adding newRenderer instead of renderer(). renderer() may be a child of newRenderer.
+ insertionPosition.insert(*newRenderer);
+}
+
</ins><span class="cx"> static void invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded(Node& current)
</span><span class="cx"> {
</span><span class="cx"> // FIXME: This needs to traverse in composed tree order.
</span><span class="lines">@@ -262,6 +348,7 @@
</span><span class="cx"> newRenderer->setFlowThreadState(renderTreePosition.parent().flowThreadState());
</span><span class="cx">
</span><span class="cx"> textNode.setRenderer(newRenderer.get());
</span><ins>+ // Parent takes care of the animations, no need to call setAnimatableStyle.
</ins><span class="cx"> renderTreePosition.insert(*newRenderer.leakPtr());
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -294,11 +381,75 @@
</span><span class="cx"> textNode.renderer()->setTextWithOffset(textNode.data(), offsetOfReplacedData, lengthOfReplacedData);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void TreeResolver::createRenderTreeForChildren(ContainerNode& current, RenderStyle& inheritedStyle, RenderTreePosition& renderTreePosition)
+{
+ for (Node* child = current.firstChild(); child; child = child->nextSibling()) {
+ ASSERT((!child->renderer() || child->isNamedFlowContentNode()) || current.shadowRoot());
+ if (child->renderer()) {
+ renderTreePosition.invalidateNextSibling(*child->renderer());
+ continue;
+ }
+ if (is<Text>(*child)) {
+ attachTextRenderer(downcast<Text>(*child), renderTreePosition);
+ continue;
+ }
+ if (is<Element>(*child))
+ createRenderTreeRecursively(downcast<Element>(*child), inheritedStyle, renderTreePosition, nullptr);
+ }
+}
+
+void TreeResolver::createRenderTreeForShadowRoot(ShadowRoot& shadowRoot)
+{
+ ASSERT(shadowRoot.host());
+ ASSERT(shadowRoot.host()->renderer());
+
+ pushScope(shadowRoot);
+
+ auto& renderer = *shadowRoot.host()->renderer();
+ RenderTreePosition renderTreePosition(renderer);
+ createRenderTreeForChildren(shadowRoot, renderer.style(), renderTreePosition);
+
+ popScope();
+
+ shadowRoot.clearNeedsStyleRecalc();
+ shadowRoot.clearChildNeedsStyleRecalc();
+}
+
+static PseudoElement* beforeOrAfterPseudoElement(Element& current, PseudoId pseudoId)
+{
+ ASSERT(pseudoId == BEFORE || pseudoId == AFTER);
+ if (pseudoId == BEFORE)
+ return current.beforePseudoElement();
+ return current.afterPseudoElement();
+}
+
+static void setBeforeOrAfterPseudoElement(Element& current, Ref<PseudoElement>&& pseudoElement, PseudoId pseudoId)
+{
+ ASSERT(pseudoId == BEFORE || pseudoId == AFTER);
+ if (pseudoId == BEFORE) {
+ current.setBeforePseudoElement(WTFMove(pseudoElement));
+ return;
+ }
+ current.setAfterPseudoElement(WTFMove(pseudoElement));
+}
+
+static void clearBeforeOrAfterPseudoElement(Element& current, PseudoId pseudoId)
+{
+ ASSERT(pseudoId == BEFORE || pseudoId == AFTER);
+ if (pseudoId == BEFORE) {
+ current.clearBeforePseudoElement();
+ return;
+ }
+ current.clearAfterPseudoElement();
+}
+
</ins><span class="cx"> static void resetStyleForNonRenderedDescendants(Element& current)
</span><span class="cx"> {
</span><span class="cx"> // FIXME: This is not correct with shadow trees. This should be done with ComposedTreeIterator.
</span><ins>+ ASSERT(!current.renderer());
</ins><span class="cx"> bool elementNeedingStyleRecalcAffectsNextSiblingElementStyle = false;
</span><span class="cx"> for (auto& child : childrenOfType<Element>(current)) {
</span><ins>+ ASSERT(!child.renderer());
</ins><span class="cx"> bool affectedByPreviousSibling = child.styleIsAffectedByPreviousSibling() && elementNeedingStyleRecalcAffectsNextSiblingElementStyle;
</span><span class="cx"> if (child.needsStyleRecalc() || elementNeedingStyleRecalcAffectsNextSiblingElementStyle)
</span><span class="cx"> elementNeedingStyleRecalcAffectsNextSiblingElementStyle = child.affectsNextSiblingElementStyle();
</span><span class="lines">@@ -315,6 +466,111 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static bool needsPseudoElement(Element& current, PseudoId pseudoId)
+{
+ if (!current.renderer() || !current.renderer()->canHaveGeneratedChildren())
+ return false;
+ if (current.isPseudoElement())
+ return false;
+ if (!pseudoElementRendererIsNeeded(current.renderer()->getCachedPseudoStyle(pseudoId)))
+ return false;
+ return true;
+}
+
+void TreeResolver::createRenderTreeForBeforeOrAfterPseudoElement(Element& current, PseudoId pseudoId, RenderTreePosition& renderTreePosition)
+{
+ if (!needsPseudoElement(current, pseudoId))
+ return;
+ Ref<PseudoElement> pseudoElement = PseudoElement::create(current, pseudoId);
+ InspectorInstrumentation::pseudoElementCreated(m_document.page(), pseudoElement.get());
+ setBeforeOrAfterPseudoElement(current, pseudoElement.copyRef(), pseudoId);
+ createRenderTreeRecursively(pseudoElement.get(), *current.renderStyle(), renderTreePosition, nullptr);
+}
+
+#if ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT)
+void TreeResolver::createRenderTreeForSlotAssignees(HTMLSlotElement& slot, RenderStyle& inheritedStyle, RenderTreePosition& renderTreePosition)
+{
+ ASSERT(shouldCreateRenderer(slot, renderTreePosition.parent()));
+
+ if (auto* assignedNodes = slot.assignedNodes()) {
+ pushEnclosingScope();
+ for (auto* child : *assignedNodes) {
+ if (is<Text>(*child))
+ attachTextRenderer(downcast<Text>(*child), renderTreePosition);
+ else if (is<Element>(*child))
+ createRenderTreeRecursively(downcast<Element>(*child), inheritedStyle, renderTreePosition, nullptr);
+ }
+ popScope();
+ } else {
+ SelectorFilterPusher selectorFilterPusher(scope().selectorFilter, slot);
+ createRenderTreeForChildren(slot, inheritedStyle, renderTreePosition);
+ }
+
+ slot.clearNeedsStyleRecalc();
+ slot.clearChildNeedsStyleRecalc();
+}
+#endif
+
+void TreeResolver::createRenderTreeRecursively(Element& current, RenderStyle& inheritedStyle, RenderTreePosition& renderTreePosition, RefPtr<RenderStyle>&& resolvedStyle)
+{
+ ASSERT(!current.renderer());
+
+ PostResolutionCallbackDisabler callbackDisabler(m_document);
+ WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
+
+ bool shouldCallCreateRenderer = shouldCreateRenderer(current, renderTreePosition.parent());
+
+ RefPtr<RenderStyle> style = resolvedStyle;
+ if (!style)
+ style = styleForElement(current, inheritedStyle);
+
+#if ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT)
+ if (is<HTMLSlotElement>(current)) {
+ if (shouldCallCreateRenderer && current.rendererIsNeeded(*style))
+ createRenderTreeForSlotAssignees(downcast<HTMLSlotElement>(current), inheritedStyle, renderTreePosition);
+ return;
+ }
+#endif
+
+ if (current.hasCustomStyleResolveCallbacks())
+ current.willAttachRenderers();
+
+ if (shouldCallCreateRenderer)
+ createRenderer(current, renderTreePosition, style.releaseNonNull());
+
+ if (auto* renderer = current.renderer()) {
+ SelectorFilterPusher selectorFilterPusher(scope().selectorFilter, current, SelectorFilterPusher::NoPush);
+
+ RenderTreePosition childRenderTreePosition(*renderer);
+ createRenderTreeForBeforeOrAfterPseudoElement(current, BEFORE, childRenderTreePosition);
+
+ auto* shadowRoot = current.shadowRoot();
+ if (shadowRoot) {
+ selectorFilterPusher.push();
+ createRenderTreeForShadowRoot(*shadowRoot);
+ } else if (current.firstChild())
+ selectorFilterPusher.push();
+
+ bool skipChildren = shadowRoot;
+ if (!skipChildren)
+ createRenderTreeForChildren(current, renderer->style(), childRenderTreePosition);
+
+ if (AXObjectCache* cache = m_document.axObjectCache())
+ cache->updateCacheAfterNodeIsAttached(&current);
+
+ createRenderTreeForBeforeOrAfterPseudoElement(current, AFTER, childRenderTreePosition);
+
+ current.updateFocusAppearanceAfterAttachIfNeeded();
+ } else
+ resetStyleForNonRenderedDescendants(current);
+
+ current.clearNeedsStyleRecalc();
+ current.clearChildNeedsStyleRecalc();
+
+ if (current.hasCustomStyleResolveCallbacks())
+ current.didAttachRenderers();
+}
+
</ins><span class="cx"> static void detachChildren(ContainerNode& current, DetachType detachType)
</span><span class="cx"> {
</span><span class="cx"> for (Node* child = current.firstChild(); child; child = child->nextSibling()) {
</span><span class="lines">@@ -350,7 +606,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-void detachRenderTree(Element& current, DetachType detachType)
</del><ins>+static void detachRenderTree(Element& current, DetachType detachType)
</ins><span class="cx"> {
</span><span class="cx"> WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
</span><span class="cx">
</span><span class="lines">@@ -381,45 +637,79 @@
</span><span class="cx"> current.didDetachRenderers();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ElementUpdate TreeResolver::resolveElement(Element& element)
</del><ins>+static bool pseudoStyleCacheIsInvalid(RenderElement* renderer, RenderStyle* newStyle)
</ins><span class="cx"> {
</span><del>- ElementUpdate update;
</del><ins>+ const RenderStyle& currentStyle = renderer->style();
</ins><span class="cx">
</span><del>- auto newStyle = styleForElement(element, parent().style);
</del><ins>+ const PseudoStyleCache* pseudoStyleCache = currentStyle.cachedPseudoStyles();
+ if (!pseudoStyleCache)
+ return false;
</ins><span class="cx">
</span><del>- auto* renderer = element.renderer();
- bool needsNewRenderer = !renderer || element.styleChangeType() == ReconstructRenderTree || parent().change == Detach;
</del><ins>+ for (auto& cache : *pseudoStyleCache) {
+ RefPtr<RenderStyle> newPseudoStyle;
+ PseudoId pseudoId = cache->styleType();
+ if (pseudoId == FIRST_LINE || pseudoId == FIRST_LINE_INHERITED)
+ newPseudoStyle = renderer->uncachedFirstLineStyle(newStyle);
+ else
+ newPseudoStyle = renderer->getUncachedPseudoStyle(PseudoStyleRequest(pseudoId), newStyle, newStyle);
+ if (!newPseudoStyle)
+ return true;
+ if (*newPseudoStyle != *cache) {
+ if (pseudoId < FIRST_INTERNAL_PSEUDOID)
+ newStyle->setHasPseudoStyle(pseudoId);
+ newStyle->addCachedPseudoStyle(newPseudoStyle);
+ if (pseudoId == FIRST_LINE || pseudoId == FIRST_LINE_INHERITED) {
+ // FIXME: We should do an actual diff to determine whether a repaint vs. layout
+ // is needed, but for now just assume a layout will be required. The diff code
+ // in RenderObject::setStyle would need to be factored out so that it could be reused.
+ renderer->setNeedsLayoutAndPrefWidthsRecalc();
+ }
+ return true;
+ }
+ }
+ return false;
+}
</ins><span class="cx">
</span><del>- if (!needsNewRenderer && m_document.frame()->animation().updateAnimations(*renderer, newStyle, newStyle))
- update.isSynthetic = true;
</del><ins>+Change TreeResolver::resolveElement(Element& current)
+{
+ Change localChange = Detach;
+ RefPtr<RenderStyle> newStyle;
+ RefPtr<RenderStyle> currentStyle = current.renderStyle();
</ins><span class="cx">
</span><del>- update.change = needsNewRenderer ? Detach : determineChange(renderer->style(), newStyle);
- update.style = WTFMove(newStyle);
</del><ins>+ if (currentStyle && current.styleChangeType() != ReconstructRenderTree) {
+ Ref<RenderStyle> style(styleForElement(current, parent().style));
+ newStyle = style.ptr();
+ localChange = determineChange(*currentStyle, style);
+ }
+ if (localChange == Detach) {
+ if (current.renderer() || current.isNamedFlowContentNode())
+ detachRenderTree(current, ReattachDetach);
+#if ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT)
+ else if (is<HTMLSlotElement>(current))
+ detachRenderTree(current, ReattachDetach);
+#endif
+ createRenderTreeRecursively(current, parent().style, parent().renderTreePosition, newStyle.release());
+ invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded(current);
</ins><span class="cx">
</span><del>- if (element.styleChangeType() == SyntheticStyleChange)
- update.isSynthetic = true;
</del><ins>+ return Detach;
+ }
</ins><span class="cx">
</span><del>- if (&element == m_document.documentElement()) {
- m_documentElementStyle = update.style;
</del><ins>+ if (RenderElement* renderer = current.renderer()) {
+ if (localChange != NoChange || pseudoStyleCacheIsInvalid(renderer, newStyle.get()) || (parent().change == Force && renderer->requiresForcedStyleRecalcPropagation()) || current.styleChangeType() == SyntheticStyleChange)
+ renderer->setAnimatableStyle(*newStyle, current.styleChangeType() == SyntheticStyleChange ? StyleDifferenceRecompositeLayer : StyleDifferenceEqual);
+ }
</ins><span class="cx">
</span><del>- // If "rem" units are used anywhere in the document, and if the document element's font size changes, then force font updating
- // all the way down the tree. This is simpler than having to maintain a cache of objects (and such font size changes should be rare anyway).
- if (m_document.authorStyleSheets().usesRemUnits() && update.change != NoChange && renderer && update.style && renderer->style().fontSize() != update.style->fontSize()) {
- // Cached RenderStyles may depend on the rem units.
- scope().styleResolver.invalidateMatchedPropertiesCache();
- update.change = Force;
- }
</del><ins>+ // If "rem" units are used anywhere in the document, and if the document element's font size changes, then force font updating
+ // all the way down the tree. This is simpler than having to maintain a cache of objects (and such font size changes should be rare anyway).
+ if (m_document.authorStyleSheets().usesRemUnits() && m_document.documentElement() == &current && localChange != NoChange && currentStyle && newStyle && currentStyle->fontSize() != newStyle->fontSize()) {
+ // Cached RenderStyles may depend on the re units.
+ scope().styleResolver.invalidateMatchedPropertiesCache();
+ return Force;
</ins><span class="cx"> }
</span><ins>+ if (parent().change == Force || current.styleChangeType() >= FullStyleChange)
+ return Force;
</ins><span class="cx">
</span><del>- // This is needed for resolving color:-webkit-text for subsequent elements.
- // FIXME: We shouldn't mutate document when resolving style.
- if (&element == m_document.body())
- m_document.setTextColor(update.style->visitedDependentColor(CSSPropertyColor));
-
- if (update.change != Detach && (parent().change == Force || element.styleChangeType() >= FullStyleChange))
- update.change = Force;
-
- return update;
</del><ins>+ return localChange;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void resolveTextNode(Text& text, RenderTreePosition& renderTreePosition)
</span><span class="lines">@@ -441,6 +731,30 @@
</span><span class="cx"> invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded(text);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void TreeResolver::resolveBeforeOrAfterPseudoElement(Element& current, Change change, PseudoId pseudoId, RenderTreePosition& renderTreePosition)
+{
+ if (!current.renderer())
+ return;
+ PseudoElement* existingPseudoElement = beforeOrAfterPseudoElement(current, pseudoId);
+ if (!existingPseudoElement) {
+ createRenderTreeForBeforeOrAfterPseudoElement(current, pseudoId, renderTreePosition);
+ return;
+ }
+
+ if (existingPseudoElement->renderer())
+ renderTreePosition.invalidateNextSibling(*existingPseudoElement->renderer());
+
+ if (change == NoChange && !existingPseudoElement->needsStyleRecalc())
+ return;
+
+ if (needsPseudoElement(current, pseudoId)) {
+ auto change = resolveElement(*existingPseudoElement);
+ existingPseudoElement->didRecalcStyle(change);
+ existingPseudoElement->clearNeedsStyleRecalc();
+ } else
+ clearBeforeOrAfterPseudoElement(current, pseudoId);
+}
+
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> static EVisibility elementImplicitVisibility(const Element* element)
</span><span class="cx"> {
</span><span class="lines">@@ -495,11 +809,11 @@
</span><span class="cx"> };
</span><span class="cx"> #endif // PLATFORM(IOS)
</span><span class="cx">
</span><del>-void TreeResolver::pushParent(Element& element, ElementUpdate& update)
</del><ins>+void TreeResolver::pushParent(Element& element, RenderStyle& style, RenderTreePosition renderTreePosition, Change change)
</ins><span class="cx"> {
</span><span class="cx"> scope().selectorFilter.pushParent(&element);
</span><span class="cx">
</span><del>- Parent parent(element, update);
</del><ins>+ Parent parent(element, style, renderTreePosition, change);
</ins><span class="cx">
</span><span class="cx"> if (auto* shadowRoot = element.shadowRoot()) {
</span><span class="cx"> pushScope(*shadowRoot);
</span><span class="lines">@@ -513,12 +827,16 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> m_parentStack.append(WTFMove(parent));
</span><ins>+
+ resolveBeforeOrAfterPseudoElement(element, change, BEFORE, renderTreePosition);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TreeResolver::popParent()
</span><span class="cx"> {
</span><span class="cx"> auto& parentElement = *parent().element;
</span><span class="cx">
</span><ins>+ resolveBeforeOrAfterPseudoElement(parentElement, parent().change, AFTER, parent().renderTreePosition);
+
</ins><span class="cx"> parentElement.clearNeedsStyleRecalc();
</span><span class="cx"> parentElement.clearChildNeedsStyleRecalc();
</span><span class="cx">
</span><span class="lines">@@ -539,15 +857,6 @@
</span><span class="cx"> popParent();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static bool shouldResolvePseudoElement(PseudoElement* pseudoElement)
-{
- if (!pseudoElement)
- return false;
- bool needsStyleRecalc = pseudoElement->needsStyleRecalc();
- pseudoElement->clearNeedsStyleRecalc();
- return needsStyleRecalc;
-}
-
</del><span class="cx"> void TreeResolver::resolveComposedTree()
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_parentStack.size() == 1);
</span><span class="lines">@@ -569,12 +878,12 @@
</span><span class="cx"> ASSERT(node.containingShadowRoot() == scope().shadowRoot);
</span><span class="cx"> ASSERT(node.parentElement() == parent.element || is<ShadowRoot>(node.parentNode()) || node.parentElement()->shadowRoot());
</span><span class="cx">
</span><ins>+ if (auto* existingRenderer = node.renderer())
+ parent.renderTreePosition.invalidateNextSibling(*existingRenderer);
+
</ins><span class="cx"> if (is<Text>(node)) {
</span><del>- auto& text = downcast<Text>(node);
- if (text.styleChangeType() == ReconstructRenderTree && parent.change != Detach)
- m_update->addText(text, parent.element);
-
- text.clearNeedsStyleRecalc();
</del><ins>+ if (node.needsStyleRecalc())
+ resolveTextNode(downcast<Text>(node), parent.renderTreePosition);
</ins><span class="cx"> it.traverseNextSkippingChildren();
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="lines">@@ -586,12 +895,9 @@
</span><span class="cx"> if (element.needsStyleRecalc() || parent.elementNeedingStyleRecalcAffectsNextSiblingElementStyle)
</span><span class="cx"> parent.elementNeedingStyleRecalcAffectsNextSiblingElementStyle = element.affectsNextSiblingElementStyle();
</span><span class="cx">
</span><del>- bool shouldResolveForPseudoElement = shouldResolvePseudoElement(element.beforePseudoElement()) || shouldResolvePseudoElement(element.afterPseudoElement());
</del><ins>+ Change change = NoChange;
</ins><span class="cx">
</span><del>- ElementUpdate update;
- update.style = element.renderStyle();
-
- bool shouldResolve = parent.change >= Inherit || element.needsStyleRecalc() || shouldResolveForPseudoElement || affectedByPreviousSibling;
</del><ins>+ bool shouldResolve = parent.change >= Inherit || element.needsStyleRecalc() || affectedByPreviousSibling;
</ins><span class="cx"> if (shouldResolve) {
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> CheckForVisibilityChangeOnRecalcStyle checkForVisibilityChange(&element, element.renderStyle());
</span><span class="lines">@@ -604,46 +910,45 @@
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- update = resolveElement(element);
</del><ins>+ change = resolveElement(element);
</ins><span class="cx">
</span><ins>+ element.clearNeedsStyleRecalc();
+
</ins><span class="cx"> if (element.hasCustomStyleResolveCallbacks())
</span><del>- element.didRecalcStyle(update.change);
</del><ins>+ element.didRecalcStyle(change);
</ins><span class="cx">
</span><del>- if (affectedByPreviousSibling && update.change != Detach)
- update.change = Force;
</del><ins>+ if (change == Detach) {
+ it.traverseNextSkippingChildren();
+ continue;
+ }
</ins><span class="cx">
</span><del>- m_update->addElement(element, parent.element, update);
-
- element.clearNeedsStyleRecalc();
</del><ins>+ if (affectedByPreviousSibling)
+ change = Force;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> #if ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT)
</span><span class="cx"> if (is<HTMLSlotElement>(element)) {
</span><span class="cx"> // FIXME: We should compute style for the slot and use it as parent style.
</span><del>- // Duplicate the style from the parent context.
- ElementUpdate slotUpdate;
- slotUpdate.style = parent.style.ptr();
- slotUpdate.change = update.change;
- if (!shouldResolve)
- m_update->addElement(element, parent.element, update);
- pushParent(element, slotUpdate);
</del><ins>+ // FIXME: This should be display:contents check.
+ // Duplicate the style and render tree position from the current context.
+ pushParent(element, parent.style.get(), parent.renderTreePosition, change);
</ins><span class="cx"> it.traverseNext();
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><del>- if (!update.style) {
</del><ins>+ auto* renderer = element.renderer();
+ if (!renderer) {
</ins><span class="cx"> resetStyleForNonRenderedDescendants(element);
</span><span class="cx"> element.clearChildNeedsStyleRecalc();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- bool shouldIterateChildren = update.style && (element.childNeedsStyleRecalc() || update.change != NoChange);
</del><ins>+ bool shouldIterateChildren = renderer && (element.childNeedsStyleRecalc() || change != NoChange);
</ins><span class="cx"> if (!shouldIterateChildren) {
</span><span class="cx"> it.traverseNextSkippingChildren();
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- pushParent(element, update);
</del><ins>+ pushParent(element, renderer->style(), RenderTreePosition(*renderer), change);
</ins><span class="cx">
</span><span class="cx"> it.traverseNext();
</span><span class="cx"> }
</span><span class="lines">@@ -651,24 +956,24 @@
</span><span class="cx"> popParentsToDepth(1);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-std::unique_ptr<const Update> TreeResolver::resolve(Change change)
</del><ins>+void TreeResolver::resolve(Change change)
</ins><span class="cx"> {
</span><span class="cx"> auto& renderView = *m_document.renderView();
</span><span class="cx">
</span><span class="cx"> Element* documentElement = m_document.documentElement();
</span><span class="cx"> if (!documentElement)
</span><del>- return nullptr;
</del><ins>+ return;
</ins><span class="cx"> if (change != Force && !documentElement->childNeedsStyleRecalc() && !documentElement->needsStyleRecalc())
</span><del>- return nullptr;
</del><ins>+ return;
</ins><span class="cx">
</span><del>- m_update = std::make_unique<Update>(m_document);
</del><span class="cx"> m_scopeStack.append(adoptRef(*new Scope(m_document)));
</span><del>- m_parentStack.append(Parent(m_document, change));
</del><span class="cx">
</span><span class="cx"> // Pseudo element removal and similar may only work with these flags still set. Reset them after the style recalc.
</span><span class="cx"> renderView.setUsesFirstLineRules(renderView.usesFirstLineRules() || scope().styleResolver.usesFirstLineRules());
</span><span class="cx"> renderView.setUsesFirstLetterRules(renderView.usesFirstLetterRules() || scope().styleResolver.usesFirstLetterRules());
</span><span class="cx">
</span><ins>+ m_parentStack.append(Parent(m_document, change));
+
</ins><span class="cx"> resolveComposedTree();
</span><span class="cx">
</span><span class="cx"> renderView.setUsesFirstLineRules(scope().styleResolver.usesFirstLineRules());
</span><span class="lines">@@ -676,11 +981,11 @@
</span><span class="cx">
</span><span class="cx"> m_parentStack.clear();
</span><span class="cx"> m_scopeStack.clear();
</span><ins>+}
</ins><span class="cx">
</span><del>- if (m_update->roots().isEmpty())
- return nullptr;
-
- return WTFMove(m_update);
</del><ins>+void detachRenderTree(Element& element)
+{
+ detachRenderTree(element, NormalDetach);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static Vector<std::function<void ()>>& postResolutionCallbackQueue()
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleTreeResolverh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleTreeResolver.h (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleTreeResolver.h        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/style/StyleTreeResolver.h        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -32,9 +32,7 @@
</span><span class="cx"> #include "SelectorFilter.h"
</span><span class="cx"> #include "StyleChange.h"
</span><span class="cx"> #include "StyleSharingResolver.h"
</span><del>-#include "StyleUpdate.h"
</del><span class="cx"> #include <functional>
</span><del>-#include <wtf/HashMap.h>
</del><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -49,7 +47,6 @@
</span><span class="cx"> class ShadowRoot;
</span><span class="cx"> class StyleResolver;
</span><span class="cx"> class Text;
</span><del>-class TreeChange;
</del><span class="cx">
</span><span class="cx"> namespace Style {
</span><span class="cx">
</span><span class="lines">@@ -57,14 +54,26 @@
</span><span class="cx"> public:
</span><span class="cx"> TreeResolver(Document&);
</span><span class="cx">
</span><del>- std::unique_ptr<const Update> resolve(Change);
</del><ins>+ void resolve(Change);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> Ref<RenderStyle> styleForElement(Element&, RenderStyle& inheritedStyle);
</span><span class="cx">
</span><span class="cx"> void resolveComposedTree();
</span><del>- ElementUpdate resolveElement(Element&);
</del><ins>+ Change resolveElement(Element&);
+ void resolveBeforeOrAfterPseudoElement(Element&, Change, PseudoId, RenderTreePosition&);
</ins><span class="cx">
</span><ins>+
+ void createRenderTreeRecursively(Element&, RenderStyle&, RenderTreePosition&, RefPtr<RenderStyle>&& resolvedStyle);
+ void createRenderer(Element&, RenderTreePosition&, RefPtr<RenderStyle>&& resolvedStyle);
+ void createRenderTreeForBeforeOrAfterPseudoElement(Element&, PseudoId, RenderTreePosition&);
+ void createRenderTreeForChildren(ContainerNode&, RenderStyle&, RenderTreePosition&);
+ void createRenderTreeForShadowRoot(ShadowRoot&);
+
+#if ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT)
+ void createRenderTreeForSlotAssignees(HTMLSlotElement&, RenderStyle& inheritedStyle, RenderTreePosition&);
+#endif
+
</ins><span class="cx"> struct Scope : RefCounted<Scope> {
</span><span class="cx"> StyleResolver& styleResolver;
</span><span class="cx"> SelectorFilter selectorFilter;
</span><span class="lines">@@ -79,12 +88,13 @@
</span><span class="cx"> struct Parent {
</span><span class="cx"> Element* element;
</span><span class="cx"> Ref<RenderStyle> style;
</span><ins>+ RenderTreePosition renderTreePosition;
</ins><span class="cx"> Change change;
</span><span class="cx"> bool didPushScope { false };
</span><span class="cx"> bool elementNeedingStyleRecalcAffectsNextSiblingElementStyle { false };
</span><span class="cx">
</span><span class="cx"> Parent(Document&, Change);
</span><del>- Parent(Element&, ElementUpdate&);
</del><ins>+ Parent(Element&, RenderStyle&, RenderTreePosition, Change);
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> Scope& scope() { return m_scopeStack.last(); }
</span><span class="lines">@@ -94,21 +104,16 @@
</span><span class="cx"> void pushEnclosingScope();
</span><span class="cx"> void popScope();
</span><span class="cx">
</span><del>- void pushParent(Element&, ElementUpdate&);
</del><ins>+ void pushParent(Element&, RenderStyle&, RenderTreePosition, Change);
</ins><span class="cx"> void popParent();
</span><span class="cx"> void popParentsToDepth(unsigned depth);
</span><span class="cx">
</span><span class="cx"> Document& m_document;
</span><del>- RefPtr<RenderStyle> m_documentElementStyle;
-
</del><span class="cx"> Vector<Ref<Scope>, 4> m_scopeStack;
</span><span class="cx"> Vector<Parent, 32> m_parentStack;
</span><del>-
- std::unique_ptr<Update> m_update;
</del><span class="cx"> };
</span><span class="cx">
</span><del>-enum DetachType { NormalDetach, ReattachDetach };
-void detachRenderTree(Element&, DetachType = NormalDetach);
</del><ins>+void detachRenderTree(Element&);
</ins><span class="cx"> void detachTextRenderer(Text&);
</span><span class="cx">
</span><span class="cx"> void updateTextRendererAfterContentChange(Text&, unsigned offsetOfReplacedData, unsigned lengthOfReplacedData);
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleUpdatecpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/style/StyleUpdate.cpp (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleUpdate.cpp        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/style/StyleUpdate.cpp        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -1,93 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "StyleUpdate.h"
-
-#include "ComposedTreeAncestorIterator.h"
-#include "Document.h"
-#include "Element.h"
-#include "NodeRenderStyle.h"
-#include "Text.h"
-
-namespace WebCore {
-namespace Style {
-
-Update::Update(Document& document)
- : m_document(document)
-{
-}
-
-const ElementUpdate* Update::elementUpdate(const Element& element) const
-{
- auto it = m_elements.find(&element);
- if (it == m_elements.end())
- return nullptr;
- return &it->value;
-}
-
-bool Update::textUpdate(const Text& text) const
-{
- return m_texts.contains(&text);
-}
-
-RenderStyle* Update::elementStyle(const Element& element) const
-{
- if (auto* update = elementUpdate(element))
- return update->style.get();
- return element.renderStyle();
-}
-
-void Update::addElement(Element& element, Element* parent, ElementUpdate& change)
-{
- ASSERT(!m_elements.contains(&element));
- ASSERT(!parent || composedTreeAncestors(element).first() == parent);
-
- addPossibleRoot(parent);
- m_elements.add(&element, change);
-}
-
-void Update::addText(Text& text, Element* parent)
-{
- ASSERT(!m_texts.contains(&text));
- ASSERT(!parent || composedTreeAncestors(text).first() == parent);
-
- addPossibleRoot(parent);
- m_texts.add(&text);
-}
-
-void Update::addPossibleRoot(Element* element)
-{
- if (!element) {
- m_roots.add(&m_document);
- return;
- }
- if (m_elements.contains(element))
- return;
- m_roots.add(element);
-}
-
-}
-}
</del></span></pre></div>
<a id="trunkSourceWebCorestyleStyleUpdateh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/style/StyleUpdate.h (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleUpdate.h        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/style/StyleUpdate.h        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -1,81 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef StyleUpdate_h
-#define StyleUpdate_h
-
-#include "Node.h"
-#include "StyleChange.h"
-#include "StyleRelations.h"
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
-#include <wtf/ListHashSet.h>
-#include <wtf/RefPtr.h>
-
-namespace WebCore {
-
-class ContainerNode;
-class Document;
-class Element;
-class Node;
-class RenderStyle;
-class Text;
-
-namespace Style {
-
-struct ElementUpdate {
- RefPtr<RenderStyle> style;
- Change change { NoChange };
- bool isSynthetic { false };
-};
-
-class Update {
-public:
- Update(Document&);
-
- const ListHashSet<ContainerNode*>& roots() const { return m_roots; }
-
- const ElementUpdate* elementUpdate(const Element&) const;
- bool textUpdate(const Text&) const;
-
- RenderStyle* elementStyle(const Element&) const;
-
- const Document& document() const { return m_document; }
-
- void addElement(Element&, Element* parent, ElementUpdate&);
- void addText(Text&, Element* parent);
-
-private:
- void addPossibleRoot(Element*);
-
- Document& m_document;
- ListHashSet<ContainerNode*> m_roots;
- HashMap<const Element*, ElementUpdate> m_elements;
- HashSet<const Text*> m_texts;
-};
-
-}
-}
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoresvgSVGElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGElement.h (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGElement.h        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/svg/SVGElement.h        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -183,12 +183,11 @@
</span><span class="cx"> void updateRelativeLengthsInformation() { updateRelativeLengthsInformation(selfHasRelativeLengths(), this); }
</span><span class="cx"> void updateRelativeLengthsInformation(bool hasRelativeLengths, SVGElement*);
</span><span class="cx">
</span><del>- bool willRecalcStyle(Style::Change) override;
-
</del><span class="cx"> class InstanceInvalidationGuard;
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> RenderStyle* computedStyle(PseudoId = NOPSEUDO) final;
</span><ins>+ bool willRecalcStyle(Style::Change) override;
</ins><span class="cx">
</span><span class="cx"> virtual bool isSupported(StringImpl* feature, StringImpl* version) const;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGUseElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGUseElement.cpp (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGUseElement.cpp        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/svg/SVGUseElement.cpp        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -178,12 +178,11 @@
</span><span class="cx"> SVGGraphicsElement::svgAttributeChanged(attrName);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool SVGUseElement::willRecalcStyle(Style::Change change)
</del><ins>+void SVGUseElement::willAttachRenderers()
</ins><span class="cx"> {
</span><del>- // FIXME: Shadow tree should be updated before style recalc.
</del><span class="cx"> if (m_shadowTreeNeedsUpdate)
</span><span class="cx"> updateShadowTree();
</span><del>- return SVGGraphicsElement::willRecalcStyle(change);
</del><ins>+ SVGGraphicsElement::willAttachRenderers();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static HashSet<AtomicString> createAllowedElementSet()
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGUseElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGUseElement.h (198846 => 198847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGUseElement.h        2016-03-30 18:08:33 UTC (rev 198846)
+++ trunk/Source/WebCore/svg/SVGUseElement.h        2016-03-30 18:24:26 UTC (rev 198847)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> void buildPendingResource() override;
</span><span class="cx"> void parseAttribute(const QualifiedName&, const AtomicString&) override;
</span><span class="cx"> void svgAttributeChanged(const QualifiedName&) override;
</span><del>- bool willRecalcStyle(Style::Change) override;
</del><ins>+ void willAttachRenderers() override;
</ins><span class="cx"> RenderPtr<RenderElement> createElementRenderer(Ref<RenderStyle>&&, const RenderTreePosition&) override;
</span><span class="cx"> void toClipPath(Path&) override;
</span><span class="cx"> bool haveLoadedRequiredResources() override;
</span></span></pre>
</div>
</div>
</body>
</html>