<!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>[188512] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/188512">188512</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2015-08-15 10:59:05 -0700 (Sat, 15 Aug 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Implement parsing for CSS will-change
https://bugs.webkit.org/show_bug.cgi?id=148052
Reviewed by Dean Jackson.
Source/WebCore:
Syntax is
will-change: auto | <animateable-feature>#
where
<animateable-feature> = scroll-position | contents | <custom-ident>
To support this, add WillChangeData which stores a vector of "feature"
and CSS property squished into 16 bits. This is stored in rareNonInheritedData.
If null or an empty list, the property value is 'auto'. The list preserves
unknown properties.
Test: fast/css/will-change-parsing.html
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::getWillChangePropertyValue):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::isValidGridPositionCustomIdent): Renamed from isValidCustomIdent(),
since it's grid-specific.
(WebCore::CSSParser::parseIntegerOrCustomIdentFromGridPosition):
(WebCore::valueIsCSSKeyword): Returns true for the "CSS-wide" keywords like
"initial", "inherit" and "default".
(WebCore::CSSParser::parseFontFamily):
(WebCore::isValidWillChangeAnimatableFeature):
(WebCore::CSSParser::parseWillChange):
(WebCore::isValidCustomIdent): Deleted.
* css/CSSParser.h:
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isPropertyID): New utility function.
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueWillChange):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setWillChange):
* rendering/style/RenderStyle.h:
* rendering/style/StyleAllInOne.cpp:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
(WebCore::StyleRareNonInheritedData::willChangeDataEquivalent):
* rendering/style/StyleRareNonInheritedData.h:
* rendering/style/WillChangeData.cpp: Added.
(WebCore::WillChangeData::operator==):
(WebCore::WillChangeData::containsScrollPosition):
(WebCore::WillChangeData::containsContents):
(WebCore::WillChangeData::containsProperty):
(WebCore::WillChangeData::addFeature):
(WebCore::WillChangeData::featureAt):
* rendering/style/WillChangeData.h: Added.
(WebCore::WillChangeData::create):
(WebCore::WillChangeData::operator!=):
(WebCore::WillChangeData::isAuto):
(WebCore::WillChangeData::numFeatures):
(WebCore::WillChangeData::WillChangeData):
(WebCore::WillChangeData::AnimatableFeature::feature):
(WebCore::WillChangeData::AnimatableFeature::property):
(WebCore::WillChangeData::AnimatableFeature::featurePropertyPair):
(WebCore::WillChangeData::AnimatableFeature::AnimatableFeature):
(WebCore::WillChangeData::AnimatableFeature::operator==):
LayoutTests:
will-change parsing test.
* fast/css/will-change-parsing-expected.txt: Added.
* fast/css/will-change-parsing.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParserh">trunk/Source/WebCore/css/CSSParser.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValueh">trunk/Source/WebCore/css/CSSPrimitiveValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSPropertyNamesin">trunk/Source/WebCore/css/CSSPropertyNames.in</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueKeywordsin">trunk/Source/WebCore/css/CSSValueKeywords.in</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderCustomh">trunk/Source/WebCore/css/StyleBuilderCustom.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStylecpp">trunk/Source/WebCore/rendering/style/RenderStyle.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleh">trunk/Source/WebCore/rendering/style/RenderStyle.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleAllInOnecpp">trunk/Source/WebCore/rendering/style/StyleAllInOne.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatacpp">trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatah">trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcsswillchangeparsingexpectedtxt">trunk/LayoutTests/fast/css/will-change-parsing-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcsswillchangeparsinghtml">trunk/LayoutTests/fast/css/will-change-parsing.html</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleWillChangeDatacpp">trunk/Source/WebCore/rendering/style/WillChangeData.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleWillChangeDatah">trunk/Source/WebCore/rendering/style/WillChangeData.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (188511 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-08-15 17:57:25 UTC (rev 188511)
+++ trunk/LayoutTests/ChangeLog        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-08-14 Simon Fraser <simon.fraser@apple.com>
+
+ Implement parsing for CSS will-change
+ https://bugs.webkit.org/show_bug.cgi?id=148052
+
+ Reviewed by Dean Jackson.
+
+ will-change parsing test.
+
+ * fast/css/will-change-parsing-expected.txt: Added.
+ * fast/css/will-change-parsing.html: Added.
+
</ins><span class="cx"> 2015-08-14 Alexey Proskuryakov <ap@apple.com>
</span><span class="cx">
</span><span class="cx"> Clean up js-test use in scroll-snap tests
</span></span></pre></div>
<a id="trunkLayoutTestsfastcsswillchangeparsingexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/will-change-parsing-expected.txt (0 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/will-change-parsing-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/css/will-change-parsing-expected.txt        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+This tests checks that will-change parses correctly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS testComputedStyle("will-change:;") is "auto"
+PASS testComputedStyle("will-change: contents, all;") is "auto"
+PASS testComputedStyle("will-change: contents;") is "contents"
+PASS test("will-change: inherit;") is "inherit"
+PASS test("will-change: initial;") is "initial"
+PASS test("will-change: all;") is ""
+PASS test("will-change: none;") is ""
+PASS test("will-change: default;") is ""
+PASS test("will-change: will-change;") is ""
+PASS test("will-change: auto;") is "auto"
+PASS test("will-change: auto, contents;") is ""
+PASS test("will-change: scroll-position;") is "scroll-position"
+PASS test("will-change: contents;") is "contents"
+PASS test("will-change: scroll-position, scroll-position;") is "scroll-position, scroll-position"
+PASS test("will-change: contents, scroll-position, transform;") is "contents, scroll-position, transform"
+PASS test("will-change: contents, transform, scroll-position, transform;") is "contents, transform, scroll-position, transform"
+PASS test("will-change: , background;") is ""
+PASS test("will-change: background, transform;") is "background, transform"
+PASS test("will-change: background transform;") is ""
+PASS test("will-change: background, all;") is ""
+PASS test("will-change: background, will-change;") is ""
+PASS test("will-change: unknown-property;") is "unknown-property"
+PASS test("will-change: transform, initial;") is ""
+PASS test("will-change: default;") is ""
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcsswillchangeparsinghtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/will-change-parsing.html (0 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/will-change-parsing.html         (rev 0)
+++ trunk/LayoutTests/fast/css/will-change-parsing.html        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -0,0 +1,66 @@
</span><ins>+<!DOCTYPE html>
+<html>
+ <head>
+ <script src="../../resources/js-test-pre.js"></script>
+ </head>
+ <body>
+ <script>
+ description("This tests checks that will-change parses correctly.");
+
+ function test(value)
+ {
+ var div = document.createElement("div");
+ div.setAttribute("style", value);
+ document.body.appendChild(div);
+
+ var result = div.style.getPropertyValue("will-change");
+ document.body.removeChild(div);
+ return result;
+ }
+
+ function testComputedStyle(value)
+ {
+ var div = document.createElement("div");
+ div.setAttribute("style", value);
+ document.body.appendChild(div);
+
+ var result = window.getComputedStyle(div).willChange;
+ document.body.removeChild(div);
+ return result;
+ }
+
+ shouldBe('testComputedStyle("will-change:;")', '"auto"');
+ shouldBe('testComputedStyle("will-change: contents, all;")', '"auto"');
+ shouldBe('testComputedStyle("will-change: contents;")', '"contents"');
+
+ shouldBe('test("will-change: inherit;")', '"inherit"');
+ shouldBe('test("will-change: initial;")', '"initial"');
+ shouldBe('test("will-change: all;")', '""');
+ shouldBe('test("will-change: none;")', '""');
+ shouldBe('test("will-change: default;")', '""');
+ shouldBe('test("will-change: will-change;")', '""');
+
+ shouldBe('test("will-change: auto;")', '"auto"');
+ shouldBe('test("will-change: auto, contents;")', '""');
+ shouldBe('test("will-change: scroll-position;")', '"scroll-position"');
+ shouldBe('test("will-change: contents;")', '"contents"');
+
+ shouldBe('test("will-change: scroll-position, scroll-position;")', '"scroll-position, scroll-position"');
+
+ shouldBe('test("will-change: contents, scroll-position, transform;")', '"contents, scroll-position, transform"');
+ shouldBe('test("will-change: contents, transform, scroll-position, transform;")', '"contents, transform, scroll-position, transform"');
+
+ shouldBe('test("will-change: , background;")', '""');
+ shouldBe('test("will-change: background, transform;")', '"background, transform"');
+ shouldBe('test("will-change: background transform;")', '""');
+ shouldBe('test("will-change: background, all;")', '""');
+ shouldBe('test("will-change: background, will-change;")', '""');
+
+ shouldBe('test("will-change: unknown-property;")', '"unknown-property"');
+
+ shouldBe('test("will-change: transform, initial;")', '""');
+ shouldBe('test("will-change: default;")', '""');
+ </script>
+ <script src="../../resources/js-test-post.js"></script>
+ </body>
+</html>
</ins></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (188511 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-08-15 17:57:25 UTC (rev 188511)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -2506,6 +2506,7 @@
</span><span class="cx"> rendering/style/StyleSurroundData.cpp
</span><span class="cx"> rendering/style/StyleTransformData.cpp
</span><span class="cx"> rendering/style/StyleVisualData.cpp
</span><ins>+ rendering/style/WillChangeData.cpp
</ins><span class="cx">
</span><span class="cx"> rendering/svg/RenderSVGBlock.cpp
</span><span class="cx"> rendering/svg/RenderSVGContainer.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (188511 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-08-15 17:57:25 UTC (rev 188511)
+++ trunk/Source/WebCore/ChangeLog        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -1,3 +1,75 @@
</span><ins>+2015-08-14 Simon Fraser <simon.fraser@apple.com>
+
+ Implement parsing for CSS will-change
+ https://bugs.webkit.org/show_bug.cgi?id=148052
+
+ Reviewed by Dean Jackson.
+
+ Syntax is
+ will-change: auto | <animateable-feature>#
+ where
+ <animateable-feature> = scroll-position | contents | <custom-ident>
+
+ To support this, add WillChangeData which stores a vector of "feature"
+ and CSS property squished into 16 bits. This is stored in rareNonInheritedData.
+ If null or an empty list, the property value is 'auto'. The list preserves
+ unknown properties.
+
+ Test: fast/css/will-change-parsing.html
+
+ * CMakeLists.txt:
+ * WebCore.vcxproj/WebCore.vcxproj:
+ * WebCore.vcxproj/WebCore.vcxproj.filters:
+ * WebCore.xcodeproj/project.pbxproj:
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::getWillChangePropertyValue):
+ (WebCore::ComputedStyleExtractor::propertyValue):
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+ (WebCore::isValidGridPositionCustomIdent): Renamed from isValidCustomIdent(),
+ since it's grid-specific.
+ (WebCore::CSSParser::parseIntegerOrCustomIdentFromGridPosition):
+ (WebCore::valueIsCSSKeyword): Returns true for the "CSS-wide" keywords like
+ "initial", "inherit" and "default".
+ (WebCore::CSSParser::parseFontFamily):
+ (WebCore::isValidWillChangeAnimatableFeature):
+ (WebCore::CSSParser::parseWillChange):
+ (WebCore::isValidCustomIdent): Deleted.
+ * css/CSSParser.h:
+ * css/CSSPrimitiveValue.h:
+ (WebCore::CSSPrimitiveValue::isPropertyID): New utility function.
+ * css/CSSPropertyNames.in:
+ * css/CSSValueKeywords.in:
+ * css/StyleBuilderCustom.h:
+ (WebCore::StyleBuilderCustom::applyValueWillChange):
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::setWillChange):
+ * rendering/style/RenderStyle.h:
+ * rendering/style/StyleAllInOne.cpp:
+ * rendering/style/StyleRareNonInheritedData.cpp:
+ (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
+ (WebCore::StyleRareNonInheritedData::operator==):
+ (WebCore::StyleRareNonInheritedData::willChangeDataEquivalent):
+ * rendering/style/StyleRareNonInheritedData.h:
+ * rendering/style/WillChangeData.cpp: Added.
+ (WebCore::WillChangeData::operator==):
+ (WebCore::WillChangeData::containsScrollPosition):
+ (WebCore::WillChangeData::containsContents):
+ (WebCore::WillChangeData::containsProperty):
+ (WebCore::WillChangeData::addFeature):
+ (WebCore::WillChangeData::featureAt):
+ * rendering/style/WillChangeData.h: Added.
+ (WebCore::WillChangeData::create):
+ (WebCore::WillChangeData::operator!=):
+ (WebCore::WillChangeData::isAuto):
+ (WebCore::WillChangeData::numFeatures):
+ (WebCore::WillChangeData::WillChangeData):
+ (WebCore::WillChangeData::AnimatableFeature::feature):
+ (WebCore::WillChangeData::AnimatableFeature::property):
+ (WebCore::WillChangeData::AnimatableFeature::featurePropertyPair):
+ (WebCore::WillChangeData::AnimatableFeature::AnimatableFeature):
+ (WebCore::WillChangeData::AnimatableFeature::operator==):
+
</ins><span class="cx"> 2015-08-15 Wenson Hsieh <wenson_hsieh@apple.com>
</span><span class="cx">
</span><span class="cx"> Build fix after r188510
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (188511 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-08-15 17:57:25 UTC (rev 188511)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -13039,6 +13039,20 @@
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</span><span class="cx"> </ClCompile>
</span><ins>+ <ClCompile Include="..\rendering\style\WillChangeData.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+ </ClCompile>
</ins><span class="cx"> <ClCompile Include="..\rendering\style\SVGRenderStyle.cpp">
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
</span><span class="lines">@@ -21919,6 +21933,7 @@
</span><span class="cx"> <ClInclude Include="..\rendering\style\StyleTransformData.h" />
</span><span class="cx"> <ClInclude Include="..\rendering\style\StyleVariableData.h" />
</span><span class="cx"> <ClInclude Include="..\rendering\style\StyleVisualData.h" />
</span><ins>+ <ClInclude Include="..\rendering\style\WillChangeData.h" />
</ins><span class="cx"> <ClInclude Include="..\rendering\style\SVGRenderStyle.h" />
</span><span class="cx"> <ClInclude Include="..\rendering\style\SVGRenderStyleDefs.h" />
</span><span class="cx"> <ClInclude Include="..\rendering\svg\RenderSVGEllipse.h" />
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (188511 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-08-15 17:57:25 UTC (rev 188511)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -2823,6 +2823,9 @@
</span><span class="cx"> <ClCompile Include="..\rendering\style\StyleVisualData.cpp">
</span><span class="cx"> <Filter>rendering\style</Filter>
</span><span class="cx"> </ClCompile>
</span><ins>+ <ClCompile Include="..\rendering\style\WillChangeData.cpp">
+ <Filter>rendering\style</Filter>
+ </ClCompile>
</ins><span class="cx"> <ClCompile Include="..\rendering\style\SVGRenderStyle.cpp">
</span><span class="cx"> <Filter>rendering\style</Filter>
</span><span class="cx"> </ClCompile>
</span><span class="lines">@@ -9890,6 +9893,9 @@
</span><span class="cx"> <ClInclude Include="..\rendering\style\StyleVisualData.h">
</span><span class="cx"> <Filter>rendering\style</Filter>
</span><span class="cx"> </ClInclude>
</span><ins>+ <ClInclude Include="..\rendering\style\WillChangeData.h">
+ <Filter>rendering\style</Filter>
+ </ClInclude>
</ins><span class="cx"> <ClInclude Include="..\rendering\style\SVGRenderStyle.h">
</span><span class="cx"> <Filter>rendering\style</Filter>
</span><span class="cx"> </ClInclude>
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (188511 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-08-15 17:57:25 UTC (rev 188511)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -469,6 +469,8 @@
</span><span class="cx">                 0F13163E16ED0CC80035CC04 /* PlatformCAFilters.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F13163D16ED0CC80035CC04 /* PlatformCAFilters.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F13164016ED0CDE0035CC04 /* PlatformCAFiltersCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F13163F16ED0CDE0035CC04 /* PlatformCAFiltersCocoa.mm */; };
</span><span class="cx">                 0F15DA8A0F3AAEE70000CE47 /* AnimationControllerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F15DA890F3AAEE70000CE47 /* AnimationControllerPrivate.h */; };
</span><ins>+                0F15ED5B1B7EC7C500EDDFEB /* WillChangeData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F15ED591B7EC7C500EDDFEB /* WillChangeData.cpp */; };
+                0F15ED5C1B7EC7C500EDDFEB /* WillChangeData.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F15ED5A1B7EC7C500EDDFEB /* WillChangeData.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 0F1774801378B772009DA76A /* ScrollAnimatorIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F17747E1378B771009DA76A /* ScrollAnimatorIOS.h */; };
</span><span class="cx">                 0F1774811378B772009DA76A /* ScrollAnimatorIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F17747F1378B772009DA76A /* ScrollAnimatorIOS.mm */; };
</span><span class="cx">                 0F3C725E1974874B00AEDD0C /* ImageSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F3C725D1974874B00AEDD0C /* ImageSource.cpp */; };
</span><span class="lines">@@ -7605,6 +7607,8 @@
</span><span class="cx">                 0F13163D16ED0CC80035CC04 /* PlatformCAFilters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformCAFilters.h; sourceTree = "<group>"; };
</span><span class="cx">                 0F13163F16ED0CDE0035CC04 /* PlatformCAFiltersCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformCAFiltersCocoa.mm; sourceTree = "<group>"; };
</span><span class="cx">                 0F15DA890F3AAEE70000CE47 /* AnimationControllerPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationControllerPrivate.h; sourceTree = "<group>"; };
</span><ins>+                0F15ED591B7EC7C500EDDFEB /* WillChangeData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WillChangeData.cpp; sourceTree = "<group>"; };
+                0F15ED5A1B7EC7C500EDDFEB /* WillChangeData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WillChangeData.h; sourceTree = "<group>"; };
</ins><span class="cx">                 0F17747E1378B771009DA76A /* ScrollAnimatorIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollAnimatorIOS.h; sourceTree = "<group>"; };
</span><span class="cx">                 0F17747F1378B772009DA76A /* ScrollAnimatorIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollAnimatorIOS.mm; sourceTree = "<group>"; };
</span><span class="cx">                 0F3C725D1974874B00AEDD0C /* ImageSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageSource.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -21685,6 +21689,8 @@
</span><span class="cx">                                 BC2274760E8366E200E7F975 /* SVGRenderStyleDefs.cpp */,
</span><span class="cx">                                 BC2274770E8366E200E7F975 /* SVGRenderStyleDefs.h */,
</span><span class="cx">                                 448B1B780F3A2F9B0047A9E2 /* TextSizeAdjustment.h */,
</span><ins>+                                0F15ED591B7EC7C500EDDFEB /* WillChangeData.cpp */,
+                                0F15ED5A1B7EC7C500EDDFEB /* WillChangeData.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = style;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="lines">@@ -25640,6 +25646,7 @@
</span><span class="cx">                                 A31C4E5416E02B40002F7957 /* JSOESTextureHalfFloat.h in Headers */,
</span><span class="cx">                                 31078CCA1880AACE008099DC /* JSOESTextureHalfFloatLinear.h in Headers */,
</span><span class="cx">                                 77A17AA712F28B2A004E02F6 /* JSOESVertexArrayObject.h in Headers */,
</span><ins>+                                0F15ED5C1B7EC7C500EDDFEB /* WillChangeData.h in Headers */,
</ins><span class="cx">                                 FDF6BAF9134A4C9800822920 /* JSOfflineAudioCompletionEvent.h in Headers */,
</span><span class="cx">                                 FDA9326716703BA9008982DC /* JSOfflineAudioContext.h in Headers */,
</span><span class="cx">                                 FDEA6243152102E200479DF0 /* JSOscillatorNode.h in Headers */,
</span><span class="lines">@@ -29405,6 +29412,7 @@
</span><span class="cx">                                 B2FA3DAC0AB75A6F000E5AC4 /* JSSVGMatrix.cpp in Sources */,
</span><span class="cx">                                 B2FA3DAE0AB75A6F000E5AC4 /* JSSVGMetadataElement.cpp in Sources */,
</span><span class="cx">                                 B27B28290CEF0C0700D39D54 /* JSSVGMissingGlyphElement.cpp in Sources */,
</span><ins>+                                0F15ED5B1B7EC7C500EDDFEB /* WillChangeData.cpp in Sources */,
</ins><span class="cx">                                 4496E3A2139813CB003EE32A /* JSSVGMPathElement.cpp in Sources */,
</span><span class="cx">                                 8542A7980AE5C94300DF58DF /* JSSVGNumber.cpp in Sources */,
</span><span class="cx">                                 B2FA3DB00AB75A6F000E5AC4 /* JSSVGNumberList.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (188511 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2015-08-15 17:57:25 UTC (rev 188511)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -67,6 +67,7 @@
</span><span class="cx"> #include "WebKitCSSFilterValue.h"
</span><span class="cx"> #include "WebKitCSSTransformValue.h"
</span><span class="cx"> #include "WebKitFontFamilyNames.h"
</span><ins>+#include "WillChangeData.h"
</ins><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx"> #include <wtf/text/StringBuilder.h>
</span><span class="cx">
</span><span class="lines">@@ -1161,6 +1162,33 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+static Ref<CSSValue> getWillChangePropertyValue(const WillChangeData* willChangeData)
+{
+ if (!willChangeData || !willChangeData->numFeatures())
+ return cssValuePool().createIdentifierValue(CSSValueAuto);
+
+ auto list = CSSValueList::createCommaSeparated();
+ for (size_t i = 0; i < willChangeData->numFeatures(); ++i) {
+ WillChangeData::FeaturePropertyPair feature = willChangeData->featureAt(i);
+ switch (feature.first) {
+ case WillChangeData::ScrollPosition:
+ list.get().append(cssValuePool().createIdentifierValue(CSSValueScrollPosition));
+ break;
+ case WillChangeData::Contents:
+ list.get().append(cssValuePool().createIdentifierValue(CSSValueContents));
+ break;
+ case WillChangeData::Property:
+ list.get().append(cssValuePool().createIdentifierValue(feature.second));
+ break;
+ case WillChangeData::Invalid:
+ ASSERT_NOT_REACHED();
+ break;
+ }
+ }
+
+ return WTF::move(list);
+}
+
</ins><span class="cx"> static Ref<CSSValueList> getDelayValue(const AnimationList* animList)
</span><span class="cx"> {
</span><span class="cx"> auto list = CSSValueList::createCommaSeparated();
</span><span class="lines">@@ -2650,6 +2678,9 @@
</span><span class="cx"> return zoomAdjustedPixelValue(sizingBox(*renderer).width(), *style);
</span><span class="cx"> }
</span><span class="cx"> return zoomAdjustedPixelValueForLength(style->width(), *style);
</span><ins>+ case CSSPropertyWillChange:
+ return getWillChangePropertyValue(style->willChange());
+ break;
</ins><span class="cx"> case CSSPropertyWordBreak:
</span><span class="cx"> return cssValuePool().createValue(style->wordBreak());
</span><span class="cx"> case CSSPropertyWordSpacing:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (188511 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2015-08-15 17:57:25 UTC (rev 188511)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -2797,6 +2797,13 @@
</span><span class="cx"> break;
</span><span class="cx"> // End of CSS3 properties
</span><span class="cx">
</span><ins>+ case CSSPropertyWillChange: // auto | [scroll-position | contents | <custom-ident>]#
+ if (id == CSSValueAuto)
+ validPrimitive = true;
+ else
+ return parseWillChange(important);
+ break;
+
</ins><span class="cx"> // Apple specific properties. These will never be standardized and are purely to
</span><span class="cx"> // support custom WebKit-based Apple applications.
</span><span class="cx"> case CSSPropertyWebkitLineClamp:
</span><span class="lines">@@ -5229,7 +5236,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><del>-static inline bool isValidCustomIdent(const CSSParserValue& value)
</del><ins>+static inline bool isValidGridPositionCustomIdent(const CSSParserValue& value)
</ins><span class="cx"> {
</span><span class="cx"> return value.unit == CSSPrimitiveValue::CSS_IDENT && value.id != CSSValueSpan && value.id != CSSValueAuto;
</span><span class="cx"> }
</span><span class="lines">@@ -5241,14 +5248,14 @@
</span><span class="cx"> if (validateUnit(valueWithCalculation, FInteger) && valueWithCalculation.value().fValue) {
</span><span class="cx"> numericValue = createPrimitiveNumericValue(valueWithCalculation);
</span><span class="cx"> CSSParserValue* nextValue = m_valueList->next();
</span><del>- if (nextValue && isValidCustomIdent(*nextValue)) {
</del><ins>+ if (nextValue && isValidGridPositionCustomIdent(*nextValue)) {
</ins><span class="cx"> gridLineName = createPrimitiveStringValue(*nextValue);
</span><span class="cx"> m_valueList->next();
</span><span class="cx"> }
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (isValidCustomIdent(valueWithCalculation)) {
</del><ins>+ if (isValidGridPositionCustomIdent(valueWithCalculation)) {
</ins><span class="cx"> gridLineName = createPrimitiveStringValue(valueWithCalculation);
</span><span class="cx"> if (CSSParserValue* nextValue = m_valueList->next()) {
</span><span class="cx"> ValueWithCalculation nextValueWithCalculation(*nextValue);
</span><span class="lines">@@ -6685,6 +6692,12 @@
</span><span class="cx"> CSSValueList& m_list;
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+static bool valueIsCSSKeyword(const CSSParserValue& value)
+{
+ // FIXME: when we add "unset", we should handle it here.
+ return value.id == CSSValueInitial || value.id == CSSValueInherit || value.id == CSSValueDefault;
+}
+
</ins><span class="cx"> RefPtr<CSSValueList> CSSParser::parseFontFamily()
</span><span class="cx"> {
</span><span class="cx"> RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
</span><span class="lines">@@ -6701,7 +6714,7 @@
</span><span class="cx"> ((nextValue->id >= CSSValueSerif && nextValue->id <= CSSValueWebkitBody) ||
</span><span class="cx"> (nextValue->unit == CSSPrimitiveValue::CSS_STRING || nextValue->unit == CSSPrimitiveValue::CSS_IDENT));
</span><span class="cx">
</span><del>- bool valueIsKeyword = value->id == CSSValueInitial || value->id == CSSValueInherit || value->id == CSSValueDefault;
</del><ins>+ bool valueIsKeyword = valueIsCSSKeyword(*value);
</ins><span class="cx"> if (valueIsKeyword && !inFamily) {
</span><span class="cx"> if (nextValBreaksFont)
</span><span class="cx"> value = m_valueList->next();
</span><span class="lines">@@ -10462,6 +10475,59 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline bool isValidWillChangeAnimatableFeature(const CSSParserValue& value)
+{
+ if (value.id == CSSValueNone || value.id == CSSValueAuto || value.id == CSSValueAll)
+ return false;
+
+ if (valueIsCSSKeyword(value))
+ return false;
+
+ if (cssPropertyID(value.string) == CSSPropertyWillChange)
+ return false;
+
+ return true;
+}
+
+bool CSSParser::parseWillChange(bool important)
+{
+ RefPtr<CSSValueList> willChangePropertyValues = CSSValueList::createCommaSeparated();
+
+ bool expectComma = false;
+ for (CSSParserValue* value = m_valueList->current(); value; value = m_valueList->next()) {
+ if (expectComma) {
+ if (!isComma(value))
+ return false;
+
+ expectComma = false;
+ continue;
+ }
+
+ if (value->unit != CSSPrimitiveValue::CSS_IDENT)
+ return false;
+
+ if (!isValidWillChangeAnimatableFeature(*value))
+ return false;
+
+ RefPtr<CSSValue> cssValue;
+ if (value->id == CSSValueScrollPosition || value->id == CSSValueContents)
+ cssValue = cssValuePool().createIdentifierValue(value->id);
+ else {
+ CSSPropertyID propertyID = cssPropertyID(value->string);
+ if (propertyID != CSSPropertyInvalid)
+ cssValue = cssValuePool().createIdentifierValue(propertyID);
+ else // This might be a property we don't support.
+ cssValue = createPrimitiveStringValue(*value);
+ }
+
+ willChangePropertyValues->append(cssValue.releaseNonNull());
+ expectComma = true;
+ }
+
+ addProperty(CSSPropertyWillChange, willChangePropertyValues.release(), important);
+ return true;
+}
+
</ins><span class="cx"> RefPtr<CSSCalcValue> CSSParser::parseCalculation(CSSParserValue& value, CalculationPermittedValueRange range)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(isCalculation(value));
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (188511 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2015-08-15 17:57:25 UTC (rev 188511)
+++ trunk/Source/WebCore/css/CSSParser.h        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -345,6 +345,8 @@
</span><span class="cx">
</span><span class="cx"> bool parseFontVariantLigatures(bool important);
</span><span class="cx">
</span><ins>+ bool parseWillChange(bool important);
+
</ins><span class="cx"> // Faster than doing a new/delete each time since it keeps one vector.
</span><span class="cx"> std::unique_ptr<Vector<std::unique_ptr<CSSParserSelector>>> createSelectorVector();
</span><span class="cx"> void recycleSelectorVector(std::unique_ptr<Vector<std::unique_ptr<CSSParserSelector>>>);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.h (188511 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValue.h        2015-08-15 17:57:25 UTC (rev 188511)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.h        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -206,6 +206,7 @@
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><span class="cx"> bool isLengthRepeat() const { return m_primitiveUnitType == CSS_LENGTH_REPEAT; }
</span><span class="cx"> #endif
</span><ins>+ bool isPropertyID() const { return m_primitiveUnitType == CSS_PROPERTY_ID; }
</ins><span class="cx"> bool isRGBColor() const { return m_primitiveUnitType == CSS_RGBCOLOR; }
</span><span class="cx"> bool isShape() const { return m_primitiveUnitType == CSS_SHAPE; }
</span><span class="cx"> bool isString() const { return m_primitiveUnitType == CSS_STRING; }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (188511 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertyNames.in        2015-08-15 17:57:25 UTC (rev 188511)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -350,6 +350,7 @@
</span><span class="cx"> white-space [Inherited]
</span><span class="cx"> widows [Inherited, AutoFunctions]
</span><span class="cx"> width [Initial=initialSize, Converter=LengthSizing]
</span><ins>+will-change [Custom=Value]
</ins><span class="cx"> word-break [Inherited]
</span><span class="cx"> -epub-word-break = word-break
</span><span class="cx"> word-spacing [Inherited, ConditionalConverter=WordSpacing]
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueKeywordsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (188511 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueKeywords.in        2015-08-15 17:57:25 UTC (rev 188511)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -1126,4 +1126,8 @@
</span><span class="cx">
</span><span class="cx"> // font-synthesis
</span><span class="cx"> weight
</span><del>-style
</del><span class="cx">\ No newline at end of file
</span><ins>+style
+
+// will-change
+scroll-position
+contents
</ins></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderCustomh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderCustom.h (188511 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderCustom.h        2015-08-15 17:57:25 UTC (rev 188511)
+++ trunk/Source/WebCore/css/StyleBuilderCustom.h        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -48,6 +48,7 @@
</span><span class="cx"> #include "StyleFontSizeFunctions.h"
</span><span class="cx"> #include "StyleGeneratedImage.h"
</span><span class="cx"> #include "StyleResolver.h"
</span><ins>+#include "WillChangeData.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -133,6 +134,7 @@
</span><span class="cx"> static void applyInitialWebkitScrollSnapPointsY(StyleResolver&);
</span><span class="cx"> static void applyInheritWebkitScrollSnapPointsY(StyleResolver&);
</span><span class="cx"> #endif
</span><ins>+ static void applyValueWillChange(StyleResolver&, CSSValue&);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> static void resetEffectiveZoom(StyleResolver&);
</span><span class="lines">@@ -1717,6 +1719,37 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+inline void StyleBuilderCustom::applyValueWillChange(StyleResolver& styleResolver, CSSValue& value)
+{
+ if (is<CSSPrimitiveValue>(value)) {
+ ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueAuto);
+ styleResolver.style()->setWillChange(nullptr);
+ return;
+ }
+
+ Ref<WillChangeData> willChange = WillChangeData::create();
+ for (auto& item : downcast<CSSValueList>(value)) {
+ if (!is<CSSPrimitiveValue>(item.get()))
+ continue;
+
+ const auto& primitiveValue = downcast<CSSPrimitiveValue>(item.get());
+ switch (primitiveValue.getValueID()) {
+ case CSSValueScrollPosition:
+ willChange->addFeature(WillChangeData::Feature::ScrollPosition);
+ break;
+ case CSSValueContents:
+ willChange->addFeature(WillChangeData::Feature::Contents);
+ break;
+ default:
+ if (primitiveValue.isPropertyID())
+ willChange->addFeature(WillChangeData::Feature::Property, primitiveValue.getPropertyID());
+ break;
+ }
+ }
+
+ styleResolver.style()->setWillChange(WTF::move(willChange));
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // StyleBuilderCustom_h
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (188511 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2015-08-15 17:57:25 UTC (rev 188511)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> #include "StyleResolver.h"
</span><span class="cx"> #include "StyleScrollSnapPoints.h"
</span><span class="cx"> #include "StyleSelfAlignmentData.h"
</span><ins>+#include "WillChangeData.h"
</ins><span class="cx"> #include <wtf/MathExtras.h>
</span><span class="cx"> #include <wtf/StdLibExtras.h>
</span><span class="cx"> #include <algorithm>
</span><span class="lines">@@ -925,6 +926,15 @@
</span><span class="cx"> rareInheritedData.access()->quotes = q;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void RenderStyle::setWillChange(PassRefPtr<WillChangeData> willChangeData)
+{
+ if (rareNonInheritedData->m_willChange == willChangeData
+ || (rareNonInheritedData->m_willChange && willChangeData && *rareNonInheritedData->m_willChange == *willChangeData))
+ return;
+
+ rareNonInheritedData.access()->m_willChange = WTF::move(willChangeData);
+}
+
</ins><span class="cx"> void RenderStyle::clearCursorList()
</span><span class="cx"> {
</span><span class="cx"> if (rareInheritedData->cursorData)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (188511 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2015-08-15 17:57:25 UTC (rev 188511)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -113,6 +113,7 @@
</span><span class="cx"> class StyleInheritedData;
</span><span class="cx"> class StyleResolver;
</span><span class="cx"> class TransformationMatrix;
</span><ins>+class WillChangeData;
</ins><span class="cx">
</span><span class="cx"> struct ScrollSnapPoints;
</span><span class="cx">
</span><span class="lines">@@ -1778,7 +1779,7 @@
</span><span class="cx"> }
</span><span class="cx"> ClipPathOperation* clipPath() const { return rareNonInheritedData->m_clipPath.get(); }
</span><span class="cx">
</span><del>- static ClipPathOperation* initialClipPath() { return 0; }
</del><ins>+ static ClipPathOperation* initialClipPath() { return nullptr; }
</ins><span class="cx">
</span><span class="cx"> bool hasContent() const { return contentData(); }
</span><span class="cx"> const ContentData* contentData() const { return rareNonInheritedData->m_content.get(); }
</span><span class="lines">@@ -1798,6 +1799,9 @@
</span><span class="cx"> QuotesData* quotes() const { return rareInheritedData->quotes.get(); }
</span><span class="cx"> void setQuotes(PassRefPtr<QuotesData>);
</span><span class="cx">
</span><ins>+ WillChangeData* willChange() const { return rareNonInheritedData->m_willChange.get(); }
+ void setWillChange(PassRefPtr<WillChangeData>);
+
</ins><span class="cx"> const AtomicString& hyphenString() const;
</span><span class="cx">
</span><span class="cx"> bool inheritedNotEqual(const RenderStyle*) const;
</span><span class="lines">@@ -2003,6 +2007,8 @@
</span><span class="cx"> static QuotesData* initialQuotes() { return nullptr; }
</span><span class="cx"> static const AtomicString& initialContentAltText() { return emptyAtom; }
</span><span class="cx">
</span><ins>+ static WillChangeData* initialWillChange() { return nullptr; }
+
</ins><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><span class="cx"> static ScrollSnapType initialScrollSnapType() { return ScrollSnapType::None; }
</span><span class="cx"> static ScrollSnapPoints* initialScrollSnapPointsX() { return nullptr; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleAllInOnecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleAllInOne.cpp (188511 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleAllInOne.cpp        2015-08-15 17:57:25 UTC (rev 188511)
+++ trunk/Source/WebCore/rendering/style/StyleAllInOne.cpp        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -57,3 +57,4 @@
</span><span class="cx"> #include "StyleSurroundData.cpp"
</span><span class="cx"> #include "StyleTransformData.cpp"
</span><span class="cx"> #include "StyleVisualData.cpp"
</span><ins>+#include "WillChangeData.cpp"
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (188511 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp        2015-08-15 17:57:25 UTC (rev 188511)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -59,8 +59,8 @@
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><span class="cx"> , m_scrollSnapPoints(StyleScrollSnapPoints::create())
</span><span class="cx"> #endif
</span><ins>+ , m_willChange(RenderStyle::initialWillChange())
</ins><span class="cx"> , m_mask(FillLayer(MaskFillLayer))
</span><del>- , m_pageSize()
</del><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><span class="cx"> , m_shapeOutside(RenderStyle::initialShapeOutside())
</span><span class="cx"> , m_shapeMargin(RenderStyle::initialShapeMargin())
</span><span class="lines">@@ -136,6 +136,7 @@
</span><span class="cx"> , m_counterDirectives(o.m_counterDirectives ? clone(*o.m_counterDirectives) : nullptr)
</span><span class="cx"> , m_altText(o.m_altText)
</span><span class="cx"> , m_boxShadow(o.m_boxShadow ? std::make_unique<ShadowData>(*o.m_boxShadow) : nullptr)
</span><ins>+ , m_willChange(o.m_willChange)
</ins><span class="cx"> , m_boxReflect(o.m_boxReflect)
</span><span class="cx"> , m_animations(o.m_animations ? std::make_unique<AnimationList>(*o.m_animations) : nullptr)
</span><span class="cx"> , m_transitions(o.m_transitions ? std::make_unique<AnimationList>(*o.m_transitions) : nullptr)
</span><span class="lines">@@ -234,6 +235,7 @@
</span><span class="cx"> && contentDataEquivalent(o)
</span><span class="cx"> && counterDataEquivalent(o)
</span><span class="cx"> && shadowDataEquivalent(o)
</span><ins>+ && willChangeDataEquivalent(o)
</ins><span class="cx"> && reflectionDataEquivalent(o)
</span><span class="cx"> && animationDataEquivalent(o)
</span><span class="cx"> && transitionDataEquivalent(o)
</span><span class="lines">@@ -245,7 +247,7 @@
</span><span class="cx"> && m_shapeMargin == o.m_shapeMargin
</span><span class="cx"> && m_shapeImageThreshold == o.m_shapeImageThreshold
</span><span class="cx"> #endif
</span><del>- && m_clipPath == o.m_clipPath
</del><ins>+ && m_clipPath == o.m_clipPath // FIXME: This needs to compare values.
</ins><span class="cx"> && m_textDecorationColor == o.m_textDecorationColor
</span><span class="cx"> && m_visitedLinkTextDecorationColor == o.m_visitedLinkTextDecorationColor
</span><span class="cx"> && m_visitedLinkBackgroundColor == o.m_visitedLinkBackgroundColor
</span><span class="lines">@@ -323,6 +325,16 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool StyleRareNonInheritedData::willChangeDataEquivalent(const StyleRareNonInheritedData& o) const
+{
+ if (m_willChange != o.m_willChange) {
+ if (!m_willChange || !o.m_willChange)
+ return false;
+ return *m_willChange == *o.m_willChange;
+ }
+ return true;
+}
+
</ins><span class="cx"> bool StyleRareNonInheritedData::reflectionDataEquivalent(const StyleRareNonInheritedData& o) const
</span><span class="cx"> {
</span><span class="cx"> if (m_boxReflect != o.m_boxReflect) {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h (188511 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h        2015-08-15 17:57:25 UTC (rev 188511)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #define StyleRareNonInheritedData_h
</span><span class="cx">
</span><span class="cx"> #include "BasicShapes.h"
</span><ins>+#include "CSSPropertyNames.h"
</ins><span class="cx"> #include "ClipPathOperation.h"
</span><span class="cx"> #include "CounterDirectives.h"
</span><span class="cx"> #include "CursorData.h"
</span><span class="lines">@@ -36,6 +37,7 @@
</span><span class="cx"> #include "ShapeValue.h"
</span><span class="cx"> #include "StyleContentAlignmentData.h"
</span><span class="cx"> #include "StyleSelfAlignmentData.h"
</span><ins>+#include "WillChangeData.h"
</ins><span class="cx"> #include <memory>
</span><span class="cx"> #include <wtf/PassRefPtr.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="lines">@@ -92,6 +94,7 @@
</span><span class="cx"> bool contentDataEquivalent(const StyleRareNonInheritedData&) const;
</span><span class="cx"> bool counterDataEquivalent(const StyleRareNonInheritedData&) const;
</span><span class="cx"> bool shadowDataEquivalent(const StyleRareNonInheritedData&) const;
</span><ins>+ bool willChangeDataEquivalent(const StyleRareNonInheritedData&) const;
</ins><span class="cx"> bool reflectionDataEquivalent(const StyleRareNonInheritedData&) const;
</span><span class="cx"> bool animationDataEquivalent(const StyleRareNonInheritedData&) const;
</span><span class="cx"> bool transitionDataEquivalent(const StyleRareNonInheritedData&) const;
</span><span class="lines">@@ -144,6 +147,8 @@
</span><span class="cx"> String m_altText;
</span><span class="cx">
</span><span class="cx"> std::unique_ptr<ShadowData> m_boxShadow; // For box-shadow decorations.
</span><ins>+
+ RefPtr<WillChangeData> m_willChange; // Null indicates 'auto'.
</ins><span class="cx">
</span><span class="cx"> RefPtr<StyleReflection> m_boxReflect;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleWillChangeDatacpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/rendering/style/WillChangeData.cpp (0 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/WillChangeData.cpp         (rev 0)
+++ trunk/Source/WebCore/rendering/style/WillChangeData.cpp        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -0,0 +1,77 @@
</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. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WillChangeData.h"
+
+namespace WebCore {
+
+bool WillChangeData::operator==(const WillChangeData& other) const
+{
+ return m_animatableFeatures == other.m_animatableFeatures;
+}
+
+bool WillChangeData::containsScrollPosition() const
+{
+ for (const auto& feature : m_animatableFeatures) {
+ if (feature.feature() == ScrollPosition)
+ return true;
+ }
+ return false;
+}
+
+bool WillChangeData::containsContents() const
+{
+ for (const auto& feature : m_animatableFeatures) {
+ if (feature.feature() == Contents)
+ return true;
+ }
+ return false;
+}
+
+bool WillChangeData::containsProperty(CSSPropertyID property) const
+{
+ for (const auto& feature : m_animatableFeatures) {
+ if (feature.property() == property)
+ return true;
+ }
+ return false;
+}
+
+void WillChangeData::addFeature(Feature feature, CSSPropertyID propertyID)
+{
+ ASSERT(feature == Property || propertyID == CSSPropertyInvalid);
+ m_animatableFeatures.append(AnimatableFeature(feature, propertyID));
+}
+
+WillChangeData::FeaturePropertyPair WillChangeData::featureAt(size_t index) const
+{
+ if (index >= m_animatableFeatures.size())
+ return FeaturePropertyPair(Invalid, CSSPropertyInvalid);
+
+ return m_animatableFeatures[index].featurePropertyPair();
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleWillChangeDatah"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/rendering/style/WillChangeData.h (0 => 188512)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/WillChangeData.h         (rev 0)
+++ trunk/Source/WebCore/rendering/style/WillChangeData.h        2015-08-15 17:59:05 UTC (rev 188512)
</span><span class="lines">@@ -0,0 +1,125 @@
</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. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WillChangeData_h
+#define WillChangeData_h
+
+#include "CSSPropertyNames.h"
+#include "RenderStyleConstants.h"
+#include <wtf/RefCounted.h>
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+class WillChangeData : public RefCounted<WillChangeData> {
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ static Ref<WillChangeData> create()
+ {
+ return adoptRef(*new WillChangeData);
+ }
+
+ bool operator==(const WillChangeData&) const;
+ bool operator!=(const WillChangeData& o) const
+ {
+ return !(*this == o);
+ }
+
+ bool isAuto() const { return m_animatableFeatures.isEmpty(); }
+ size_t numFeatures() const { return m_animatableFeatures.size(); }
+
+ bool containsScrollPosition() const;
+ bool containsContents() const;
+ bool containsProperty(CSSPropertyID) const;
+
+ enum Feature {
+ ScrollPosition,
+ Contents,
+ Property,
+ Invalid
+ };
+
+ void addFeature(Feature, CSSPropertyID = CSSPropertyInvalid);
+
+ typedef std::pair<Feature, CSSPropertyID> FeaturePropertyPair;
+ FeaturePropertyPair featureAt(size_t) const;
+
+private:
+ WillChangeData()
+ {
+ }
+
+ struct AnimatableFeature {
+ static const int numCSSPropertyIDBits = 14;
+ COMPILE_ASSERT(numCSSProperties < (1 << numCSSPropertyIDBits), CSSPropertyID_should_fit_in_14_bits);
+
+ unsigned m_feature : 2;
+ unsigned m_cssPropertyID : numCSSPropertyIDBits;
+
+ Feature feature() const
+ {
+ return static_cast<Feature>(m_feature);
+ }
+
+ CSSPropertyID property() const
+ {
+ return feature() == Property ? static_cast<CSSPropertyID>(m_cssPropertyID) : CSSPropertyInvalid;
+ }
+
+ FeaturePropertyPair featurePropertyPair() const
+ {
+ return FeaturePropertyPair(feature(), property());
+ }
+
+ AnimatableFeature(Feature willChange, CSSPropertyID willChangeProperty = CSSPropertyInvalid)
+ {
+ switch (willChange) {
+ case Property:
+ ASSERT(willChangeProperty != CSSPropertyInvalid);
+ m_cssPropertyID = willChangeProperty;
+ FALLTHROUGH;
+ case ScrollPosition:
+ case Contents:
+ m_feature = static_cast<unsigned>(willChange);
+ break;
+ case Invalid:
+ ASSERT_NOT_REACHED();
+ break;
+ }
+ }
+
+ bool operator==(const AnimatableFeature& other) const
+ {
+ return m_feature == other.m_feature && m_cssPropertyID == other.m_cssPropertyID;
+ }
+ };
+
+ Vector<AnimatableFeature, 1> m_animatableFeatures;
+};
+
+
+} // namespace WebCore
+
+#endif // WillChangeData_h
</ins></span></pre>
</div>
</div>
</body>
</html>