<!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>[193564] branches/safari-601.1.46-branch</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/193564">193564</a></dd>
<dt>Author</dt> <dd>bshafiei@apple.com</dd>
<dt>Date</dt> <dd>2015-12-05 23:09:52 -0800 (Sat, 05 Dec 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/191252">r191252</a>.  rdar://problem/23772886</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari601146branchLayoutTestsChangeLog">branches/safari-601.1.46-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreCMakeListstxt">branches/safari-601.1.46-branch/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreChangeLog">branches/safari-601.1.46-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreWebCorexcodeprojprojectpbxproj">branches/safari-601.1.46-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchessafari601146branchSourceWebCorebindingsobjcDOMCSSmm">branches/safari-601.1.46-branch/Source/WebCore/bindings/objc/DOMCSS.mm</a></li>
<li><a href="#branchessafari601146branchSourceWebCorecssCSSParsercpp">branches/safari-601.1.46-branch/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#branchessafari601146branchSourceWebCorecssCSSValuecpp">branches/safari-601.1.46-branch/Source/WebCore/css/CSSValue.cpp</a></li>
<li><a href="#branchessafari601146branchSourceWebCorecssCSSValueh">branches/safari-601.1.46-branch/Source/WebCore/css/CSSValue.h</a></li>
<li><a href="#branchessafari601146branchSourceWebCorecssCSSValueKeywordsin">branches/safari-601.1.46-branch/Source/WebCore/css/CSSValueKeywords.in</a></li>
<li><a href="#branchessafari601146branchSourceWebCorecssCSSValuePoolcpp">branches/safari-601.1.46-branch/Source/WebCore/css/CSSValuePool.cpp</a></li>
<li><a href="#branchessafari601146branchSourceWebCorecssCSSValuePoolh">branches/safari-601.1.46-branch/Source/WebCore/css/CSSValuePool.h</a></li>
<li><a href="#branchessafari601146branchSourceWebCorecssFontLoadercpp">branches/safari-601.1.46-branch/Source/WebCore/css/FontLoader.cpp</a></li>
<li><a href="#branchessafari601146branchSourceWebCorecssSelectorCheckerh">branches/safari-601.1.46-branch/Source/WebCore/css/SelectorChecker.h</a></li>
<li><a href="#branchessafari601146branchSourceWebCorecssStyleResolvercpp">branches/safari-601.1.46-branch/Source/WebCore/css/StyleResolver.cpp</a></li>
<li><a href="#branchessafari601146branchSourceWebCorecssStyleResolverh">branches/safari-601.1.46-branch/Source/WebCore/css/StyleResolver.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari601146branchLayoutTestsfastcssallkeywordrevertexpectedhtml">branches/safari-601.1.46-branch/LayoutTests/fast/css/all-keyword-revert-expected.html</a></li>
<li><a href="#branchessafari601146branchLayoutTestsfastcssallkeywordreverthtml">branches/safari-601.1.46-branch/LayoutTests/fast/css/all-keyword-revert.html</a></li>
<li><a href="#branchessafari601146branchLayoutTestsfastcssrevertcolorexpectedhtml">branches/safari-601.1.46-branch/LayoutTests/fast/css/revert-color-expected.html</a></li>
<li><a href="#branchessafari601146branchLayoutTestsfastcssrevertcolorhtml">branches/safari-601.1.46-branch/LayoutTests/fast/css/revert-color.html</a></li>
<li><a href="#branchessafari601146branchLayoutTestsfastcssrevertmarginsexpectedhtml">branches/safari-601.1.46-branch/LayoutTests/fast/css/revert-margins-expected.html</a></li>
<li><a href="#branchessafari601146branchLayoutTestsfastcssrevertmarginshtml">branches/safari-601.1.46-branch/LayoutTests/fast/css/revert-margins.html</a></li>
<li><a href="#branchessafari601146branchLayoutTestsfastcssvariablesallkeywordrevertexpectedhtml">branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/all-keyword-revert-expected.html</a></li>
<li><a href="#branchessafari601146branchLayoutTestsfastcssvariablesallkeywordreverthtml">branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/all-keyword-revert.html</a></li>
<li><a href="#branchessafari601146branchLayoutTestsfastcssvariablesrevertinheritanceexpectedhtml">branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-inheritance-expected.html</a></li>
<li><a href="#branchessafari601146branchLayoutTestsfastcssvariablesrevertinheritancehtml">branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-inheritance.html</a></li>
<li><a href="#branchessafari601146branchLayoutTestsfastcssvariablesrevertnoinheritanceexpectedhtml">branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-no-inheritance-expected.html</a></li>
<li><a href="#branchessafari601146branchLayoutTestsfastcssvariablesrevertnoinheritancehtml">branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-no-inheritance.html</a></li>
<li><a href="#branchessafari601146branchLayoutTestsfastcssvariablesrevertvariablereferenceexpectedhtml">branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-variable-reference-expected.html</a></li>
<li><a href="#branchessafari601146branchLayoutTestsfastcssvariablesrevertvariablereferencehtml">branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-variable-reference.html</a></li>
<li><a href="#branchessafari601146branchSourceWebCorecssCSSRevertValuecpp">branches/safari-601.1.46-branch/Source/WebCore/css/CSSRevertValue.cpp</a></li>
<li><a href="#branchessafari601146branchSourceWebCorecssCSSRevertValueh">branches/safari-601.1.46-branch/Source/WebCore/css/CSSRevertValue.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari601146branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/LayoutTests/ChangeLog (193563 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/ChangeLog        2015-12-06 07:08:10 UTC (rev 193563)
+++ branches/safari-601.1.46-branch/LayoutTests/ChangeLog        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -1,5 +1,31 @@
</span><span class="cx"> 2015-12-05  Babak Shafiei  &lt;bshafiei@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r191252.
+
+    2015-10-17  David Hyatt  &lt;hyatt@apple.com&gt;
+
+            Implement the CSS4 'revert' keyword.
+            https://bugs.webkit.org/show_bug.cgi?id=149702
+
+            Reviewed by Simon Fraser.
+
+            * fast/css/all-keyword-revert-expected.html: Added.
+            * fast/css/all-keyword-revert.html: Added.
+            * fast/css/revert-color-expected.html: Added.
+            * fast/css/revert-color.html: Added.
+            * fast/css/revert-margins-expected.html: Added.
+            * fast/css/revert-margins.html: Added.
+            * fast/css/variables/all-keyword-revert-expected.html: Added.
+            * fast/css/variables/all-keyword-revert.html: Added.
+            * fast/css/variables/revert-inheritance-expected.html: Added.
+            * fast/css/variables/revert-inheritance.html: Added.
+            * fast/css/variables/revert-no-inheritance-expected.html: Added.
+            * fast/css/variables/revert-no-inheritance.html: Added.
+            * fast/css/variables/revert-variable-reference-expected.html: Added.
+            * fast/css/variables/revert-variable-reference.html: Added.
+
+2015-12-05  Babak Shafiei  &lt;bshafiei@apple.com&gt;
+
</ins><span class="cx">         Merge r191178.
</span><span class="cx"> 
</span><span class="cx">     2015-10-16  David Hyatt  &lt;hyatt@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfastcssallkeywordrevertexpectedhtmlfromrev193529branchessafari601branchLayoutTestsfastcssallkeywordrevertexpectedhtml"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/css/all-keyword-revert-expected.html (from rev 193529, branches/safari-601-branch/LayoutTests/fast/css/all-keyword-revert-expected.html) (0 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/css/all-keyword-revert-expected.html                                (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/css/all-keyword-revert-expected.html        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+&lt;head&gt;
+&lt;style&gt;
+html {
+  font-size: small;
+  background-color: #F0F0F0;
+  color: blue;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;blockquote id=&quot;quote&quot;&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/blockquote&gt; Phasellus eget velit sagittis.
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfastcssallkeywordreverthtmlfromrev193529branchessafari601branchLayoutTestsfastcssallkeywordreverthtml"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/css/all-keyword-revert.html (from rev 193529, branches/safari-601-branch/LayoutTests/fast/css/all-keyword-revert.html) (0 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/css/all-keyword-revert.html                                (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/css/all-keyword-revert.html        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+&lt;head&gt;
+&lt;style&gt;
+html {
+  font-size: small;
+  background-color: #F0F0F0;
+  color: blue;
+}
+
+blockquote {
+  display:inline;
+  background-color: skyblue;
+  color: red;
+  all: revert;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;blockquote id=&quot;quote&quot;&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/blockquote&gt; Phasellus eget velit sagittis.
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfastcssrevertcolorexpectedhtmlfromrev193529branchessafari601branchLayoutTestsfastcssrevertcolorexpectedhtml"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/css/revert-color-expected.html (from rev 193529, branches/safari-601-branch/LayoutTests/fast/css/revert-color-expected.html) (0 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/css/revert-color-expected.html                                (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/css/revert-color-expected.html        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;head&gt;
+&lt;style&gt;
+html {
+  font-size: small;
+  background-color: #F0F0F0;
+  color: blue;
+}
+
+blockquote { background-color: skyblue; }
+
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;blockquote&gt;This text should be blue.&lt;/blockquote&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfastcssrevertcolorhtmlfromrev193529branchessafari601branchLayoutTestsfastcssrevertcolorhtml"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/css/revert-color.html (from rev 193529, branches/safari-601-branch/LayoutTests/fast/css/revert-color.html) (0 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/css/revert-color.html                                (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/css/revert-color.html        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+&lt;head&gt;
+&lt;style&gt;
+html {
+  font-size: small;
+  background-color: #F0F0F0;
+  color: blue;
+}
+
+blockquote {
+  background-color: skyblue;
+  color: red;
+  color: revert;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;blockquote id=&quot;quote&quot;&gt;This text should be blue.&lt;/blockquote&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfastcssrevertmarginsexpectedhtmlfromrev193529branchessafari601branchLayoutTestsfastcssrevertmarginsexpectedhtml"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/css/revert-margins-expected.html (from rev 193529, branches/safari-601-branch/LayoutTests/fast/css/revert-margins-expected.html) (0 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/css/revert-margins-expected.html                                (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/css/revert-margins-expected.html        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+&lt;head&gt;
+&lt;style&gt;
+blockquote {
+  margin-top:0;
+  margin-bottom:0;
+  border:1px solid black;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;blockquote id=&quot;quote&quot;&gt;This blockquote should have user agent margins for the left and right but the top and bottom margins should be 0.&lt;/blockquote&gt;
+&lt;blockquote id=&quot;quote&quot;&gt;This blockquote should have user agent margins for the left and right but the top and bottom margins should be 0.&lt;/blockquote&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfastcssrevertmarginshtmlfromrev193529branchessafari601branchLayoutTestsfastcssrevertmarginshtml"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/css/revert-margins.html (from rev 193529, branches/safari-601-branch/LayoutTests/fast/css/revert-margins.html) (0 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/css/revert-margins.html                                (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/css/revert-margins.html        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+&lt;head&gt;
+&lt;style&gt;
+blockquote {
+  margin:0;
+  margin-right:revert;
+  margin-left:revert;
+  border:1px solid black;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;blockquote id=&quot;quote&quot;&gt;This blockquote should have user agent margins for the left and right but the top and bottom margins should be 0.&lt;/blockquote&gt;
+&lt;blockquote id=&quot;quote&quot;&gt;This blockquote should have user agent margins for the left and right but the top and bottom margins should be 0.&lt;/blockquote&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfastcssvariablesallkeywordrevertexpectedhtmlfromrev193529branchessafari601branchLayoutTestsfastcssvariablesallkeywordrevertexpectedhtml"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/all-keyword-revert-expected.html (from rev 193529, branches/safari-601-branch/LayoutTests/fast/css/variables/all-keyword-revert-expected.html) (0 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/all-keyword-revert-expected.html                                (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/all-keyword-revert-expected.html        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+&lt;head&gt;
+&lt;style&gt;
+html {
+  font-size: small;
+  background-color: #F0F0F0;
+  color: blue;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;span id=&quot;quote&quot;&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/span&gt; Phasellus eget velit sagittis.
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfastcssvariablesallkeywordreverthtmlfromrev193529branchessafari601branchLayoutTestsfastcssvariablesallkeywordreverthtml"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/all-keyword-revert.html (from rev 193529, branches/safari-601-branch/LayoutTests/fast/css/variables/all-keyword-revert.html) (0 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/all-keyword-revert.html                                (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/all-keyword-revert.html        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+&lt;head&gt;
+&lt;title&gt;Test of failed variable lookup because of &quot;revert&quot; on a custom property causing all to reset everything.&lt;/title&gt;
+&lt;style&gt;
+html {
+  font-size: small;
+  background-color: #F0F0F0;
+  color: blue;
+  --a: revert;
+}
+
+blockquote {
+  background-color: skyblue;
+  color: red;
+  all: var(--a);
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;blockquote id=&quot;quote&quot;&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/blockquote&gt; Phasellus eget velit sagittis.
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfastcssvariablesrevertinheritanceexpectedhtmlfromrev193529branchessafari601branchLayoutTestsfastcssvariablesrevertinheritanceexpectedhtml"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-inheritance-expected.html (from rev 193529, branches/safari-601-branch/LayoutTests/fast/css/variables/revert-inheritance-expected.html) (0 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-inheritance-expected.html                                (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-inheritance-expected.html        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+--&gt;&lt;html&gt;&lt;head&gt;&lt;title&gt;CSS Reftest Reference&lt;/title&gt;
+&lt;link href=&quot;mailto:cam@mcc.id.au&quot; rel=&quot;author&quot; title=&quot;Cameron McCormack&quot;&gt;
+&lt;style&gt;
+p {
+  color: green;
+}
+&lt;/style&gt;
+&lt;/head&gt;&lt;body&gt;&lt;p&gt;This text must be green.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfastcssvariablesrevertinheritancehtmlfromrev193529branchessafari601branchLayoutTestsfastcssvariablesrevertinheritancehtml"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-inheritance.html (from rev 193529, branches/safari-601-branch/LayoutTests/fast/css/variables/revert-inheritance.html) (0 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-inheritance.html                                (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-inheritance.html        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+--&gt;&lt;html&gt;&lt;head&gt;&lt;title&gt;CSS Test: Test declaring a variable whose value is &quot;revert&quot; where there is a variable to inherit from.&lt;/title&gt;
+&lt;style&gt;
+body {
+  --a: green;
+  color: crimson;
+}
+p {
+  color: red;
+}
+p {
+  color: orange;
+  --a: revert;
+  color: var(--a);
+}
+&lt;/style&gt;
+&lt;/head&gt;&lt;body&gt;&lt;p&gt;This text must be green.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfastcssvariablesrevertnoinheritanceexpectedhtmlfromrev193529branchessafari601branchLayoutTestsfastcssvariablesrevertnoinheritanceexpectedhtml"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-no-inheritance-expected.html (from rev 193529, branches/safari-601-branch/LayoutTests/fast/css/variables/revert-no-inheritance-expected.html) (0 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-no-inheritance-expected.html                                (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-no-inheritance-expected.html        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+--&gt;&lt;html&gt;&lt;head&gt;&lt;title&gt;CSS Reftest Reference&lt;/title&gt;
+&lt;link href=&quot;mailto:cam@mcc.id.au&quot; rel=&quot;author&quot; title=&quot;Cameron McCormack&quot;&gt;
+&lt;style&gt;
+p {
+  color: green;
+}
+&lt;/style&gt;
+&lt;/head&gt;&lt;body&gt;&lt;p&gt;This text must be green.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfastcssvariablesrevertnoinheritancehtmlfromrev193529branchessafari601branchLayoutTestsfastcssvariablesrevertnoinheritancehtml"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-no-inheritance.html (from rev 193529, branches/safari-601-branch/LayoutTests/fast/css/variables/revert-no-inheritance.html) (0 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-no-inheritance.html                                (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-no-inheritance.html        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+--&gt;&lt;html&gt;&lt;head&gt;&lt;title&gt;CSS Test: Test declaring a variable whose value is &quot;revert&quot; where there is no variable to inherit from.&lt;/title&gt;
+&lt;style&gt;
+p {
+  color: red;
+}
+p {
+  color: orange;
+  --a: revert;
+  color: var(--a,green);
+}
+&lt;/style&gt;
+&lt;/head&gt;&lt;body&gt;&lt;p&gt;This text must be green.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfastcssvariablesrevertvariablereferenceexpectedhtmlfromrev193529branchessafari601branchLayoutTestsfastcssvariablesrevertvariablereferenceexpectedhtml"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-variable-reference-expected.html (from rev 193529, branches/safari-601-branch/LayoutTests/fast/css/variables/revert-variable-reference-expected.html) (0 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-variable-reference-expected.html                                (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-variable-reference-expected.html        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+--&gt;&lt;html&gt;&lt;head&gt;&lt;title&gt;CSS Reftest Reference&lt;/title&gt;
+&lt;link href=&quot;mailto:cam@mcc.id.au&quot; rel=&quot;author&quot; title=&quot;Cameron McCormack&quot;&gt;
+&lt;style&gt;
+p {
+  color: green;
+}
+&lt;/style&gt;
+&lt;/head&gt;&lt;body&gt;&lt;p&gt;This text must be green.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfastcssvariablesrevertvariablereferencehtmlfromrev193529branchessafari601branchLayoutTestsfastcssvariablesrevertvariablereferencehtml"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-variable-reference.html (from rev 193529, branches/safari-601-branch/LayoutTests/fast/css/variables/revert-variable-reference.html) (0 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-variable-reference.html                                (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/css/variables/revert-variable-reference.html        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+--&gt;&lt;html&gt;&lt;head&gt;&lt;title&gt;CSS Test: Test declaring a variable whose value consists of a reference to a variable whose value is &quot;revert&quot;.&lt;/title&gt;
+&lt;style&gt;
+body {
+  --b: green;
+  color: red;
+}
+p {
+  color: orange;
+  --a: var(--b);
+  --b: revert;
+  color: var(--a);
+}
+&lt;/style&gt;
+&lt;/head&gt;&lt;body&gt;&lt;p&gt;This text must be green.&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/CMakeLists.txt (193563 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/CMakeLists.txt        2015-12-06 07:08:10 UTC (rev 193563)
+++ branches/safari-601.1.46-branch/Source/WebCore/CMakeLists.txt        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -1300,6 +1300,7 @@
</span><span class="cx">     css/CSSProperty.cpp
</span><span class="cx">     css/CSSPropertySourceData.cpp
</span><span class="cx">     css/CSSReflectValue.cpp
</span><ins>+    css/CSSRevertValue.cpp
</ins><span class="cx">     css/CSSRule.cpp
</span><span class="cx">     css/CSSRuleList.cpp
</span><span class="cx">     css/CSSSegmentedFontFace.cpp
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/ChangeLog (193563 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/ChangeLog        2015-12-06 07:08:10 UTC (rev 193563)
+++ branches/safari-601.1.46-branch/Source/WebCore/ChangeLog        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -1,5 +1,135 @@
</span><span class="cx"> 2015-12-05  Babak Shafiei  &lt;bshafiei@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r191252.
+
+    2015-10-17  David Hyatt  &lt;hyatt@apple.com&gt;
+
+            Implement the CSS4 'revert' keyword.
+            https://bugs.webkit.org/show_bug.cgi?id=149702
+
+            Reviewed by Simon Fraser.
+
+            Added new tests in fast/css and fast/css/variables.
+
+            * CMakeLists.txt:
+            * WebCore.xcodeproj/project.pbxproj:
+            Add CSSRevertValue to the project and makefiles.
+
+            * css/CSSParser.cpp:
+            (WebCore::parseKeywordValue):
+            Make sure to handle &quot;revert&quot; in the keyword parsing path (along with inherit/initial/unset).
+
+            (WebCore::CSSParser::parseValue):
+            (WebCore::CSSParser::parseCustomPropertyDeclaration):
+            At the parser level, &quot;revert&quot; is just like inherit/initial/unset and gets its own special
+            singleton value, CSSRevertValue.
+
+            * css/CSSRevertValue.cpp: Added.
+            (WebCore::CSSRevertValue::customCSSText):
+            * css/CSSRevertValue.h: Added.
+            (WebCore::CSSRevertValue::create):
+            (WebCore::CSSRevertValue::equals):
+            (WebCore::CSSRevertValue::CSSRevertValue):
+            This value is identical to the inherit/initial/unset values, i.e., its own special value
+            that can be used to indicate a revert when doing style resolution.
+
+            * css/CSSValue.cpp:
+            (WebCore::CSSValue::cssValueType):
+            (WebCore::CSSValue::equals):
+            (WebCore::CSSValue::cssText):
+            (WebCore::CSSValue::destroy):
+            * css/CSSValue.h:
+            (WebCore::CSSValue::isInheritedValue):
+            (WebCore::CSSValue::isInitialValue):
+            (WebCore::CSSValue::isUnsetValue):
+            (WebCore::CSSValue::isRevertValue):
+            Add the RevertClass to CSSValue and make sure it is handled in all the appropriate methods.
+
+            * css/CSSValueKeywords.in:
+            Add the &quot;revert&quot; keyword to the list of allowed CSS keywords.
+
+            * css/CSSValuePool.cpp:
+            (WebCore::CSSValuePool::CSSValuePool):
+            * css/CSSValuePool.h:
+            (WebCore::CSSValuePool::createRevertValue):
+            Add support for a CSSRevertValue singleton, just like inherit/unset/initial.
+
+            * css/FontLoader.cpp:
+            (WebCore::FontLoader::resolveFontStyle):
+            Add &quot;unset&quot; and &quot;revert&quot; as special keywords to be ignored. This code seems to be turned off,
+            but patching it anyway.
+
+            * css/SelectorChecker.h:
+            Add a MatchDefault value of 0 to the LinkMatchMask. This enables it to be used as an index
+            to the correct value in Property (in the style resolution code).
+
+            * css/StyleResolver.cpp:
+            (WebCore::StyleResolver::State::initForStyleResolve):
+            Delete any lingering old CascadedProperty rollbacks for UA/user rules.
+
+            (WebCore::StyleResolver::styleForKeyframe):
+            (WebCore::StyleResolver::styleForPage):
+            (WebCore::StyleResolver::applyMatchedProperties):
+            Pass along the MatchResult as an additional parameter, since we need it to lazily compute
+            the cascade rollbacks if the &quot;revert&quot; keyword is encountered.
+
+            (WebCore::StyleResolver::cascadedPropertiesForRollback):
+            This method will lazily create and return a new CascadedProperties pointer that is cached
+            in the StyleResolver's state. This will contain only UA rules (for user reverts) and UA/user
+            rules (for author reverts). These will only be computed at most once for a given element
+            when doing a reversion, and they will be computed lazily, i.e., only if a revert is
+            requested.
+
+            (WebCore::StyleResolver::applyProperty):
+            Pass along the LinkMatchMask and the MatchResult to applyProperty. This way we know specifically
+            which link type we were computing if we have to revert (so that we roll back and look at the
+            same index in the reverted version). The MatchResult is passed along because it is needed
+            to build the CascadedProperties rollbacks.
+
+            The basic idea is that if a revert is encountered, the level that the rule came from is
+            checked. If it is UA level, just treat as &quot;unset.&quot; If it is author or user level, get
+            the correct CascadedProperties rollback and repeat the applyProperty using the property
+            found in the rollback. If the property is not present in the cascade rollback, then the
+            revert becomes an unset.
+
+            (WebCore::StyleResolver::CascadedProperties::hasCustomProperty):
+            (WebCore::StyleResolver::CascadedProperties::customProperty):
+            Helpers used by applyProperty to check on custom properties, since they can revert too
+            just like a regular property can.
+
+            (WebCore::StyleResolver::CascadedProperties::setPropertyInternal):
+            (WebCore::StyleResolver::CascadedProperties::set):
+            (WebCore::StyleResolver::CascadedProperties::setDeferred):
+            Passing along the CascadeLevel (UA, User, Author) so that it can be stored in the Property.
+            This way when we do property application, we always know where the rule came from so
+            that the reversion can be handled properly.
+
+            (WebCore::StyleResolver::CascadedProperties::addStyleProperties):
+            (WebCore::cascadeLevelForIndex):
+            (WebCore::StyleResolver::CascadedProperties::addMatches):
+            When style properties are added, also figure out the CascadeLevel and pass it along to be
+            stored in the Property. We use the MatchResult's ranges to know where a property comes from.
+
+            (WebCore::StyleResolver::CascadedProperties::applyDeferredProperties):
+            (WebCore::StyleResolver::CascadedProperties::Property::apply):
+            (WebCore::StyleResolver::applyCascadedProperties):
+            Pass along the MatchResult so we know how to build the rollback.
+
+            * css/StyleResolver.h:
+            (WebCore::StyleResolver::State::cascadeLevel):
+            (WebCore::StyleResolver::State::setCascadeLevel):
+            (WebCore::StyleResolver::State::authorRollback):
+            (WebCore::StyleResolver::State::userRollback):
+            (WebCore::StyleResolver::State::setAuthorRollback):
+            (WebCore::StyleResolver::State::setUserRollback):
+            (WebCore::StyleResolver::state):
+            (WebCore::StyleResolver::cascadeLevel):
+            (WebCore::StyleResolver::setCascadeLevel):
+            Move CascadedProperties into the header. Add CascadeLevel to Property. Add the level and
+            rollbacks to the resolver's state.
+
+2015-12-05  Babak Shafiei  &lt;bshafiei@apple.com&gt;
+
</ins><span class="cx">         Merge r191201.
</span><span class="cx"> 
</span><span class="cx">     2015-10-16  David Hyatt  &lt;hyatt@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (193563 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-12-06 07:08:10 UTC (rev 193563)
+++ branches/safari-601.1.46-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -5380,6 +5380,8 @@
</span><span class="cx">                 BC779E171BB227CA00CAA8BF /* StyleCustomPropertyData.h in Headers */ = {isa = PBXBuildFile; fileRef = BC779E151BB226A200CAA8BF /* StyleCustomPropertyData.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 BC7D8FEF1BD03B6400FFE540 /* CSSUnsetValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC7D8FED1BD03B6400FFE540 /* CSSUnsetValue.cpp */; settings = {ASSET_TAGS = (); }; };
</span><span class="cx">                 BC7D8FF01BD03B6400FFE540 /* CSSUnsetValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7D8FEE1BD03B6400FFE540 /* CSSUnsetValue.h */; settings = {ASSET_TAGS = (); }; };
</span><ins>+                BC7D8FF31BD1A47900FFE540 /* CSSRevertValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC7D8FF11BD1A47900FFE540 /* CSSRevertValue.cpp */; settings = {ASSET_TAGS = (); }; };
+                BC7D8FF41BD1A47900FFE540 /* CSSRevertValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7D8FF21BD1A47900FFE540 /* CSSRevertValue.h */; settings = {ASSET_TAGS = (); }; };
</ins><span class="cx">                 BC7F44A80B9E324E00A9D081 /* ImageObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7F44A70B9E324E00A9D081 /* ImageObserver.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 BC7FA6200D1F0CBD00DB22A9 /* LiveNodeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC7FA61E0D1F0CBD00DB22A9 /* LiveNodeList.cpp */; };
</span><span class="cx">                 BC7FA6210D1F0CBD00DB22A9 /* LiveNodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7FA61F0D1F0CBD00DB22A9 /* LiveNodeList.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -12948,6 +12950,8 @@
</span><span class="cx">                 BC7B2AF80450824100A8000F /* Scrollbar.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = Scrollbar.h; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; usesTabs = 0; };
</span><span class="cx">                 BC7D8FED1BD03B6400FFE540 /* CSSUnsetValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSUnsetValue.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC7D8FEE1BD03B6400FFE540 /* CSSUnsetValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSUnsetValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                BC7D8FF11BD1A47900FFE540 /* CSSRevertValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSRevertValue.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                BC7D8FF21BD1A47900FFE540 /* CSSRevertValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSRevertValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 BC7F44A70B9E324E00A9D081 /* ImageObserver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ImageObserver.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC7FA61E0D1F0CBD00DB22A9 /* LiveNodeList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LiveNodeList.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC7FA61F0D1F0CBD00DB22A9 /* LiveNodeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveNodeList.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -22614,6 +22618,8 @@
</span><span class="cx">                                 9362640A0DE1137D009D5A00 /* CSSReflectionDirection.h */,
</span><span class="cx">                                 BC5A12DD0DC0414800C9AFAD /* CSSReflectValue.cpp */,
</span><span class="cx">                                 BC5A12DE0DC0414800C9AFAD /* CSSReflectValue.h */,
</span><ins>+                                BC7D8FF11BD1A47900FFE540 /* CSSRevertValue.cpp */,
+                                BC7D8FF21BD1A47900FFE540 /* CSSRevertValue.h */,
</ins><span class="cx">                                 A80E6CDC0A1989CA007FB8C5 /* CSSRule.cpp */,
</span><span class="cx">                                 A80E6CE30A1989CA007FB8C5 /* CSSRule.h */,
</span><span class="cx">                                 14CF7A7009F5CF9A00EB3665 /* CSSRule.idl */,
</span><span class="lines">@@ -24296,6 +24302,7 @@
</span><span class="cx">                                 82E3D8DF122EA0D1003AE5BC /* CSSPropertySourceData.h in Headers */,
</span><span class="cx">                                 9362640B0DE1137D009D5A00 /* CSSReflectionDirection.h in Headers */,
</span><span class="cx">                                 BC5A12E00DC0414800C9AFAD /* CSSReflectValue.h in Headers */,
</span><ins>+                                BC7D8FF41BD1A47900FFE540 /* CSSRevertValue.h in Headers */,
</ins><span class="cx">                                 A80E6D0D0A1989CA007FB8C5 /* CSSRule.h in Headers */,
</span><span class="cx">                                 A80E6CF20A1989CA007FB8C5 /* CSSRuleList.h in Headers */,
</span><span class="cx">                                 371F51A10D262FA000ECE0D5 /* CSSSegmentedFontFace.h in Headers */,
</span><span class="lines">@@ -25110,7 +25117,9 @@
</span><span class="cx">                                 A871DB2B0A150BD600B12A68 /* HTMLTableCaptionElement.h in Headers */,
</span><span class="cx">                                 A871DB2A0A150BD600B12A68 /* HTMLTableCellElement.h in Headers */,
</span><span class="cx">                                 A871DB2F0A150BD600B12A68 /* HTMLTableColElement.h in Headers */,
</span><ins>+                                836BAD221BD1CA670037356A /* HTMLTableDataCellElement.h in Headers */,
</ins><span class="cx">                                 A871DB270A150BD600B12A68 /* HTMLTableElement.h in Headers */,
</span><ins>+                                836BAD211BD1CA670037356A /* HTMLTableHeaderCellElement.h in Headers */,
</ins><span class="cx">                                 A871DB2C0A150BD600B12A68 /* HTMLTablePartElement.h in Headers */,
</span><span class="cx">                                 A871DB310A150BD600B12A68 /* HTMLTableRowElement.h in Headers */,
</span><span class="cx">                                 93442C9E0D2B335C00338FF9 /* HTMLTableRowsCollection.h in Headers */,
</span><span class="lines">@@ -25491,7 +25500,9 @@
</span><span class="cx">                                 BCA169A30BFD55B40019CA76 /* JSHTMLTableCaptionElement.h in Headers */,
</span><span class="cx">                                 BC06EDE40BFD6D0D00856E9D /* JSHTMLTableCellElement.h in Headers */,
</span><span class="cx">                                 BC06ED9E0BFD660600856E9D /* JSHTMLTableColElement.h in Headers */,
</span><ins>+                                836CB1F81BD1E41800AF1591 /* JSHTMLTableDataCellElement.h in Headers */,
</ins><span class="cx">                                 BC06EE050BFD71AA00856E9D /* JSHTMLTableElement.h in Headers */,
</span><ins>+                                836CB1F61BD1E41800AF1591 /* JSHTMLTableHeaderCellElement.h in Headers */,
</ins><span class="cx">                                 BC06EDA00BFD660600856E9D /* JSHTMLTableRowElement.h in Headers */,
</span><span class="cx">                                 BC06ED070BFD5BAE00856E9D /* JSHTMLTableSectionElement.h in Headers */,
</span><span class="cx">                                 D6489D26166FFCF1007C031B /* JSHTMLTemplateElement.h in Headers */,
</span><span class="lines">@@ -28052,6 +28063,7 @@
</span><span class="cx">                                 1ABA76CA11D20E50004C201C /* CSSPropertyNames.cpp in Sources */,
</span><span class="cx">                                 82E3D8DE122EA0D1003AE5BC /* CSSPropertySourceData.cpp in Sources */,
</span><span class="cx">                                 BC5A12DF0DC0414800C9AFAD /* CSSReflectValue.cpp in Sources */,
</span><ins>+                                BC7D8FF31BD1A47900FFE540 /* CSSRevertValue.cpp in Sources */,
</ins><span class="cx">                                 A80E6D060A1989CA007FB8C5 /* CSSRule.cpp in Sources */,
</span><span class="cx">                                 A80E6D090A1989CA007FB8C5 /* CSSRuleList.cpp in Sources */,
</span><span class="cx">                                 371F51A20D262FA000ECE0D5 /* CSSSegmentedFontFace.cpp in Sources */,
</span><span class="lines">@@ -29045,7 +29057,9 @@
</span><span class="cx">                                 BCA169A20BFD55B40019CA76 /* JSHTMLTableCaptionElement.cpp in Sources */,
</span><span class="cx">                                 BC06EDE30BFD6D0D00856E9D /* JSHTMLTableCellElement.cpp in Sources */,
</span><span class="cx">                                 BC06ED9D0BFD660600856E9D /* JSHTMLTableColElement.cpp in Sources */,
</span><ins>+                                836CB1F91BD1E41800AF1591 /* JSHTMLTableDataCellElement.cpp in Sources */,
</ins><span class="cx">                                 BC06EE040BFD71AA00856E9D /* JSHTMLTableElement.cpp in Sources */,
</span><ins>+                                836CB1F71BD1E41800AF1591 /* JSHTMLTableHeaderCellElement.cpp in Sources */,
</ins><span class="cx">                                 BC06ED9F0BFD660600856E9D /* JSHTMLTableRowElement.cpp in Sources */,
</span><span class="cx">                                 BC06ED060BFD5BAE00856E9D /* JSHTMLTableSectionElement.cpp in Sources */,
</span><span class="cx">                                 D6489D25166FFCF1007C031B /* JSHTMLTemplateElement.cpp in Sources */,
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCorebindingsobjcDOMCSSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/bindings/objc/DOMCSS.mm (193563 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/bindings/objc/DOMCSS.mm        2015-12-06 07:08:10 UTC (rev 193563)
+++ branches/safari-601.1.46-branch/Source/WebCore/bindings/objc/DOMCSS.mm        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -125,6 +125,7 @@
</span><span class="cx">         case WebCore::CSSValue::CSS_INHERIT:
</span><span class="cx">         case WebCore::CSSValue::CSS_INITIAL:
</span><span class="cx">         case WebCore::CSSValue::CSS_UNSET:
</span><ins>+        case WebCore::CSSValue::CSS_REVERT:
</ins><span class="cx">             return [DOMCSSValue class];
</span><span class="cx">         case WebCore::CSSValue::CSS_CUSTOM:
</span><span class="cx">             return [DOMCSSValue class];
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/css/CSSParser.cpp (193563 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/css/CSSParser.cpp        2015-12-06 07:08:10 UTC (rev 193563)
+++ branches/safari-601.1.46-branch/Source/WebCore/css/CSSParser.cpp        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx"> #include &quot;CSSPrimitiveValueMappings.h&quot;
</span><span class="cx"> #include &quot;CSSPropertySourceData.h&quot;
</span><span class="cx"> #include &quot;CSSReflectValue.h&quot;
</span><ins>+#include &quot;CSSRevertValue.h&quot;
</ins><span class="cx"> #include &quot;CSSSelector.h&quot;
</span><span class="cx"> #include &quot;CSSShadowValue.h&quot;
</span><span class="cx"> #include &quot;CSSStyleSheet.h&quot;
</span><span class="lines">@@ -1191,10 +1192,10 @@
</span><span class="cx">     if (!isKeywordPropertyID(propertyId)) {
</span><span class="cx">         // All properties accept the values of &quot;initial&quot; and &quot;inherit&quot;.
</span><span class="cx">         String lowerCaseString = string.lower();
</span><del>-        if (lowerCaseString != &quot;initial&quot; &amp;&amp; lowerCaseString != &quot;inherit&quot; &amp;&amp; lowerCaseString != &quot;unset&quot;)
</del><ins>+        if (lowerCaseString != &quot;initial&quot; &amp;&amp; lowerCaseString != &quot;inherit&quot; &amp;&amp; lowerCaseString != &quot;unset&quot; &amp;&amp; lowerCaseString != &quot;revert&quot;)
</ins><span class="cx">             return CSSParser::ParseResult::Error;
</span><span class="cx"> 
</span><del>-        // Parse initial/inherit/unset shorthands using the CSSParser.
</del><ins>+        // Parse initial/inherit/unset/revert shorthands using the CSSParser.
</ins><span class="cx">         if (shorthandForProperty(propertyId).length())
</span><span class="cx">             return CSSParser::ParseResult::Error;
</span><span class="cx">     }
</span><span class="lines">@@ -1213,6 +1214,8 @@
</span><span class="cx">         value = cssValuePool().createExplicitInitialValue();
</span><span class="cx">     else if (valueID == CSSValueUnset)
</span><span class="cx">         value = cssValuePool().createUnsetValue();
</span><ins>+    else if (valueID == CSSValueRevert)
+        value = cssValuePool().createRevertValue();
</ins><span class="cx">     else if (isValidKeywordPropertyAndValue(propertyId, valueID, parserContext, styleSheetContents))
</span><span class="cx">         value = cssValuePool().createIdentifierValue(valueID);
</span><span class="cx">     else
</span><span class="lines">@@ -1951,8 +1954,13 @@
</span><span class="cx">     } else if (id == CSSValueUnset) {
</span><span class="cx">         if (num != 1)
</span><span class="cx">             return false;
</span><del>-        addExpandedPropertyForValue(propId, cssValuePool.createUnsetValue(), important);
</del><ins>+        addExpandedPropertyForValue(propId, cssValuePool().createUnsetValue(), important);
</ins><span class="cx">         return true;
</span><ins>+    } else if (id == CSSValueRevert) {
+        if (num != 1)
+            return false;
+        addExpandedPropertyForValue(propId, cssValuePool().createRevertValue(), important);
+        return true;
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if (propId == CSSPropertyAll)
</span><span class="lines">@@ -4172,6 +4180,8 @@
</span><span class="cx">         value = cssValuePool().createExplicitInitialValue();
</span><span class="cx">     else if (id == CSSValueUnset)
</span><span class="cx">         value = cssValuePool().createUnsetValue();
</span><ins>+    else if (id == CSSValueRevert)
+        value = cssValuePool().createRevertValue();
</ins><span class="cx">     else {
</span><span class="cx">         RefPtr&lt;CSSValueList&gt; valueList = CSSValueList::createFromParserValueList(*m_valueList);
</span><span class="cx">         if (m_valueList-&gt;containsVariables())
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCorecssCSSRevertValuecppfromrev193529branchessafari601branchSourceWebCorecssCSSRevertValuecpp"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/Source/WebCore/css/CSSRevertValue.cpp (from rev 193529, branches/safari-601-branch/Source/WebCore/css/CSSRevertValue.cpp) (0 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/css/CSSRevertValue.cpp                                (rev 0)
+++ branches/safari-601.1.46-branch/Source/WebCore/css/CSSRevertValue.cpp        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+/*
+ * Copyright (C) 2015 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. ``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
+ * 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 &quot;config.h&quot;
+#include &quot;CSSRevertValue.h&quot;
+
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+String CSSRevertValue::customCSSText() const
+{
+    return ASCIILiteral(&quot;Revert&quot;);
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="branchessafari601146branchSourceWebCorecssCSSRevertValuehfromrev193529branchessafari601branchSourceWebCorecssCSSRevertValueh"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/Source/WebCore/css/CSSRevertValue.h (from rev 193529, branches/safari-601-branch/Source/WebCore/css/CSSRevertValue.h) (0 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/css/CSSRevertValue.h                                (rev 0)
+++ branches/safari-601.1.46-branch/Source/WebCore/css/CSSRevertValue.h        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+/*
+ * Copyright (C) 2015 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. ``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
+ * 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 CSSRevertValue_h
+#define CSSRevertValue_h
+
+#include &quot;CSSValue.h&quot;
+#include &lt;wtf/PassRefPtr.h&gt;
+
+namespace WebCore {
+
+class CSSRevertValue : public CSSValue {
+public:
+    static Ref&lt;CSSRevertValue&gt; create()
+    {
+        return adoptRef(*new CSSRevertValue);
+    }
+
+    String customCSSText() const;
+
+    bool equals(const CSSRevertValue&amp;) const { return true; }
+
+private:
+    CSSRevertValue()
+        : CSSValue(RevertClass)
+    {
+    }
+};
+
+} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSRevertValue, isRevertValue())
+
+#endif // CSSRevertValue_h
</ins></span></pre></div>
<a id="branchessafari601146branchSourceWebCorecssCSSValuecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/css/CSSValue.cpp (193563 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/css/CSSValue.cpp        2015-12-06 07:08:10 UTC (rev 193563)
+++ branches/safari-601.1.46-branch/Source/WebCore/css/CSSValue.cpp        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -114,6 +114,8 @@
</span><span class="cx">         return CSS_INITIAL;
</span><span class="cx">     if (isUnsetValue())
</span><span class="cx">         return CSS_UNSET;
</span><ins>+    if (isRevertValue())
+        return CSS_REVERT;
</ins><span class="cx">     return CSS_CUSTOM;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -203,6 +205,8 @@
</span><span class="cx">             return compareCSSValues&lt;CSSInitialValue&gt;(*this, other);
</span><span class="cx">         case UnsetClass:
</span><span class="cx">             return compareCSSValues&lt;CSSUnsetValue&gt;(*this, other);
</span><ins>+        case RevertClass:
+            return compareCSSValues&lt;CSSRevertValue&gt;(*this, other);
</ins><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><span class="cx">         case GridLineNamesClass:
</span><span class="cx">             return compareCSSValues&lt;CSSGridLineNamesValue&gt;(*this, other);
</span><span class="lines">@@ -305,6 +309,8 @@
</span><span class="cx">         return downcast&lt;CSSInitialValue&gt;(*this).customCSSText();
</span><span class="cx">     case UnsetClass:
</span><span class="cx">         return downcast&lt;CSSUnsetValue&gt;(*this).customCSSText();
</span><ins>+    case RevertClass:
+        return downcast&lt;CSSRevertValue&gt;(*this).customCSSText();
</ins><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><span class="cx">     case GridLineNamesClass:
</span><span class="cx">         return downcast&lt;CSSGridLineNamesValue&gt;(*this).customCSSText();
</span><span class="lines">@@ -417,6 +423,9 @@
</span><span class="cx">     case UnsetClass:
</span><span class="cx">         delete downcast&lt;CSSUnsetValue&gt;(this);
</span><span class="cx">         return;
</span><ins>+    case RevertClass:
+        delete downcast&lt;CSSRevertValue&gt;(this);
+        return;
</ins><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><span class="cx">     case GridLineNamesClass:
</span><span class="cx">         delete downcast&lt;CSSGridLineNamesValue&gt;(this);
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCorecssCSSValueh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/css/CSSValue.h (193563 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/css/CSSValue.h        2015-12-06 07:08:10 UTC (rev 193563)
+++ branches/safari-601.1.46-branch/Source/WebCore/css/CSSValue.h        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -47,7 +47,8 @@
</span><span class="cx">         CSS_VALUE_LIST = 2,
</span><span class="cx">         CSS_CUSTOM = 3,
</span><span class="cx">         CSS_INITIAL = 4,
</span><del>-        CSS_UNSET = 5
</del><ins>+        CSS_UNSET = 5,
+        CSS_REVERT = 6
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     // Override RefCounted's deref() to ensure operator delete is called on
</span><span class="lines">@@ -94,6 +95,7 @@
</span><span class="cx">     bool isInheritedValue() const { return m_classType == InheritedClass; }
</span><span class="cx">     bool isInitialValue() const { return m_classType == InitialClass; }
</span><span class="cx">     bool isUnsetValue() const { return m_classType == UnsetClass; }
</span><ins>+    bool isRevertValue() const { return m_classType == RevertClass; }
</ins><span class="cx">     bool treatAsInitialValue(CSSPropertyID) const;
</span><span class="cx">     bool treatAsInheritedValue(CSSPropertyID) const;
</span><span class="cx">     bool isLinearGradientValue() const { return m_classType == LinearGradientClass; }
</span><span class="lines">@@ -169,6 +171,7 @@
</span><span class="cx">         InheritedClass,
</span><span class="cx">         InitialClass,
</span><span class="cx">         UnsetClass,
</span><ins>+        RevertClass,
</ins><span class="cx"> 
</span><span class="cx">         ReflectClass,
</span><span class="cx">         ShadowClass,
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCorecssCSSValueKeywordsin"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/css/CSSValueKeywords.in (193563 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/css/CSSValueKeywords.in        2015-12-06 07:08:10 UTC (rev 193563)
+++ branches/safari-601.1.46-branch/Source/WebCore/css/CSSValueKeywords.in        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -4,6 +4,7 @@
</span><span class="cx"> inherit
</span><span class="cx"> initial
</span><span class="cx"> unset
</span><ins>+revert
</ins><span class="cx"> 
</span><span class="cx"> //
</span><span class="cx"> // CSS_PROP_OUTLINE_STYLE
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCorecssCSSValuePoolcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/css/CSSValuePool.cpp (193563 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/css/CSSValuePool.cpp        2015-12-06 07:08:10 UTC (rev 193563)
+++ branches/safari-601.1.46-branch/Source/WebCore/css/CSSValuePool.cpp        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx">     , m_implicitInitialValue(CSSInitialValue::createImplicit())
</span><span class="cx">     , m_explicitInitialValue(CSSInitialValue::createExplicit())
</span><span class="cx">     , m_unsetValue(CSSUnsetValue::create())
</span><ins>+    , m_revertValue(CSSRevertValue::create())
</ins><span class="cx">     , m_colorTransparent(CSSPrimitiveValue::createColor(Color::transparent))
</span><span class="cx">     , m_colorWhite(CSSPrimitiveValue::createColor(Color::white))
</span><span class="cx">     , m_colorBlack(CSSPrimitiveValue::createColor(Color::black))
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCorecssCSSValuePoolh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/css/CSSValuePool.h (193563 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/css/CSSValuePool.h        2015-12-06 07:08:10 UTC (rev 193563)
+++ branches/safari-601.1.46-branch/Source/WebCore/css/CSSValuePool.h        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include &quot;CSSInitialValue.h&quot;
</span><span class="cx"> #include &quot;CSSPrimitiveValue.h&quot;
</span><span class="cx"> #include &quot;CSSPropertyNames.h&quot;
</span><ins>+#include &quot;CSSRevertValue.h&quot;
</ins><span class="cx"> #include &quot;CSSUnsetValue.h&quot;
</span><span class="cx"> #include &quot;CSSValueKeywords.h&quot;
</span><span class="cx"> #include &lt;utility&gt;
</span><span class="lines">@@ -54,6 +55,7 @@
</span><span class="cx">     Ref&lt;CSSInitialValue&gt; createImplicitInitialValue() { return m_implicitInitialValue.copyRef(); }
</span><span class="cx">     Ref&lt;CSSInitialValue&gt; createExplicitInitialValue() { return m_explicitInitialValue.copyRef(); }
</span><span class="cx">     Ref&lt;CSSUnsetValue&gt; createUnsetValue() { return m_unsetValue.copyRef(); }
</span><ins>+    Ref&lt;CSSRevertValue&gt; createRevertValue() { return m_revertValue.copyRef(); }
</ins><span class="cx">     Ref&lt;CSSPrimitiveValue&gt; createIdentifierValue(CSSValueID identifier);
</span><span class="cx">     Ref&lt;CSSPrimitiveValue&gt; createIdentifierValue(CSSPropertyID identifier);
</span><span class="cx">     Ref&lt;CSSPrimitiveValue&gt; createColorValue(unsigned rgbValue);
</span><span class="lines">@@ -72,6 +74,7 @@
</span><span class="cx">     Ref&lt;CSSInitialValue&gt; m_implicitInitialValue;
</span><span class="cx">     Ref&lt;CSSInitialValue&gt; m_explicitInitialValue;
</span><span class="cx">     Ref&lt;CSSUnsetValue&gt; m_unsetValue;
</span><ins>+    Ref&lt;CSSRevertValue&gt; m_revertValue;
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;CSSPrimitiveValue&gt; m_identifierValueCache[numCSSValueKeywords];
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCorecssFontLoadercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/css/FontLoader.cpp (193563 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/css/FontLoader.cpp        2015-12-06 07:08:10 UTC (rev 193563)
+++ branches/safari-601.1.46-branch/Source/WebCore/css/FontLoader.cpp        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -300,7 +300,7 @@
</span><span class="cx">         return false;
</span><span class="cx">     
</span><span class="cx">     String fontValue = parsedStyle-&gt;getPropertyValue(CSSPropertyFont);
</span><del>-    if (fontValue == &quot;inherit&quot; || fontValue == &quot;initial&quot;)
</del><ins>+    if (fontValue == &quot;inherit&quot; || fontValue == &quot;initial&quot; || fontValue == &quot;unset&quot; || fontValue == &quot;revert&quot;)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;RenderStyle&gt; style = RenderStyle::create();
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCorecssSelectorCheckerh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/css/SelectorChecker.h (193563 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/css/SelectorChecker.h        2015-12-06 07:08:10 UTC (rev 193563)
+++ branches/safari-601.1.46-branch/Source/WebCore/css/SelectorChecker.h        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -102,7 +102,7 @@
</span><span class="cx">     static bool matchesFocusPseudoClass(const Element*);
</span><span class="cx">     static bool checkExactAttribute(const Element*, const CSSSelector*, const QualifiedName&amp; selectorAttributeName, const AtomicStringImpl* value);
</span><span class="cx"> 
</span><del>-    enum LinkMatchMask { MatchLink = 1, MatchVisited = 2, MatchAll = MatchLink | MatchVisited };
</del><ins>+    enum LinkMatchMask { MatchDefault = 0, MatchLink = 1, MatchVisited = 2, MatchAll = MatchLink | MatchVisited };
</ins><span class="cx">     static unsigned determineLinkMatchType(const CSSSelector*);
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/css/StyleResolver.cpp (193563 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/css/StyleResolver.cpp        2015-12-06 07:08:10 UTC (rev 193563)
+++ branches/safari-601.1.46-branch/Source/WebCore/css/StyleResolver.cpp        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -175,42 +175,6 @@
</span><span class="cx"> static const CSSPropertyID lastHighPriorityProperty = CSSPropertyFontSynthesis;
</span><span class="cx"> static const CSSPropertyID firstLowPriorityProperty = static_cast&lt;CSSPropertyID&gt;(lastHighPriorityProperty + 1);
</span><span class="cx"> 
</span><del>-class StyleResolver::CascadedProperties {
-public:
-    CascadedProperties(TextDirection, WritingMode);
-
-    struct Property {
-        void apply(StyleResolver&amp;);
-
-        CSSPropertyID id;
-        CSSValue* cssValue[3];
-    };
-
-    bool hasProperty(CSSPropertyID id) const;
-    Property&amp; property(CSSPropertyID);
-    void addMatches(const MatchResult&amp;, bool important, int startIndex, int endIndex, bool inheritedOnly = false);
-
-    void set(CSSPropertyID, CSSValue&amp;, unsigned linkMatchType);
-    void setDeferred(CSSPropertyID, CSSValue&amp;, unsigned linkMatchType);
-
-    void applyDeferredProperties(StyleResolver&amp;);
-
-    HashMap&lt;AtomicString, Property&gt;&amp; customProperties() { return m_customProperties; }
-    
-private:
-    void addStyleProperties(const StyleProperties&amp;, StyleRule&amp;, bool isImportant, bool inheritedOnly, PropertyWhitelistType, unsigned linkMatchType);
-    static void setPropertyInternal(Property&amp;, CSSPropertyID, CSSValue&amp;, unsigned linkMatchType);
-
-    Property m_properties[numCSSProperties + 2];
-    std::bitset&lt;numCSSProperties + 2&gt; m_propertyIsPresent;
-
-    Vector&lt;Property, 8&gt; m_deferredProperties;
-    HashMap&lt;AtomicString, Property&gt; m_customProperties;
-
-    TextDirection m_direction;
-    WritingMode m_writingMode;
-};
-
</del><span class="cx"> static void extractDirectionAndWritingMode(const RenderStyle&amp;, const StyleResolver::MatchResult&amp;, TextDirection&amp;, WritingMode&amp;);
</span><span class="cx"> 
</span><span class="cx"> #define HANDLE_INHERIT(prop, Prop) \
</span><span class="lines">@@ -458,6 +422,9 @@
</span><span class="cx">     m_style = nullptr;
</span><span class="cx">     m_pendingImageProperties.clear();
</span><span class="cx">     m_fontDirty = false;
</span><ins>+    
+    m_authorRollback = nullptr;
+    m_userRollback = nullptr;
</ins><span class="cx"> 
</span><span class="cx">     updateConversionData();
</span><span class="cx"> }
</span><span class="lines">@@ -872,20 +839,20 @@
</span><span class="cx">     cascade.addMatches(result, false, 0, result.matchedProperties().size() - 1);
</span><span class="cx">     
</span><span class="cx">     // Resolve custom properties first.
</span><del>-    applyCascadedProperties(cascade, CSSPropertyCustom, CSSPropertyCustom);
</del><ins>+    applyCascadedProperties(cascade, CSSPropertyCustom, CSSPropertyCustom, &amp;result);
</ins><span class="cx"> 
</span><del>-    applyCascadedProperties(cascade, firstCSSProperty, lastHighPriorityProperty);
</del><ins>+    applyCascadedProperties(cascade, firstCSSProperty, lastHighPriorityProperty, &amp;result);
</ins><span class="cx"> 
</span><span class="cx">     // If our font got dirtied, update it now.
</span><span class="cx">     updateFont();
</span><span class="cx"> 
</span><span class="cx">     // Now do rest of the properties.
</span><del>-    applyCascadedProperties(cascade, firstLowPriorityProperty, lastCSSProperty);
</del><ins>+    applyCascadedProperties(cascade, firstLowPriorityProperty, lastCSSProperty, &amp;result);
</ins><span class="cx"> 
</span><span class="cx">     // If our font got dirtied by one of the non-essential font props, update it a second time.
</span><span class="cx">     updateFont();
</span><span class="cx"> 
</span><del>-    cascade.applyDeferredProperties(*this);
</del><ins>+    cascade.applyDeferredProperties(*this, &amp;result);
</ins><span class="cx"> 
</span><span class="cx">     // Start loading resources referenced by this style.
</span><span class="cx">     loadPendingResources();
</span><span class="lines">@@ -1040,16 +1007,16 @@
</span><span class="cx">     cascade.addMatches(result, false, 0, result.matchedProperties().size() - 1);
</span><span class="cx"> 
</span><span class="cx">     // Resolve custom properties first.
</span><del>-    applyCascadedProperties(cascade, CSSPropertyCustom, CSSPropertyCustom);
</del><ins>+    applyCascadedProperties(cascade, CSSPropertyCustom, CSSPropertyCustom, &amp;result);
</ins><span class="cx"> 
</span><del>-    applyCascadedProperties(cascade, firstCSSProperty, lastHighPriorityProperty);
</del><ins>+    applyCascadedProperties(cascade, firstCSSProperty, lastHighPriorityProperty, &amp;result);
</ins><span class="cx"> 
</span><span class="cx">     // If our font got dirtied, update it now.
</span><span class="cx">     updateFont();
</span><span class="cx"> 
</span><del>-    applyCascadedProperties(cascade, firstLowPriorityProperty, lastCSSProperty);
</del><ins>+    applyCascadedProperties(cascade, firstLowPriorityProperty, lastCSSProperty, &amp;result);
</ins><span class="cx"> 
</span><del>-    cascade.applyDeferredProperties(*this);
</del><ins>+    cascade.applyDeferredProperties(*this, &amp;result);
</ins><span class="cx"> 
</span><span class="cx">     // Start loading resources referenced by this style.
</span><span class="cx">     loadPendingResources();
</span><span class="lines">@@ -1722,17 +1689,17 @@
</span><span class="cx">         cascade.addMatches(matchResult, false, matchResult.ranges.firstUARule, matchResult.ranges.lastUARule, applyInheritedOnly);
</span><span class="cx">         cascade.addMatches(matchResult, true, matchResult.ranges.firstUARule, matchResult.ranges.lastUARule, applyInheritedOnly);
</span><span class="cx"> 
</span><del>-        applyCascadedProperties(cascade, CSSPropertyWebkitRubyPosition, CSSPropertyWebkitRubyPosition);
</del><ins>+        applyCascadedProperties(cascade, CSSPropertyWebkitRubyPosition, CSSPropertyWebkitRubyPosition, &amp;matchResult);
</ins><span class="cx">         adjustStyleForInterCharacterRuby();
</span><span class="cx">     
</span><span class="cx">         // Resolve custom variables first.
</span><del>-        applyCascadedProperties(cascade, CSSPropertyCustom, CSSPropertyCustom);
</del><ins>+        applyCascadedProperties(cascade, CSSPropertyCustom, CSSPropertyCustom, &amp;matchResult);
</ins><span class="cx"> 
</span><span class="cx">         // Start by applying properties that other properties may depend on.
</span><del>-        applyCascadedProperties(cascade, firstCSSProperty, lastHighPriorityProperty);
</del><ins>+        applyCascadedProperties(cascade, firstCSSProperty, lastHighPriorityProperty, &amp;matchResult);
</ins><span class="cx">     
</span><span class="cx">         updateFont();
</span><del>-        applyCascadedProperties(cascade, firstLowPriorityProperty, lastCSSProperty);
</del><ins>+        applyCascadedProperties(cascade, firstLowPriorityProperty, lastCSSProperty, &amp;matchResult);
</ins><span class="cx"> 
</span><span class="cx">         state.cacheBorderAndBackground();
</span><span class="cx">     }
</span><span class="lines">@@ -1744,15 +1711,15 @@
</span><span class="cx">     cascade.addMatches(matchResult, true, matchResult.ranges.firstUARule, matchResult.ranges.lastUARule, applyInheritedOnly);
</span><span class="cx">     
</span><span class="cx">     // Resolve custom properties first.
</span><del>-    applyCascadedProperties(cascade, CSSPropertyCustom, CSSPropertyCustom);
</del><ins>+    applyCascadedProperties(cascade, CSSPropertyCustom, CSSPropertyCustom, &amp;matchResult);
</ins><span class="cx"> 
</span><del>-    applyCascadedProperties(cascade, CSSPropertyWebkitRubyPosition, CSSPropertyWebkitRubyPosition);
</del><ins>+    applyCascadedProperties(cascade, CSSPropertyWebkitRubyPosition, CSSPropertyWebkitRubyPosition, &amp;matchResult);
</ins><span class="cx">     
</span><span class="cx">     // Adjust the font size to be smaller if ruby-position is inter-character.
</span><span class="cx">     adjustStyleForInterCharacterRuby();
</span><span class="cx"> 
</span><span class="cx">     // Start by applying properties that other properties may depend on.
</span><del>-    applyCascadedProperties(cascade, firstCSSProperty, lastHighPriorityProperty);
</del><ins>+    applyCascadedProperties(cascade, firstCSSProperty, lastHighPriorityProperty, &amp;matchResult);
</ins><span class="cx"> 
</span><span class="cx">     // If the effective zoom value changes, we can't use the matched properties cache. Start over.
</span><span class="cx">     if (cacheItem &amp;&amp; cacheItem-&gt;renderStyle-&gt;effectiveZoom() != state.style()-&gt;effectiveZoom())
</span><span class="lines">@@ -1766,12 +1733,12 @@
</span><span class="cx">         return applyMatchedProperties(matchResult, element, DoNotUseMatchedPropertiesCache);
</span><span class="cx"> 
</span><span class="cx">     // Apply properties that no other properties depend on.
</span><del>-    applyCascadedProperties(cascade, firstLowPriorityProperty, lastCSSProperty);
</del><ins>+    applyCascadedProperties(cascade, firstLowPriorityProperty, lastCSSProperty, &amp;matchResult);
</ins><span class="cx"> 
</span><span class="cx">     // Finally, some properties must be applied in the order they were parsed.
</span><span class="cx">     // There are some CSS properties that affect the same RenderStyle values,
</span><span class="cx">     // so to preserve behavior, we queue them up during cascade and flush here.
</span><del>-    cascade.applyDeferredProperties(*this);
</del><ins>+    cascade.applyDeferredProperties(*this, &amp;matchResult);
</ins><span class="cx"> 
</span><span class="cx">     // Start loading resources referenced by this style.
</span><span class="cx">     loadPendingResources();
</span><span class="lines">@@ -1901,8 +1868,51 @@
</span><span class="cx">     return is&lt;SVGElement&gt;(m_state.element()) &amp;&amp; !(is&lt;SVGSVGElement&gt;(*m_state.element()) &amp;&amp; m_state.element()-&gt;parentNode());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
</del><ins>+StyleResolver::CascadedProperties* StyleResolver::cascadedPropertiesForRollback(const MatchResult&amp; matchResult)
</ins><span class="cx"> {
</span><ins>+    ASSERT(cascadeLevel() != UserAgentLevel);
+    
+    TextDirection direction;
+    WritingMode writingMode;
+    extractDirectionAndWritingMode(*state().style(), matchResult, direction, writingMode);
+
+    if (cascadeLevel() == AuthorLevel) {
+        CascadedProperties* authorRollback = state().authorRollback();
+        if (authorRollback)
+            return authorRollback;
+        
+        auto newAuthorRollback(std::make_unique&lt;CascadedProperties&gt;(direction, writingMode));
+        
+        // This special rollback cascade contains UA rules and user rules but no author rules.
+        newAuthorRollback-&gt;addMatches(matchResult, false, matchResult.ranges.firstUARule, matchResult.ranges.lastUARule, false);
+        newAuthorRollback-&gt;addMatches(matchResult, false, matchResult.ranges.firstUserRule, matchResult.ranges.lastUserRule, false);
+        newAuthorRollback-&gt;addMatches(matchResult, true, matchResult.ranges.firstUserRule, matchResult.ranges.lastUserRule, false);
+        newAuthorRollback-&gt;addMatches(matchResult, true, matchResult.ranges.firstUARule, matchResult.ranges.lastUARule, false);
+    
+        state().setAuthorRollback(newAuthorRollback);
+        return state().authorRollback();
+    }
+    
+    if (cascadeLevel() == UserLevel) {
+        CascadedProperties* userRollback = state().userRollback();
+        if (userRollback)
+            return userRollback;
+        
+        auto newUserRollback(std::make_unique&lt;CascadedProperties&gt;(direction, writingMode));
+        
+        // This special rollback cascade contains only UA rules.
+        newUserRollback-&gt;addMatches(matchResult, false, matchResult.ranges.firstUARule, matchResult.ranges.lastUARule, false);
+        newUserRollback-&gt;addMatches(matchResult, true, matchResult.ranges.firstUARule, matchResult.ranges.lastUARule, false);
+    
+        state().setUserRollback(newUserRollback);
+        return state().userRollback();
+    }
+    
+    return nullptr;
+}
+
+void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value, SelectorChecker::LinkMatchMask linkMatchMask, const MatchResult* matchResult)
+{
</ins><span class="cx">     ASSERT_WITH_MESSAGE(!isShorthandCSSProperty(id), &quot;Shorthand property id = %d wasn't expanded at parsing time&quot;, id);
</span><span class="cx"> 
</span><span class="cx">     State&amp; state = m_state;
</span><span class="lines">@@ -1921,25 +1931,60 @@
</span><span class="cx">     if (CSSProperty::isDirectionAwareProperty(id)) {
</span><span class="cx">         CSSPropertyID newId = CSSProperty::resolveDirectionAwareProperty(id, state.style()-&gt;direction(), state.style()-&gt;writingMode());
</span><span class="cx">         ASSERT(newId != id);
</span><del>-        return applyProperty(newId, valueToApply.get());
</del><ins>+        return applyProperty(newId, valueToApply.get(), linkMatchMask, matchResult);
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     CSSValue* valueToCheckForInheritInitial = valueToApply.get();
</span><ins>+    CSSCustomPropertyValue* customPropertyValue = nullptr;
+    
</ins><span class="cx">     if (id == CSSPropertyCustom) {
</span><del>-        CSSCustomPropertyValue* customProperty = &amp;downcast&lt;CSSCustomPropertyValue&gt;(*valueToApply);
-        valueToCheckForInheritInitial = customProperty-&gt;value().get();
</del><ins>+        customPropertyValue = &amp;downcast&lt;CSSCustomPropertyValue&gt;(*valueToApply);
+        valueToCheckForInheritInitial = customPropertyValue-&gt;value().get();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool isInherit = state.parentStyle() &amp;&amp; valueToCheckForInheritInitial-&gt;isInheritedValue();
</span><span class="cx">     bool isInitial = valueToCheckForInheritInitial-&gt;isInitialValue() || (!state.parentStyle() &amp;&amp; valueToCheckForInheritInitial-&gt;isInheritedValue());
</span><span class="cx">     
</span><del>-    if (valueToCheckForInheritInitial-&gt;isUnsetValue()) {
</del><ins>+    bool isUnset = valueToCheckForInheritInitial-&gt;isUnsetValue();
+    bool isRevert = valueToCheckForInheritInitial-&gt;isRevertValue();
+
+    if (isRevert) {
+        if (cascadeLevel() == UserAgentLevel || !matchResult)
+            isUnset = true;
+        else {
+            // Fetch the correct rollback object from the state, building it if necessary.
+            // This requires having the original MatchResult available.
+            auto* rollback = cascadedPropertiesForRollback(*matchResult);
+            ASSERT(rollback);
+
+            // With the cascade built, we need to obtain the property and apply it. If the property is
+            // not present, then we behave like &quot;unset.&quot; Otherwise we apply the property instead of
+            // our own.
+            if (customPropertyValue) {
+                if (rollback-&gt;hasCustomProperty(customPropertyValue-&gt;name())) {
+                    auto property = rollback-&gt;customProperty(customPropertyValue-&gt;name());
+                    if (property.cssValue[linkMatchMask])
+                        applyProperty(property.id, property.cssValue[linkMatchMask], linkMatchMask, matchResult);
+                    return;
+                }
+            } else if (rollback-&gt;hasProperty(id)) {
+                auto&amp; property = rollback-&gt;property(id);
+                if (property.cssValue[linkMatchMask])
+                    applyProperty(property.id, property.cssValue[linkMatchMask], linkMatchMask, matchResult);
+                return;
+            }
+        
+            isUnset = true;
+        }
+    }
+    
+    if (isUnset) {
</ins><span class="cx">         if (CSSProperty::isInheritedProperty(id))
</span><span class="cx">             isInherit = true;
</span><span class="cx">         else
</span><span class="cx">             isInitial = true;
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     ASSERT(!isInherit || !isInitial); // isInherit -&gt; !isInitial &amp;&amp; isInitial -&gt; !isInherit
</span><span class="cx"> 
</span><span class="cx">     if (!state.applyPropertyToRegularStyle() &amp;&amp; (!state.applyPropertyToVisitedLinkStyle() || !isValidVisitedLinkProperty(id))) {
</span><span class="lines">@@ -2592,10 +2637,21 @@
</span><span class="cx">     return m_properties[id];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void StyleResolver::CascadedProperties::setPropertyInternal(Property&amp; property, CSSPropertyID id, CSSValue&amp; cssValue, unsigned linkMatchType)
</del><ins>+inline bool StyleResolver::CascadedProperties::hasCustomProperty(const String&amp; name) const
</ins><span class="cx"> {
</span><ins>+    return m_customProperties.contains(name);
+}
+
+inline StyleResolver::CascadedProperties::Property StyleResolver::CascadedProperties::customProperty(const String&amp; name) const
+{
+    return m_customProperties.get(name);
+}
+
+void StyleResolver::CascadedProperties::setPropertyInternal(Property&amp; property, CSSPropertyID id, CSSValue&amp; cssValue, unsigned linkMatchType, CascadeLevel cascadeLevel)
+{
</ins><span class="cx">     ASSERT(linkMatchType &lt;= SelectorChecker::MatchAll);
</span><span class="cx">     property.id = id;
</span><ins>+    property.level = cascadeLevel;
</ins><span class="cx">     if (linkMatchType == SelectorChecker::MatchAll) {
</span><span class="cx">         property.cssValue[0] = &amp;cssValue;
</span><span class="cx">         property.cssValue[SelectorChecker::MatchLink] = &amp;cssValue;
</span><span class="lines">@@ -2604,7 +2660,7 @@
</span><span class="cx">         property.cssValue[linkMatchType] = &amp;cssValue;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void StyleResolver::CascadedProperties::set(CSSPropertyID id, CSSValue&amp; cssValue, unsigned linkMatchType)
</del><ins>+void StyleResolver::CascadedProperties::set(CSSPropertyID id, CSSValue&amp; cssValue, unsigned linkMatchType, CascadeLevel cascadeLevel)
</ins><span class="cx"> {
</span><span class="cx">     if (CSSProperty::isDirectionAwareProperty(id))
</span><span class="cx">         id = CSSProperty::resolveDirectionAwareProperty(id, m_direction, m_writingMode);
</span><span class="lines">@@ -2621,11 +2677,11 @@
</span><span class="cx">             Property property;
</span><span class="cx">             property.id = id;
</span><span class="cx">             memset(property.cssValue, 0, sizeof(property.cssValue));
</span><del>-            setPropertyInternal(property, id, cssValue, linkMatchType);
</del><ins>+            setPropertyInternal(property, id, cssValue, linkMatchType, cascadeLevel);
</ins><span class="cx">             customProperties().set(customValue.name(), property);
</span><span class="cx">         } else {
</span><span class="cx">             Property property = customProperties().get(customValue.name());
</span><del>-            setPropertyInternal(property, id, cssValue, linkMatchType);
</del><ins>+            setPropertyInternal(property, id, cssValue, linkMatchType, cascadeLevel);
</ins><span class="cx">             customProperties().set(customValue.name(), property);
</span><span class="cx">         }
</span><span class="cx">         return;
</span><span class="lines">@@ -2634,21 +2690,21 @@
</span><span class="cx">     if (!m_propertyIsPresent[id])
</span><span class="cx">         memset(property.cssValue, 0, sizeof(property.cssValue));
</span><span class="cx">     m_propertyIsPresent.set(id);
</span><del>-    setPropertyInternal(property, id, cssValue, linkMatchType);
</del><ins>+    setPropertyInternal(property, id, cssValue, linkMatchType, cascadeLevel);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void StyleResolver::CascadedProperties::setDeferred(CSSPropertyID id, CSSValue&amp; cssValue, unsigned linkMatchType)
</del><ins>+void StyleResolver::CascadedProperties::setDeferred(CSSPropertyID id, CSSValue&amp; cssValue, unsigned linkMatchType, CascadeLevel cascadeLevel)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!CSSProperty::isDirectionAwareProperty(id));
</span><span class="cx">     ASSERT(shouldApplyPropertyInParseOrder(id));
</span><span class="cx"> 
</span><span class="cx">     Property property;
</span><span class="cx">     memset(property.cssValue, 0, sizeof(property.cssValue));
</span><del>-    setPropertyInternal(property, id, cssValue, linkMatchType);
</del><ins>+    setPropertyInternal(property, id, cssValue, linkMatchType, cascadeLevel);
</ins><span class="cx">     m_deferredProperties.append(property);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void StyleResolver::CascadedProperties::addStyleProperties(const StyleProperties&amp; properties, StyleRule&amp;, bool isImportant, bool inheritedOnly, PropertyWhitelistType propertyWhitelistType, unsigned linkMatchType)
</del><ins>+void StyleResolver::CascadedProperties::addStyleProperties(const StyleProperties&amp; properties, StyleRule&amp;, bool isImportant, bool inheritedOnly, PropertyWhitelistType propertyWhitelistType, unsigned linkMatchType, CascadeLevel cascadeLevel)
</ins><span class="cx"> {
</span><span class="cx">     for (unsigned i = 0, count = properties.propertyCount(); i &lt; count; ++i) {
</span><span class="cx">         auto current = properties.propertyAt(i);
</span><span class="lines">@@ -2670,12 +2726,21 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">         if (shouldApplyPropertyInParseOrder(propertyID))
</span><del>-            setDeferred(propertyID, *current.value(), linkMatchType);
</del><ins>+            setDeferred(propertyID, *current.value(), linkMatchType, cascadeLevel);
</ins><span class="cx">         else
</span><del>-            set(propertyID, *current.value(), linkMatchType);
</del><ins>+            set(propertyID, *current.value(), linkMatchType, cascadeLevel);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static CascadeLevel cascadeLevelForIndex(const StyleResolver::MatchResult&amp; matchResult, int index)
+{
+    if (index &gt;= matchResult.ranges.firstUARule &amp;&amp; index &lt;= matchResult.ranges.lastUARule)
+        return UserAgentLevel;
+    if (index &gt;= matchResult.ranges.firstUserRule &amp;&amp; index &lt;= matchResult.ranges.lastUserRule)
+        return UserLevel;
+    return AuthorLevel;
+}
+
</ins><span class="cx"> void StyleResolver::CascadedProperties::addMatches(const MatchResult&amp; matchResult, bool important, int startIndex, int endIndex, bool inheritedOnly)
</span><span class="cx"> {
</span><span class="cx">     if (startIndex == -1)
</span><span class="lines">@@ -2683,24 +2748,26 @@
</span><span class="cx"> 
</span><span class="cx">     for (int i = startIndex; i &lt;= endIndex; ++i) {
</span><span class="cx">         const MatchedProperties&amp; matchedProperties = matchResult.matchedProperties()[i];
</span><del>-        addStyleProperties(*matchedProperties.properties, *matchResult.matchedRules[i], important, inheritedOnly, static_cast&lt;PropertyWhitelistType&gt;(matchedProperties.whitelistType), matchedProperties.linkMatchType);
</del><ins>+        addStyleProperties(*matchedProperties.properties, *matchResult.matchedRules[i], important, inheritedOnly, static_cast&lt;PropertyWhitelistType&gt;(matchedProperties.whitelistType), matchedProperties.linkMatchType,
+            cascadeLevelForIndex(matchResult, i));
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void StyleResolver::CascadedProperties::applyDeferredProperties(StyleResolver&amp; resolver)
</del><ins>+void StyleResolver::CascadedProperties::applyDeferredProperties(StyleResolver&amp; resolver, const MatchResult* matchResult)
</ins><span class="cx"> {
</span><span class="cx">     for (auto&amp; property : m_deferredProperties)
</span><del>-        property.apply(resolver);
</del><ins>+        property.apply(resolver, matchResult);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void StyleResolver::CascadedProperties::Property::apply(StyleResolver&amp; resolver)
</del><ins>+void StyleResolver::CascadedProperties::Property::apply(StyleResolver&amp; resolver, const MatchResult* matchResult)
</ins><span class="cx"> {
</span><span class="cx">     State&amp; state = resolver.state();
</span><ins>+    state.setCascadeLevel(level);
</ins><span class="cx"> 
</span><del>-    if (cssValue[0]) {
</del><ins>+    if (cssValue[SelectorChecker::MatchDefault]) {
</ins><span class="cx">         state.setApplyPropertyToRegularStyle(true);
</span><span class="cx">         state.setApplyPropertyToVisitedLinkStyle(false);
</span><del>-        resolver.applyProperty(id, cssValue[0]);
</del><ins>+        resolver.applyProperty(id, cssValue[SelectorChecker::MatchDefault], SelectorChecker::MatchDefault, matchResult);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (state.style()-&gt;insideLink() == NotInsideLink)
</span><span class="lines">@@ -2709,20 +2776,20 @@
</span><span class="cx">     if (cssValue[SelectorChecker::MatchLink]) {
</span><span class="cx">         state.setApplyPropertyToRegularStyle(true);
</span><span class="cx">         state.setApplyPropertyToVisitedLinkStyle(false);
</span><del>-        resolver.applyProperty(id, cssValue[SelectorChecker::MatchLink]);
</del><ins>+        resolver.applyProperty(id, cssValue[SelectorChecker::MatchLink], SelectorChecker::MatchLink, matchResult);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (cssValue[SelectorChecker::MatchVisited]) {
</span><span class="cx">         state.setApplyPropertyToRegularStyle(false);
</span><span class="cx">         state.setApplyPropertyToVisitedLinkStyle(true);
</span><del>-        resolver.applyProperty(id, cssValue[SelectorChecker::MatchVisited]);
</del><ins>+        resolver.applyProperty(id, cssValue[SelectorChecker::MatchVisited], SelectorChecker::MatchVisited, matchResult);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     state.setApplyPropertyToRegularStyle(true);
</span><span class="cx">     state.setApplyPropertyToVisitedLinkStyle(false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void StyleResolver::applyCascadedProperties(CascadedProperties&amp; cascade, int firstProperty, int lastProperty)
</del><ins>+void StyleResolver::applyCascadedProperties(CascadedProperties&amp; cascade, int firstProperty, int lastProperty, const MatchResult* matchResult)
</ins><span class="cx"> {
</span><span class="cx">     for (int id = firstProperty; id &lt;= lastProperty; ++id) {
</span><span class="cx">         CSSPropertyID propertyID = static_cast&lt;CSSPropertyID&gt;(id);
</span><span class="lines">@@ -2731,12 +2798,12 @@
</span><span class="cx">         if (propertyID == CSSPropertyCustom) {
</span><span class="cx">             HashMap&lt;AtomicString, CascadedProperties::Property&gt;::iterator end = cascade.customProperties().end();
</span><span class="cx">             for (HashMap&lt;AtomicString, CascadedProperties::Property&gt;::iterator it = cascade.customProperties().begin(); it != end; ++it)
</span><del>-                it-&gt;value.apply(*this);
</del><ins>+                it-&gt;value.apply(*this, matchResult);
</ins><span class="cx">             continue;
</span><span class="cx">         }
</span><span class="cx">         auto&amp; property = cascade.property(propertyID);
</span><span class="cx">         ASSERT(!shouldApplyPropertyInParseOrder(propertyID));
</span><del>-        property.apply(*this);
</del><ins>+        property.apply(*this, matchResult);
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if (firstProperty == CSSPropertyCustom)
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCorecssStyleResolverh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/css/StyleResolver.h (193563 => 193564)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/css/StyleResolver.h        2015-12-06 07:08:10 UTC (rev 193563)
+++ branches/safari-601.1.46-branch/Source/WebCore/css/StyleResolver.h        2015-12-06 07:09:52 UTC (rev 193564)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx"> #include &quot;SelectorFilter.h&quot;
</span><span class="cx"> #include &quot;StyleInheritedData.h&quot;
</span><span class="cx"> #include &quot;ViewportStyleResolver.h&quot;
</span><ins>+#include &lt;bitset&gt;
</ins><span class="cx"> #include &lt;memory&gt;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/HashSet.h&gt;
</span><span class="lines">@@ -120,6 +121,12 @@
</span><span class="cx">     MatchOnlyUserAgentRules,
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+enum CascadeLevel {
+    UserAgentLevel,
+    AuthorLevel,
+    UserLevel
+};
+
</ins><span class="cx"> class PseudoStyleRequest {
</span><span class="cx"> public:
</span><span class="cx">     PseudoStyleRequest(PseudoId pseudoId, RenderScrollbar* scrollbar = nullptr, ScrollbarPart scrollbarPart = NoPart)
</span><span class="lines">@@ -196,6 +203,8 @@
</span><span class="cx">     Vector&lt;RefPtr&lt;StyleRule&gt;&gt; pseudoStyleRulesForElement(Element*, PseudoId, unsigned rulesToInclude = AllButEmptyCSSRules);
</span><span class="cx"> 
</span><span class="cx"> public:
</span><ins>+    struct MatchResult;
+
</ins><span class="cx">     void applyPropertyToStyle(CSSPropertyID, CSSValue*, RenderStyle*);
</span><span class="cx"> 
</span><span class="cx">     void applyPropertyToCurrentStyle(CSSPropertyID, CSSValue*);
</span><span class="lines">@@ -286,7 +295,46 @@
</span><span class="cx">     private:
</span><span class="cx">         Vector&lt;MatchedProperties, 64&gt; m_matchedProperties;
</span><span class="cx">     };
</span><ins>+    
+    class CascadedProperties {
+    public:
+        CascadedProperties(TextDirection, WritingMode);
</ins><span class="cx"> 
</span><ins>+        struct Property {
+            void apply(StyleResolver&amp;, const MatchResult*);
+
+            CSSPropertyID id;
+            CascadeLevel level;
+            CSSValue* cssValue[3];
+        };
+
+        bool hasProperty(CSSPropertyID) const;
+        Property&amp; property(CSSPropertyID);
+        void addMatches(const MatchResult&amp;, bool important, int startIndex, int endIndex, bool inheritedOnly = false);
+
+        void set(CSSPropertyID, CSSValue&amp;, unsigned linkMatchType, CascadeLevel);
+        void setDeferred(CSSPropertyID, CSSValue&amp;, unsigned linkMatchType, CascadeLevel);
+
+        void applyDeferredProperties(StyleResolver&amp;, const MatchResult*);
+
+        HashMap&lt;AtomicString, Property&gt;&amp; customProperties() { return m_customProperties; }
+        bool hasCustomProperty(const String&amp;) const;
+        Property customProperty(const String&amp;) const;
+        
+    private:
+        void addStyleProperties(const StyleProperties&amp;, StyleRule&amp;, bool isImportant, bool inheritedOnly, PropertyWhitelistType, unsigned linkMatchType, CascadeLevel);
+        static void setPropertyInternal(Property&amp;, CSSPropertyID, CSSValue&amp;, unsigned linkMatchType, CascadeLevel);
+
+        Property m_properties[numCSSProperties + 2];
+        std::bitset&lt;numCSSProperties + 2&gt; m_propertyIsPresent;
+
+        Vector&lt;Property, 8&gt; m_deferredProperties;
+        HashMap&lt;AtomicString, Property&gt; m_customProperties;
+
+        TextDirection m_direction;
+        WritingMode m_writingMode;
+    };
+
</ins><span class="cx"> private:
</span><span class="cx">     // This function fixes up the default font size if it detects that the current generic font family has changed. -dwh
</span><span class="cx">     void checkForGenericFamilyChange(RenderStyle*, RenderStyle* parentStyle);
</span><span class="lines">@@ -307,9 +355,7 @@
</span><span class="cx">     enum ShouldUseMatchedPropertiesCache { DoNotUseMatchedPropertiesCache = 0, UseMatchedPropertiesCache };
</span><span class="cx">     void applyMatchedProperties(const MatchResult&amp;, const Element*, ShouldUseMatchedPropertiesCache = UseMatchedPropertiesCache);
</span><span class="cx"> 
</span><del>-    class CascadedProperties;
-
-    void applyCascadedProperties(CascadedProperties&amp;, int firstProperty, int lastProperty);
</del><ins>+    void applyCascadedProperties(CascadedProperties&amp;, int firstProperty, int lastProperty, const MatchResult*);
</ins><span class="cx">     void cascadeMatches(CascadedProperties&amp;, const MatchResult&amp;, bool important, int startIndex, int endIndex, bool inheritedOnly);
</span><span class="cx"> 
</span><span class="cx">     static bool isValidRegionStyleProperty(CSSPropertyID);
</span><span class="lines">@@ -378,7 +424,7 @@
</span><span class="cx">         bool applyPropertyToRegularStyle() const { return m_applyPropertyToRegularStyle; }
</span><span class="cx">         bool applyPropertyToVisitedLinkStyle() const { return m_applyPropertyToVisitedLinkStyle; }
</span><span class="cx">         PendingImagePropertyMap&amp; pendingImageProperties() { return m_pendingImageProperties; }
</span><del>-
</del><ins>+        
</ins><span class="cx">         Vector&lt;RefPtr&lt;ReferenceFilterOperation&gt;&gt;&amp; filtersWithPendingSVGDocuments() { return m_filtersWithPendingSVGDocuments; }
</span><span class="cx"> 
</span><span class="cx">         void setFontDirty(bool isDirty) { m_fontDirty = isDirty; }
</span><span class="lines">@@ -404,6 +450,15 @@
</span><span class="cx"> 
</span><span class="cx">         CSSToLengthConversionData cssToLengthConversionData() const { return m_cssToLengthConversionData; }
</span><span class="cx"> 
</span><ins>+        CascadeLevel cascadeLevel() const { return m_cascadeLevel; }
+        void setCascadeLevel(CascadeLevel level) { m_cascadeLevel = level; }
+        
+        CascadedProperties* authorRollback() const { return m_authorRollback.get(); }
+        CascadedProperties* userRollback() const { return m_userRollback.get(); }
+        
+        void setAuthorRollback(std::unique_ptr&lt;CascadedProperties&gt;&amp; rollback) { m_authorRollback = WTF::move(rollback); }
+        void setUserRollback(std::unique_ptr&lt;CascadedProperties&gt;&amp; rollback) { m_userRollback = WTF::move(rollback); }
+        
</ins><span class="cx">     private:
</span><span class="cx">         void updateConversionData();
</span><span class="cx"> 
</span><span class="lines">@@ -436,6 +491,10 @@
</span><span class="cx">         Color m_backgroundColor;
</span><span class="cx"> 
</span><span class="cx">         CSSToLengthConversionData m_cssToLengthConversionData;
</span><ins>+        
+        CascadeLevel m_cascadeLevel { UserAgentLevel };
+        std::unique_ptr&lt;CascadedProperties&gt; m_authorRollback;
+        std::unique_ptr&lt;CascadedProperties&gt; m_userRollback;
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     State&amp; state() { return m_state; }
</span><span class="lines">@@ -453,6 +512,11 @@
</span><span class="cx">     bool applyPropertyToRegularStyle() const { return m_state.applyPropertyToRegularStyle(); }
</span><span class="cx">     bool applyPropertyToVisitedLinkStyle() const { return m_state.applyPropertyToVisitedLinkStyle(); }
</span><span class="cx"> 
</span><ins>+    CascadeLevel cascadeLevel() const { return m_state.cascadeLevel(); }
+    void setCascadeLevel(CascadeLevel level) { m_state.setCascadeLevel(level); }
+    
+    CascadedProperties* cascadedPropertiesForRollback(const MatchResult&amp;);
+
</ins><span class="cx">     CSSToStyleMap* styleMap() { return &amp;m_styleMap; }
</span><span class="cx">     InspectorCSSOMWrappers&amp; inspectorCSSOMWrappers() { return m_inspectorCSSOMWrappers; }
</span><span class="cx">     const FontDescription&amp; fontDescription() { return m_state.fontDescription(); }
</span><span class="lines">@@ -470,7 +534,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool canShareStyleWithControl(StyledElement*) const;
</span><span class="cx"> 
</span><del>-    void applyProperty(CSSPropertyID, CSSValue*);
</del><ins>+    void applyProperty(CSSPropertyID, CSSValue*, SelectorChecker::LinkMatchMask = SelectorChecker::MatchDefault, const MatchResult* = nullptr);
</ins><span class="cx">     RefPtr&lt;CSSValue&gt; resolvedVariableValue(CSSPropertyID, const CSSVariableDependentValue&amp;);
</span><span class="cx"> 
</span><span class="cx">     void applySVGProperty(CSSPropertyID, CSSValue*);
</span></span></pre>
</div>
</div>

</body>
</html>