<!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>[209794] 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/209794">209794</a></dd>
<dt>Author</dt> <dd>barraclough@apple.com</dd>
<dt>Date</dt> <dd>2016-12-14 00:23:23 -0800 (Wed, 14 Dec 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>
Source/WebCore:
Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/209792">r209792</a>.
https://bugs.webkit.org/show_bug.cgi?id=165841

Cause build failures (Requested by yusukesuzuki on #webkit).

Reverted changeset:

&quot;Use JSValue::toWTFString instead of calling toString(exec)
and value(exec)&quot;
https://bugs.webkit.org/show_bug.cgi?id=165795
http://trac.webkit.org/changeset/209792

Patch by Commit Queue &lt;commit-queue@webkit.org&gt; on 2016-12-13

LayoutTests:
ASSERTION FAILED: hasParserBlockingScript() seen with js/dom/modules/module-will-fire-beforeload.html
https://bugs.webkit.org/show_bug.cgi?id=164883

Patch by Yusuke Suzuki &lt;utatane.tea@gmail.com&gt; on 2016-12-13
Reviewed by Ryosuke Niwa.

* platform/mac-wk2/TestExpectations:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorTestExpectations">trunk/LayoutTests/platform/ios-simulator/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorwk1TestExpectations">trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorwk2TestExpectations">trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceSetcpp">trunk/Source/WebCore/css/CSSFontFaceSet.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSKeyframesRulecpp">trunk/Source/WebCore/css/CSSKeyframesRule.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSKeyframesRuleh">trunk/Source/WebCore/css/CSSKeyframesRule.h</a></li>
<li><a href="#trunkSourceWebCorecssDOMCSSNamespacecpp">trunk/Source/WebCore/css/DOMCSSNamespace.cpp</a></li>
<li><a href="#trunkSourceWebCorecssElementRuleCollectorcpp">trunk/Source/WebCore/css/ElementRuleCollector.cpp</a></li>
<li><a href="#trunkSourceWebCorecssFontFacecpp">trunk/Source/WebCore/css/FontFace.cpp</a></li>
<li><a href="#trunkSourceWebCorecssMediaListcpp">trunk/Source/WebCore/css/MediaList.cpp</a></li>
<li><a href="#trunkSourceWebCorecssPropertySetCSSStyleDeclarationcpp">trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStylePropertiescpp">trunk/Source/WebCore/css/StyleProperties.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStylePropertiesh">trunk/Source/WebCore/css/StyleProperties.h</a></li>
<li><a href="#trunkSourceWebCorecssStyleRulecpp">trunk/Source/WebCore/css/StyleRule.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleRuleh">trunk/Source/WebCore/css/StyleRule.h</a></li>
<li><a href="#trunkSourceWebCorecssStyleSheetContentscpp">trunk/Source/WebCore/css/StyleSheetContents.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleSheetContentsh">trunk/Source/WebCore/css/StyleSheetContents.h</a></li>
<li><a href="#trunkSourceWebCorecssWebKitCSSMatrixcpp">trunk/Source/WebCore/css/WebKitCSSMatrix.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParsercpp">trunk/Source/WebCore/css/parser/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserh">trunk/Source/WebCore/css/parser/CSSParser.h</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserFastPathscpp">trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserFastPathsh">trunk/Source/WebCore/css/parser/CSSParserFastPaths.h</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserImplcpp">trunk/Source/WebCore/css/parser/CSSParserImpl.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserImplh">trunk/Source/WebCore/css/parser/CSSParserImpl.h</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserTokenRangecpp">trunk/Source/WebCore/css/parser/CSSParserTokenRange.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserTokenRangeh">trunk/Source/WebCore/css/parser/CSSParserTokenRange.h</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSPropertyParsercpp">trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSTokenizercpp">trunk/Source/WebCore/css/parser/CSSTokenizer.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSTokenizerh">trunk/Source/WebCore/css/parser/CSSTokenizer.h</a></li>
<li><a href="#trunkSourceWebCorecssparserMediaQueryParsercpp">trunk/Source/WebCore/css/parser/MediaQueryParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserMediaQueryParserh">trunk/Source/WebCore/css/parser/MediaQueryParser.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp">trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsh">trunk/Source/WebCore/testing/Internals.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsidl">trunk/Source/WebCore/testing/Internals.idl</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li>trunk/LayoutTests/fast/css/deferred-parsing/</li>
<li><a href="#trunkSourceWebCorecssparserCSSDeferredParsercpp">trunk/Source/WebCore/css/parser/CSSDeferredParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSDeferredParserh">trunk/Source/WebCore/css/parser/CSSDeferredParser.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/LayoutTests/ChangeLog        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -320,35 +320,6 @@
</span><span class="cx">         * fast/multicol/columns-on-body-expected.html: Added.
</span><span class="cx">         * fast/multicol/columns-on-body.html: Added.
</span><span class="cx"> 
</span><del>-2016-12-11  Dave Hyatt  &lt;hyatt@apple.com&gt;
-
-        [CSS Parser] Implement deferred parsing of properties, @media, @supports and @keyframes
-        https://bugs.webkit.org/show_bug.cgi?id=165743
-
-        Reviewed by Darin Adler.
-
-        * fast/css/deferred-parsing: Added.
-        * fast/css/deferred-parsing/dynamic-external-style-expected.txt: Added.
-        * fast/css/deferred-parsing/dynamic-external-style.html: Added.
-        * fast/css/deferred-parsing/dynamic-style-in-document-expected.txt: Added.
-        * fast/css/deferred-parsing/dynamic-style-in-document.html: Added.
-        * fast/css/deferred-parsing/hover-test-expected.txt: Added.
-        * fast/css/deferred-parsing/hover-test.html: Added.
-        * fast/css/deferred-parsing/keyframes-rule-expected.txt: Added.
-        * fast/css/deferred-parsing/keyframes-rule.html: Added.
-        * fast/css/deferred-parsing/media-print-expected.txt: Added.
-        * fast/css/deferred-parsing/media-print.html: Added.
-        * fast/css/deferred-parsing/nth-of-type-expected.txt: Added.
-        * fast/css/deferred-parsing/nth-of-type.html: Added.
-        * fast/css/deferred-parsing/resources: Added.
-        * fast/css/deferred-parsing/resources/basic-sheet.css: Added.
-        * fast/css/deferred-parsing/simple-external-style-expected.txt: Added.
-        * fast/css/deferred-parsing/simple-external-style.html: Added.
-        * fast/css/deferred-parsing/simple-style-in-document-expected.txt: Added.
-        * fast/css/deferred-parsing/simple-style-in-document.html: Added.
-        * fast/css/deferred-parsing/supports-rule-expected.txt: Added.
-        * fast/css/deferred-parsing/supports-rule.html: Added.
-
</del><span class="cx"> 2016-12-09  Dean Jackson  &lt;dino@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Autoplay isn't working in iPhone MediaDocuments
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -2755,6 +2755,3 @@
</span><span class="cx"> fast/selectors/040.html
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/165691 http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-iframe-in-main-frame.html [ Pass Failure ]
</span><del>-
-# Hover test does not apply
-fast/css/deferred-parsing/hover-test.html [ Skip ]
</del></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorwk1TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -1885,7 +1885,3 @@
</span><span class="cx"> imported/blink/imported/csswg-test/css-writing-modes-3/block-embed-001.html [ Pass ImageOnlyFailure ]
</span><span class="cx"> imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.html [ Crash Pass ]
</span><span class="cx"> imported/mozilla/svg/text/clipPath-content.svg [ Pass ImageOnlyFailure ]
</span><del>-
-# Hover test does not apply
-fast/css/deferred-parsing/hover-test.html [ Skip ]
-
</del></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorwk2TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -1919,7 +1919,3 @@
</span><span class="cx"> webkit.org/b/165165 [ Release ] http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce.html [ Pass Timeout ]
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/165344 [ Release ] http/tests/security/module-incorrect-mime-types.html [ Pass Timeout ]
</span><del>-
-# Hover test does not apply
-fast/css/deferred-parsing/hover-test.html [ Skip ]
-
</del></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -1370,7 +1370,6 @@
</span><span class="cx">     css/WebKitCSSViewportRule.cpp
</span><span class="cx"> 
</span><span class="cx">     css/parser/CSSAtRuleID.cpp
</span><del>-    css/parser/CSSDeferredParser.cpp
</del><span class="cx">     css/parser/CSSParser.cpp
</span><span class="cx">     css/parser/CSSParserFastPaths.cpp
</span><span class="cx">     css/parser/CSSParserIdioms.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/ChangeLog        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -885,24 +885,6 @@
</span><span class="cx">         * html/shadow/MediaControlElements.cpp:
</span><span class="cx">         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
</span><span class="cx"> 
</span><del>-2016-12-12  Dave Hyatt  &lt;hyatt@apple.com&gt;
-
-        [CSS Parser] MediaQueryParser should use Ref and not RefPtr
-        https://bugs.webkit.org/show_bug.cgi?id=165771
-
-        Reviewed by Simon Fraser.
-
-        * css/MediaList.cpp:
-        (WebCore::MediaQuerySet::create):
-        * css/parser/CSSParserImpl.cpp:
-        (WebCore::CSSParserImpl::consumeImportRule):
-        (WebCore::CSSParserImpl::consumeMediaRule):
-        * css/parser/MediaQueryParser.cpp:
-        (WebCore::MediaQueryParser::parseMediaQuerySet):
-        (WebCore::MediaQueryParser::parseMediaCondition):
-        (WebCore::MediaQueryParser::parseInternal):
-        * css/parser/MediaQueryParser.h:
-
</del><span class="cx"> 2016-12-12  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         The CSS 'columns' property when set on the &lt;body&gt; element makes short columns
</span><span class="lines">@@ -925,259 +907,6 @@
</span><span class="cx">         * rendering/RenderBlockFlow.cpp:
</span><span class="cx">         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
</span><span class="cx"> 
</span><del>-2016-12-11  Dave Hyatt  &lt;hyatt@apple.com&gt;
-
-        [CSS Parser] Implement deferred parsing of properties, @media, @supports and @keyframes
-        https://bugs.webkit.org/show_bug.cgi?id=165743
-
-        Reviewed by Darin Adler.
-
-        Added new tests in fast/css/deferred-parsing.
-
-        This patch implements deferred parsing in CSS. By default, when parsing
-        author stylesheets, the parser goes into a deferred mode where it leaves
-        the declaration block of all style rules unparsed initially. Instead of
-        creating and setting an ImmutableStyleProperties object on the StyleRule,
-        the parser creates a DeferredStyleProperties object instead that is
-        capable of calling into CSSDeferredParser to parse the properties and values
-        only when the properties are finally asked for.
-
-        In addition, this patch defers the parsing of the interior of @media,
-        @supports, and @keyframes rules. @media blocks that are never matched will
-        never parse any of the rules inside. @supports conditions for unsupported
-        features will also not be parsed. For @keyframes, if the animation is never
-        referenced/used, then the @keyframes child rules will never be parsed.
-
-        * CMakeLists.txt:
-        * WebCore.xcodeproj/project.pbxproj:
-        Add CSSDeferredParser to the build.
-
-        * css/CSSFontFaceSet.cpp:
-        (WebCore::CSSFontFaceSet::matchingFaces):
-        Patched to drop the StyleSheetContents* argument from parseValue, since it
-        is no longer needed.
-
-        * css/CSSKeyframesRule.cpp:
-        (WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
-        (WebCore::StyleRuleKeyframes::parseDeferredRulesIfNeeded):
-        (WebCore::StyleRuleKeyframes::keyframes):
-        (WebCore::StyleRuleKeyframes::wrapperAppendKeyframe):
-        (WebCore::StyleRuleKeyframes::wrapperRemoveKeyframe):
-        (WebCore::StyleRuleKeyframes::findKeyframeIndex):
-        * css/CSSKeyframesRule.h:
-        Keyframes now hold both a keyframes Vector and a DeferredStyleGroupRuleList
-        object. The keyframes vector won't be populated until it is needed, and the
-        population is done by DeferredStyleGroupRuleList, which holds both the original
-        CSSParserTokenRange of the keyframes rule interior, and a references to the
-        CSSDeferredParser that will do the parsing.
-
-        * css/DOMCSSNamespace.cpp:
-        (WebCore::DOMCSSNamespace::supports):
-        Patched to drop the StyleSheetContents* argument from parseValue, since it
-        is no longer needed.
-
-        * css/ElementRuleCollector.cpp:
-        (WebCore::ElementRuleCollector::collectMatchingRulesForList):
-        ElementRuleCollector tests to see if a rule is empty by counting properties(),
-        but we don't want to initiate deferred parsing just to check this. Instead we
-        invoke propertiesWithoutDeferredParsing, which will hand back a nullptr if
-        the properties haven't been parsed yet. In order to ensure this optimization
-        continues to work, any rules whose interiors consist of only whitespace do
-        not get deferred.
-
-        * css/FontFace.cpp:
-        (WebCore::FontFace::setVariant):
-        * css/PropertySetCSSStyleDeclaration.cpp:
-        (WebCore::PropertySetCSSStyleDeclaration::setProperty):
-        (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
-        Patched to drop the StyleSheetContents* argument from parseValue, since it
-        is no longer needed.
-
-        * css/StyleProperties.cpp:
-        (WebCore::MutableStyleProperties::MutableStyleProperties):
-        (WebCore::MutableStyleProperties::setProperty):
-        (WebCore::DeferredStyleProperties::create):
-        (WebCore::DeferredStyleProperties::DeferredStyleProperties):
-        (WebCore::DeferredStyleProperties::~DeferredStyleProperties):
-        (WebCore::DeferredStyleProperties::parseDeferredProperties):
-        * css/StyleProperties.h:
-        (WebCore::StylePropertiesBase::type):
-        (WebCore::StylePropertiesBase::cssParserMode):
-        (WebCore::StylePropertiesBase::StylePropertiesBase):
-        (WebCore::StyleProperties::isMutable):
-        (WebCore::StyleProperties::StyleProperties):
-        (WebCore::StylePropertiesBase::deref):
-        (isType):
-        (WebCore::StyleProperties::cssParserMode): Deleted.
-        (WebCore::StyleProperties::deref): Deleted.
-        Right now StyleProperties has two subclasses, ImmutableStyleProperties (which
-        is created by the parser when not deferring), and MutableStyleProperties (used
-        when making changes and doing DOM Manipulations).
-
-        This patch adds a new base class called StylePropertiesBase, and StyleProperties
-        now derives from it. DeferredStyleProperties derives from this base. The members
-        of StyleProperties have been moved up into StylePropertiesBase.
-
-        The m_isMutable bit, used to determine the type for downcasting has been enhanced
-        to m_type (2 bits), since there are now three possible subclasses.
-
-        * css/StyleRule.cpp:
-        (WebCore::StyleRule::StyleRule):
-        (WebCore::StyleRule::properties):
-        (WebCore::StyleRule::mutableProperties):
-        (WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
-        Patched to ensure that when properties() are accessed, that if the current
-        stored StylePropertyBase in the rule is a DeferredStyleProperties, we then
-        parse and replace DeferredStyleProperties with ImmutableStyleProperties on the
-        rule. By using a common base class, we avoid increasing memory usage in
-        StyleRule.
-
-        (WebCore::DeferredStyleGroupRuleList::create):
-        (WebCore::DeferredStyleGroupRuleList::DeferredStyleGroupRuleList):
-        (WebCore::DeferredStyleGroupRuleList::parseDeferredRules):
-        (WebCore::DeferredStyleGroupRuleList::parseDeferredKeyframes):
-        DeferredStyleGroupList is used to handle deferred parsing of objects with
-        child rules. These include @media, @supports and @keyframes.
-
-        (WebCore::StyleRuleGroup::StyleRuleGroup):
-        (WebCore::StyleRuleGroup::childRules):
-        (WebCore::StyleRuleGroup::wrapperInsertRule):
-        (WebCore::StyleRuleGroup::wrapperRemoveRule):
-        (WebCore::StyleRuleGroup::parseDeferredRulesIfNeeded):
-        (WebCore::StyleRuleMedia::StyleRuleMedia):
-        (WebCore::StyleRuleSupports::StyleRuleSupports):
-        StyleRuleGroup now holds both a child rules Vector and a
-        DeferredStyleGroupRuleList. If DeferredStyleGroupRuleList is set, then
-        when the childRules are finally accessed, we will populate the childRules
-        Vector and then null out the DeferredStyleGroupRuleList.
-
-        * css/StyleRule.h:
-        (WebCore::StyleRule::propertiesWithoutDeferredParsing):
-        (WebCore::StyleRuleGroup::childRulesWithoutDeferredParsing):
-        (WebCore::StyleRuleGroup::childRules): Deleted.
-        Add new accesors for fetching properties and child rules without causing
-        deferred parsing to happen.
-
-        * css/StyleSheetContents.cpp:
-        (WebCore::StyleSheetContents::parseAuthorStyleSheet):
-        (WebCore::StyleSheetContents::parseString):
-        Patched to turn on deferred parsing for author sheets and for all
-        non-UA stylesheets parsed from a string (e.g., &lt;style&gt;).
-
-        (WebCore::traverseSubresourcesInRules):
-        The broken resource check was aggressively accessing properties(). Patch
-        it to call propertiesWithoutDeferredParsing() instead so that it doesn't
-        defeat the new optimization.
-
-        * css/WebKitCSSMatrix.cpp:
-        (WebCore::WebKitCSSMatrix::setMatrixValue):
-        Patched to drop the StyleSheetContents* argument from parseValue, since it
-        is no longer needed.
-
-        * css/parser/CSSDeferredParser.cpp: Added.
-        (WebCore::CSSDeferredParser::CSSDeferredParser):
-        (WebCore::CSSDeferredParser::parseDeclaration):
-        (WebCore::CSSDeferredParser::parseRuleList):
-        (WebCore::CSSDeferredParser::parseKeyframeList):
-        * css/parser/CSSDeferredParser.h: Added.
-        (WebCore::CSSDeferredParser::create):
-        (WebCore::CSSDeferredParser::tokenizer):
-        (WebCore::CSSDeferredParser::mode):
-        (WebCore::CSSDeferredParser::context):
-        (WebCore::CSSDeferredParser::styleSheet):
-        The CSSDeferredParser. It caches the original CSSTokenizer used to parse
-        the sheet, which in turn retains all the tokens and escaped strings. Because
-        the CSSDeferredParser is referenced by all the rules that have yet to parse,
-        it will stay alive until all rules in the stylesheet has been fully parsed.
-
-        The parser receives CSSParserTokenRanges from DeferredStyleProperties or
-        DeferredStyleGroupRuleList and feeds them to CSSParserImpl, which then
-        is able to do the parsing as it would have occurred originally had the
-        range not been deferred.
-
-        * css/parser/CSSParser.cpp:
-        (WebCore::CSSParser::parseSheet):
-        (WebCore::CSSParser::parseSupportsCondition):
-        (WebCore::CSSParser::parseSingleValue):
-        (WebCore::CSSParser::parseValue):
-        * css/parser/CSSParser.h:
-        * css/parser/CSSParserFastPaths.cpp:
-        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
-        (WebCore::parseKeywordValue):
-        (WebCore::CSSParserFastPaths::maybeParseValue):
-        * css/parser/CSSParserFastPaths.h:
-        Drop the StyleSheetContents* argument from the methods that no longer need
-        them.
-
-        * css/parser/CSSParserImpl.cpp:
-        (WebCore::CSSParserImpl::CSSParserImpl):
-        (WebCore::CSSParserImpl::tokenizer):
-        (WebCore::CSSParserImpl::parseValue):
-        (WebCore::CSSParserImpl::parseCustomPropertyValue):
-        (WebCore::CSSParserImpl::parseDeclarationList):
-        (WebCore::CSSParserImpl::parseInlineStyleDeclaration):
-        (WebCore::CSSParserImpl::parseRule):
-        (WebCore::CSSParserImpl::parseStyleSheet):
-        (WebCore::CSSParserImpl::parseDeclarationListForInspector):
-        (WebCore::CSSParserImpl::parseStyleSheetForInspector):
-        (WebCore::CSSParserImpl::consumeQualifiedRule):
-        (WebCore::CSSParserImpl::consumeMediaRule):
-        (WebCore::CSSParserImpl::consumeSupportsRule):
-        (WebCore::CSSParserImpl::consumeKeyframesRule):
-        (WebCore::CSSParserImpl::consumeStyleRule):
-        Drop the StyleSheetContents* argument from the methods that no longer need
-        them.
-
-        (WebCore::CSSParserImpl::createDeferredStyleProperties):
-        (WebCore::CSSParserImpl::parseDeferredDeclaration):
-        (WebCore::CSSParserImpl::parseDeferredRuleList):
-        (WebCore::CSSParserImpl::parseDeferredKeyframeList):
-        The methods that handle deferred parsing. They make sure to initialize
-        new CSSParserImpls with the original deferred parser, and then call existing
-        methods to do the parsing.
-
-        * css/parser/CSSParserImpl.h:
-        Patched to remove StyleSheetContents* arguments from some methods and
-        to add the new deferred parsing methods.
-
-        * css/parser/CSSParserTokenRange.cpp:
-        (WebCore::CSSParserTokenRange::consumeBlockCheckingForEditability):
-        * css/parser/CSSParserTokenRange.h:
-        In order to preserve the editability optimization from r180867, when
-        a style rule's block is consumed, we use a special method that looks
-        for -webkit-user-modify tokens. If one is seen, then the editability
-        optimization is turned off. Because we do this at the token level,
-        the optimization keeps working even if properties don't get parsed.
-
-        * css/parser/CSSPropertyParser.cpp:
-        (WebCore::CSSPropertyParser::parseSingleValue):
-        (WebCore::CSSPropertyParser::parseFontFaceDescriptor):
-        (WebCore::CSSPropertyParser::consumeFont):
-        (WebCore::CSSPropertyParser::parseShorthand):
-        Patched to remove StyleSheetContents* arguments now that the editability
-        check is in CSSTokenizer instead.
-
-        * css/parser/CSSTokenizer.cpp:
-        (WebCore::CSSTokenizer::tokenRange):
-        * css/parser/CSSTokenizer.h:
-        Make tokenRange() const.
-
-        * html/canvas/CanvasRenderingContext2D.cpp:
-        (WebCore::CanvasRenderingContext2D::setFont):
-        Patched to drop the StyleSheetContents* argument.
-
-        * testing/Internals.cpp:
-        (WebCore::deferredStyleRulesCountForList):
-        (WebCore::Internals::deferredStyleRulesCount):
-        (WebCore::deferredGroupRulesCountForList):
-        (WebCore::Internals::deferredGroupRulesCount):
-        (WebCore::deferredKeyframesRulesCountForList):
-        (WebCore::Internals::deferredKeyframesRulesCount):
-        * testing/Internals.h:
-        * testing/Internals.idl:
-        Add new testing methods that can count the deferred style rules and
-        group child rule lists. These methods are used by the new layout tests.
-
</del><span class="cx"> 2016-12-09  Dean Jackson  &lt;dino@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Autoplay isn't working in iPhone MediaDocuments
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -3507,8 +3507,6 @@
</span><span class="cx">                 9444CBE81D8861C20073A074 /* CSSVariableData.h in Headers */ = {isa = PBXBuildFile; fileRef = 9444CBDD1D8861580073A074 /* CSSVariableData.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 9444CBE91D8861CA0073A074 /* CSSVariableReferenceValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9444CBDC1D8861580073A074 /* CSSVariableReferenceValue.cpp */; };
</span><span class="cx">                 9444CBEA1D8861CA0073A074 /* CSSVariableReferenceValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 9444CBDB1D8861580073A074 /* CSSVariableReferenceValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                94476BDA1DFCAC0300690E23 /* CSSDeferredParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94476BD81DFCA4A700690E23 /* CSSDeferredParser.cpp */; };
-                94476BDB1DFCAC0300690E23 /* CSSDeferredParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 94476BD91DFCA4A700690E23 /* CSSDeferredParser.h */; };
</del><span class="cx">                 946D372D1D6CB2940077084F /* CSSParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 946D37281D6CB28B0077084F /* CSSParser.cpp */; };
</span><span class="cx">                 946D372E1D6CB2940077084F /* CSSParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 946D37291D6CB28B0077084F /* CSSParser.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 946D372F1D6CB2940077084F /* CSSParserMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 946D372A1D6CB28B0077084F /* CSSParserMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -11066,8 +11064,6 @@
</span><span class="cx">                 9444CBDE1D8861580073A074 /* CSSVariableData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSVariableData.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9444CBE11D8861580073A074 /* CSSCustomIdentValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSCustomIdentValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9444CBE21D8861580073A074 /* CSSCustomIdentValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSCustomIdentValue.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                94476BD81DFCA4A700690E23 /* CSSDeferredParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CSSDeferredParser.cpp; path = parser/CSSDeferredParser.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                94476BD91DFCA4A700690E23 /* CSSDeferredParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSSDeferredParser.h; path = parser/CSSDeferredParser.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 946D37281D6CB28B0077084F /* CSSParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CSSParser.cpp; path = parser/CSSParser.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 946D37291D6CB28B0077084F /* CSSParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSSParser.h; path = parser/CSSParser.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 946D372A1D6CB28B0077084F /* CSSParserMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSSParserMode.h; path = parser/CSSParserMode.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -19011,8 +19007,6 @@
</span><span class="cx">                         children = (
</span><span class="cx">                                 94DE5C7F1D7F39D000164F2A /* CSSAtRuleID.cpp */,
</span><span class="cx">                                 94DE5C801D7F39D000164F2A /* CSSAtRuleID.h */,
</span><del>-                                94476BD81DFCA4A700690E23 /* CSSDeferredParser.cpp */,
-                                94476BD91DFCA4A700690E23 /* CSSDeferredParser.h */,
</del><span class="cx">                                 946D37281D6CB28B0077084F /* CSSParser.cpp */,
</span><span class="cx">                                 946D37291D6CB28B0077084F /* CSSParser.h */,
</span><span class="cx">                                 949C76FE1D6E1D8C00C0DE4F /* CSSParserFastPaths.cpp */,
</span><span class="lines">@@ -27660,7 +27654,6 @@
</span><span class="cx">                                 832B843419D8E55100B26055 /* SVGAnimateElementBase.h in Headers */,
</span><span class="cx">                                 B22279930D00BF220071B782 /* SVGAnimateMotionElement.h in Headers */,
</span><span class="cx">                                 B22279950D00BF220071B782 /* SVGAnimateTransformElement.h in Headers */,
</span><del>-                                94476BDB1DFCAC0300690E23 /* CSSDeferredParser.h in Headers */,
</del><span class="cx">                                 B22279980D00BF220071B782 /* SVGAnimationElement.h in Headers */,
</span><span class="cx">                                 439D334513A6911C00C20F4F /* SVGAnimatorFactory.h in Headers */,
</span><span class="cx">                                 08FB3F8413BC754C0099FC18 /* SVGAttributeToPropertyMap.h in Headers */,
</span><span class="lines">@@ -30933,7 +30926,6 @@
</span><span class="cx">                                 99CC0B5718BE984A006CEBCC /* ReplayInputCreationMethods.cpp in Sources */,
</span><span class="cx">                                 99CC0B5818BE984A006CEBCC /* ReplayInputDispatchMethods.cpp in Sources */,
</span><span class="cx">                                 99CC0B5918BE984A006CEBCC /* ReplaySession.cpp in Sources */,
</span><del>-                                94476BDA1DFCAC0300690E23 /* CSSDeferredParser.cpp in Sources */,
</del><span class="cx">                                 99CC0B5B18BE984A006CEBCC /* ReplaySessionSegment.cpp in Sources */,
</span><span class="cx">                                 F55B3DCF1251F12D003EF269 /* ResetInputType.cpp in Sources */,
</span><span class="cx">                                 934F713E0D5A6F2800018D69 /* ResourceErrorBase.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceSet.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceSet.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/CSSFontFaceSet.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -328,7 +328,7 @@
</span><span class="cx"> ExceptionOr&lt;Vector&lt;std::reference_wrapper&lt;CSSFontFace&gt;&gt;&gt; CSSFontFaceSet::matchingFaces(const String&amp; font, const String&amp; string)
</span><span class="cx"> {
</span><span class="cx">     auto style = MutableStyleProperties::create();
</span><del>-    auto parseResult = CSSParser::parseValue(style, CSSPropertyFont, font, true, HTMLStandardMode);
</del><ins>+    auto parseResult = CSSParser::parseValue(style, CSSPropertyFont, font, true, HTMLStandardMode, nullptr);
</ins><span class="cx">     if (parseResult == CSSParser::ParseResult::Error)
</span><span class="cx">         return Exception { SYNTAX_ERR };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSKeyframesRulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSKeyframesRule.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSKeyframesRule.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/CSSKeyframesRule.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -26,7 +26,6 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;CSSKeyframesRule.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;CSSDeferredParser.h&quot;
</del><span class="cx"> #include &quot;CSSKeyframeRule.h&quot;
</span><span class="cx"> #include &quot;CSSParser.h&quot;
</span><span class="cx"> #include &quot;CSSRuleList.h&quot;
</span><span class="lines">@@ -38,20 +37,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-StyleRuleKeyframes::StyleRuleKeyframes(const AtomicString&amp; name)
</del><ins>+StyleRuleKeyframes::StyleRuleKeyframes()
</ins><span class="cx">     : StyleRuleBase(Keyframes)
</span><del>-    , m_name(name)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-StyleRuleKeyframes::StyleRuleKeyframes(const AtomicString&amp; name, std::unique_ptr&lt;DeferredStyleGroupRuleList&gt;&amp;&amp; deferredRules)
-    : StyleRuleBase(Keyframes)
-    , m_name(name)
-    , m_deferredRules(WTFMove(deferredRules))
-{
-    
-}
-
</del><span class="cx"> StyleRuleKeyframes::StyleRuleKeyframes(const StyleRuleKeyframes&amp; o)
</span><span class="cx">     : StyleRuleBase(o)
</span><span class="cx">     , m_name(o.m_name)
</span><span class="lines">@@ -65,21 +55,6 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void StyleRuleKeyframes::parseDeferredRulesIfNeeded() const
-{
-    if (!m_deferredRules)
-        return;
-    
-    m_deferredRules-&gt;parseDeferredKeyframes(const_cast&lt;StyleRuleKeyframes&amp;&gt;(*this));
-    m_deferredRules = nullptr;
-}
-
-const Vector&lt;Ref&lt;StyleKeyframe&gt;&gt;&amp; StyleRuleKeyframes::keyframes() const
-{
-    parseDeferredRulesIfNeeded();
-    return m_keyframes;
-}
-
</del><span class="cx"> void StyleRuleKeyframes::parserAppendKeyframe(RefPtr&lt;StyleKeyframe&gt;&amp;&amp; keyframe)
</span><span class="cx"> {
</span><span class="cx">     if (!keyframe)
</span><span class="lines">@@ -89,20 +64,16 @@
</span><span class="cx"> 
</span><span class="cx"> void StyleRuleKeyframes::wrapperAppendKeyframe(Ref&lt;StyleKeyframe&gt;&amp;&amp; keyframe)
</span><span class="cx"> {
</span><del>-    parseDeferredRulesIfNeeded();
</del><span class="cx">     m_keyframes.append(WTFMove(keyframe));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void StyleRuleKeyframes::wrapperRemoveKeyframe(unsigned index)
</span><span class="cx"> {
</span><del>-    parseDeferredRulesIfNeeded();
</del><span class="cx">     m_keyframes.remove(index);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> size_t StyleRuleKeyframes::findKeyframeIndex(const String&amp; key) const
</span><span class="cx"> {
</span><del>-    parseDeferredRulesIfNeeded();
-
</del><span class="cx">     auto keys = CSSParser::parseKeyframeKeyList(key);
</span><span class="cx"> 
</span><span class="cx">     for (size_t i = m_keyframes.size(); i--; ) {
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSKeyframesRuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSKeyframesRule.h (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSKeyframesRule.h        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/CSSKeyframesRule.h        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -39,17 +39,12 @@
</span><span class="cx"> 
</span><span class="cx"> class StyleRuleKeyframes final : public StyleRuleBase {
</span><span class="cx"> public:
</span><del>-    static Ref&lt;StyleRuleKeyframes&gt; create(const AtomicString&amp; name) { return adoptRef(*new StyleRuleKeyframes(name)); }
-    static Ref&lt;StyleRuleKeyframes&gt; create(const AtomicString&amp; name, std::unique_ptr&lt;DeferredStyleGroupRuleList&gt;&amp;&amp; deferredRules) { return adoptRef(*new StyleRuleKeyframes(name, WTFMove(deferredRules))); }
</del><ins>+    static Ref&lt;StyleRuleKeyframes&gt; create() { return adoptRef(*new StyleRuleKeyframes()); }
</ins><span class="cx">     
</span><span class="cx">     ~StyleRuleKeyframes();
</span><span class="cx">     
</span><del>-    const Vector&lt;Ref&lt;StyleKeyframe&gt;&gt;&amp; keyframes() const;
-    const Vector&lt;Ref&lt;StyleKeyframe&gt;&gt;* keyframesWithoutDeferredParsing() const
-    {
-        return !m_deferredRules ? &amp;m_keyframes : nullptr;
-    }
-
</del><ins>+    const Vector&lt;Ref&lt;StyleKeyframe&gt;&gt;&amp; keyframes() const { return m_keyframes; }
+    
</ins><span class="cx">     void parserAppendKeyframe(RefPtr&lt;StyleKeyframe&gt;&amp;&amp;);
</span><span class="cx">     void wrapperAppendKeyframe(Ref&lt;StyleKeyframe&gt;&amp;&amp;);
</span><span class="cx">     void wrapperRemoveKeyframe(unsigned);
</span><span class="lines">@@ -56,22 +51,17 @@
</span><span class="cx"> 
</span><span class="cx">     const AtomicString&amp; name() const { return m_name; }
</span><span class="cx">     void setName(const AtomicString&amp; name) { m_name = name; }
</span><del>-
</del><ins>+    
</ins><span class="cx">     size_t findKeyframeIndex(const String&amp; key) const;
</span><span class="cx"> 
</span><span class="cx">     Ref&lt;StyleRuleKeyframes&gt; copy() const { return adoptRef(*new StyleRuleKeyframes(*this)); }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    StyleRuleKeyframes(const AtomicString&amp;);
-    StyleRuleKeyframes(const AtomicString&amp;, std::unique_ptr&lt;DeferredStyleGroupRuleList&gt;&amp;&amp;);
</del><ins>+    StyleRuleKeyframes();
</ins><span class="cx">     StyleRuleKeyframes(const StyleRuleKeyframes&amp;);
</span><span class="cx"> 
</span><del>-    void parseDeferredRulesIfNeeded() const;
-    
-    mutable Vector&lt;Ref&lt;StyleKeyframe&gt;&gt; m_keyframes;
</del><ins>+    Vector&lt;Ref&lt;StyleKeyframe&gt;&gt; m_keyframes;
</ins><span class="cx">     AtomicString m_name;
</span><del>-    
-    mutable std::unique_ptr&lt;DeferredStyleGroupRuleList&gt; m_deferredRules;
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class CSSKeyframesRule final : public CSSRule {
</span></span></pre></div>
<a id="trunkSourceWebCorecssDOMCSSNamespacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/DOMCSSNamespace.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/DOMCSSNamespace.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/DOMCSSNamespace.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     auto dummyStyle = MutableStyleProperties::create();
</span><del>-    return CSSParser::parseValue(dummyStyle, propertyID, normalizedValue, false, document) != CSSParser::ParseResult::Error;
</del><ins>+    return CSSParser::parseValue(dummyStyle, propertyID, normalizedValue, false, document, nullptr) != CSSParser::ParseResult::Error;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool DOMCSSNamespace::supports(Document&amp; document, const String&amp; conditionText)
</span></span></pre></div>
<a id="trunkSourceWebCorecssElementRuleCollectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/ElementRuleCollector.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/ElementRuleCollector.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/ElementRuleCollector.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -484,10 +484,8 @@
</span><span class="cx">         StyleRule* rule = ruleData.rule();
</span><span class="cx"> 
</span><span class="cx">         // If the rule has no properties to apply, then ignore it in the non-debug mode.
</span><del>-        // Note that if we get null back here, it means we have a rule with deferred properties,
-        // and that means we always have to consider it.
-        const StyleProperties* properties = rule-&gt;propertiesWithoutDeferredParsing();
-        if (properties &amp;&amp; properties-&gt;isEmpty() &amp;&amp; !matchRequest.includeEmptyRules)
</del><ins>+        const StyleProperties&amp; properties = rule-&gt;properties();
+        if (properties.isEmpty() &amp;&amp; !matchRequest.includeEmptyRules)
</ins><span class="cx">             continue;
</span><span class="cx"> 
</span><span class="cx">         // FIXME: Exposing the non-standard getMatchedCSSRules API to web is the only reason this is needed.
</span></span></pre></div>
<a id="trunkSourceWebCorecssFontFacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/FontFace.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/FontFace.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/FontFace.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -195,7 +195,7 @@
</span><span class="cx">         return Exception { SYNTAX_ERR };
</span><span class="cx"> 
</span><span class="cx">     auto style = MutableStyleProperties::create();
</span><del>-    auto result = CSSParser::parseValue(style, CSSPropertyFontVariant, variant, true, HTMLStandardMode);
</del><ins>+    auto result = CSSParser::parseValue(style, CSSPropertyFontVariant, variant, true, HTMLStandardMode, nullptr);
</ins><span class="cx">     if (result == CSSParser::ParseResult::Error)
</span><span class="cx">         return Exception { SYNTAX_ERR };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssMediaListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/MediaList.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/MediaList.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/MediaList.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx">     if (mediaString.isEmpty())
</span><span class="cx">         return MediaQuerySet::create();
</span><span class="cx">     
</span><del>-    return MediaQueryParser::parseMediaQuerySet(mediaString);
</del><ins>+    return MediaQueryParser::parseMediaQuerySet(mediaString).releaseNonNull();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> MediaQuerySet::MediaQuerySet()
</span></span></pre></div>
<a id="trunkSourceWebCorecssPropertySetCSSStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -249,7 +249,7 @@
</span><span class="cx">     if (propertyID == CSSPropertyCustom)
</span><span class="cx">         changed = m_propertySet-&gt;setCustomProperty(propertyName, value, important, cssParserContext());
</span><span class="cx">     else
</span><del>-        changed = m_propertySet-&gt;setProperty(propertyID, value, important, cssParserContext());
</del><ins>+        changed = m_propertySet-&gt;setProperty(propertyID, value, important, cssParserContext(), contextStyleSheet());
</ins><span class="cx"> 
</span><span class="cx">     didMutate(changed ? PropertyChanged : NoChanges);
</span><span class="cx"> 
</span><span class="lines">@@ -304,7 +304,7 @@
</span><span class="cx">     if (!willMutate())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    bool changed = m_propertySet-&gt;setProperty(propertyID, value, important, cssParserContext());
</del><ins>+    bool changed = m_propertySet-&gt;setProperty(propertyID, value, important, cssParserContext(), contextStyleSheet());
</ins><span class="cx"> 
</span><span class="cx">     didMutate(changed ? PropertyChanged : NoChanges);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssStylePropertiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleProperties.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleProperties.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/StyleProperties.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -25,7 +25,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CSSComputedStyleDeclaration.h&quot;
</span><span class="cx"> #include &quot;CSSCustomPropertyValue.h&quot;
</span><del>-#include &quot;CSSDeferredParser.h&quot;
</del><span class="cx"> #include &quot;CSSParser.h&quot;
</span><span class="cx"> #include &quot;CSSPendingSubstitutionValue.h&quot;
</span><span class="cx"> #include &quot;CSSValueKeywords.h&quot;
</span><span class="lines">@@ -72,12 +71,12 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> MutableStyleProperties::MutableStyleProperties(CSSParserMode cssParserMode)
</span><del>-    : StyleProperties(cssParserMode, MutablePropertiesType)
</del><ins>+    : StyleProperties(cssParserMode)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> MutableStyleProperties::MutableStyleProperties(const CSSProperty* properties, unsigned length)
</span><del>-    : StyleProperties(HTMLStandardMode, MutablePropertiesType)
</del><ins>+    : StyleProperties(HTMLStandardMode)
</ins><span class="cx"> {
</span><span class="cx">     m_propertyVector.reserveInitialCapacity(length);
</span><span class="cx">     for (unsigned i = 0; i &lt; length; ++i)
</span><span class="lines">@@ -108,9 +107,8 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> MutableStyleProperties::MutableStyleProperties(const StyleProperties&amp; other)
</span><del>-    : StyleProperties(other.cssParserMode(), MutablePropertiesType)
</del><ins>+    : StyleProperties(other.cssParserMode())
</ins><span class="cx"> {
</span><del>-    ASSERT(other.type() != DeferredPropertiesType);
</del><span class="cx">     if (is&lt;MutableStyleProperties&gt;(other))
</span><span class="cx">         m_propertyVector = downcast&lt;MutableStyleProperties&gt;(other).m_propertyVector;
</span><span class="cx">     else {
</span><span class="lines">@@ -721,7 +719,7 @@
</span><span class="cx">     return propertyAt(foundPropertyIndex).isImplicit();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool MutableStyleProperties::setProperty(CSSPropertyID propertyID, const String&amp; value, bool important, CSSParserContext parserContext)
</del><ins>+bool MutableStyleProperties::setProperty(CSSPropertyID propertyID, const String&amp; value, bool important, CSSParserContext parserContext, StyleSheetContents* contextStyleSheet)
</ins><span class="cx"> {
</span><span class="cx">     // Setting the value to an empty string just removes the property in both IE and Gecko.
</span><span class="cx">     // Setting it to null seems to produce less consistent results, but we treat it just the same.
</span><span class="lines">@@ -732,7 +730,7 @@
</span><span class="cx"> 
</span><span class="cx">     // When replacing an existing property value, this moves the property to the end of the list.
</span><span class="cx">     // Firefox preserves the position, and MSIE moves the property to the beginning.
</span><del>-    return CSSParser::parseValue(*this, propertyID, value, important, parserContext) == CSSParser::ParseResult::Changed;
</del><ins>+    return CSSParser::parseValue(*this, propertyID, value, important, parserContext, contextStyleSheet) == CSSParser::ParseResult::Changed;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool MutableStyleProperties::setProperty(CSSPropertyID propertyID, const String&amp; value, bool important)
</span><span class="lines">@@ -1363,26 +1361,6 @@
</span><span class="cx">     result.append(';');
</span><span class="cx">     return result.toString();
</span><span class="cx"> }
</span><del>-    
-Ref&lt;DeferredStyleProperties&gt; DeferredStyleProperties::create(const CSSParserTokenRange&amp; tokenRange, CSSDeferredParser&amp; parser)
-{
-    return adoptRef(*new DeferredStyleProperties(tokenRange, parser));
-}
</del><span class="cx"> 
</span><del>-DeferredStyleProperties::DeferredStyleProperties(const CSSParserTokenRange&amp; tokenRange, CSSDeferredParser&amp; parser)
-    : StylePropertiesBase(parser.mode(), DeferredPropertiesType)
-    , m_range(tokenRange)
-    , m_parser(parser)
-{
-}
-    
-DeferredStyleProperties::~DeferredStyleProperties()
-{
-}
</del><span class="cx"> 
</span><del>-Ref&lt;ImmutableStyleProperties&gt; DeferredStyleProperties::parseDeferredProperties()
-{
-    return m_parser-&gt;parseDeclaration(m_range);
-}
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorecssStylePropertiesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleProperties.h (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleProperties.h        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/StyleProperties.h        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -22,7 +22,6 @@
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CSSParserMode.h&quot;
</span><del>-#include &quot;CSSParserTokenRange.h&quot;
</del><span class="cx"> #include &quot;CSSProperty.h&quot;
</span><span class="cx"> #include &quot;CSSValueKeywords.h&quot;
</span><span class="cx"> #include &lt;memory&gt;
</span><span class="lines">@@ -33,7 +32,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class CSSDeferredParser;
</del><span class="cx"> class CSSStyleDeclaration;
</span><span class="cx"> class CachedResource;
</span><span class="cx"> class ImmutableStyleProperties;
</span><span class="lines">@@ -44,39 +42,13 @@
</span><span class="cx"> class StylePropertyShorthand;
</span><span class="cx"> class StyleSheetContents;
</span><span class="cx"> 
</span><del>-enum StylePropertiesType { ImmutablePropertiesType, MutablePropertiesType, DeferredPropertiesType };
-    
-class StylePropertiesBase : public RefCounted&lt;StylePropertiesBase&gt; {
</del><ins>+class StyleProperties : public RefCounted&lt;StyleProperties&gt; {
+    friend class PropertyReference;
</ins><span class="cx"> public:
</span><span class="cx">     // Override RefCounted's deref() to ensure operator delete is called on
</span><span class="cx">     // the appropriate subclass type.
</span><span class="cx">     void deref();
</span><del>-    
-    StylePropertiesType type() const { return static_cast&lt;StylePropertiesType&gt;(m_type); }
</del><span class="cx"> 
</span><del>-    CSSParserMode cssParserMode() const { return static_cast&lt;CSSParserMode&gt;(m_cssParserMode); }
-
-protected:
-    StylePropertiesBase(CSSParserMode cssParserMode, StylePropertiesType type)
-        : m_cssParserMode(cssParserMode)
-        , m_type(type)
-        , m_arraySize(0)
-    { }
-    
-    StylePropertiesBase(CSSParserMode cssParserMode, unsigned immutableArraySize)
-        : m_cssParserMode(cssParserMode)
-        , m_type(ImmutablePropertiesType)
-        , m_arraySize(immutableArraySize)
-    { }
-    
-    unsigned m_cssParserMode : 3;
-    mutable unsigned m_type : 2;
-    unsigned m_arraySize : 27;
-};
-
-class StyleProperties : public StylePropertiesBase {
-    friend class PropertyReference;
-public:
</del><span class="cx">     class PropertyReference {
</span><span class="cx">     public:
</span><span class="cx">         PropertyReference(const StylePropertyMetadata&amp; metadata, const CSSValue* value)
</span><span class="lines">@@ -122,6 +94,8 @@
</span><span class="cx"> 
</span><span class="cx">     Ref&lt;MutableStyleProperties&gt; copyBlockProperties() const;
</span><span class="cx"> 
</span><ins>+    CSSParserMode cssParserMode() const { return static_cast&lt;CSSParserMode&gt;(m_cssParserMode); }
+
</ins><span class="cx">     WEBCORE_EXPORT Ref&lt;MutableStyleProperties&gt; mutableCopy() const;
</span><span class="cx">     Ref&lt;ImmutableStyleProperties&gt; immutableCopyIfNeeded() const;
</span><span class="cx"> 
</span><span class="lines">@@ -129,8 +103,8 @@
</span><span class="cx">     
</span><span class="cx">     String asText() const;
</span><span class="cx"> 
</span><ins>+    bool isMutable() const { return m_isMutable; }
</ins><span class="cx">     bool hasCSSOMWrapper() const;
</span><del>-    bool isMutable() const { return type() == MutablePropertiesType; }
</del><span class="cx"> 
</span><span class="cx">     bool traverseSubresources(const std::function&lt;bool (const CachedResource&amp;)&gt;&amp; handler) const;
</span><span class="cx"> 
</span><span class="lines">@@ -143,17 +117,25 @@
</span><span class="cx">     bool propertyMatches(CSSPropertyID, const CSSValue*) const;
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    StyleProperties(CSSParserMode cssParserMode, StylePropertiesType type)
-        : StylePropertiesBase(cssParserMode, type)
</del><ins>+    StyleProperties(CSSParserMode cssParserMode)
+        : m_cssParserMode(cssParserMode)
+        , m_isMutable(true)
+        , m_arraySize(0)
</ins><span class="cx">     { }
</span><span class="cx"> 
</span><span class="cx">     StyleProperties(CSSParserMode cssParserMode, unsigned immutableArraySize)
</span><del>-        : StylePropertiesBase(cssParserMode, immutableArraySize)
</del><ins>+        : m_cssParserMode(cssParserMode)
+        , m_isMutable(false)
+        , m_arraySize(immutableArraySize)
</ins><span class="cx">     { }
</span><span class="cx"> 
</span><span class="cx">     int findPropertyIndex(CSSPropertyID) const;
</span><span class="cx">     int findCustomPropertyIndex(const String&amp; propertyName) const;
</span><del>-
</del><ins>+    
+    unsigned m_cssParserMode : 3;
+    mutable unsigned m_isMutable : 1;
+    unsigned m_arraySize : 28;
+    
</ins><span class="cx"> private:
</span><span class="cx">     String getShorthandValue(const StylePropertyShorthand&amp;) const;
</span><span class="cx">     String getCommonValue(const StylePropertyShorthand&amp;) const;
</span><span class="lines">@@ -217,7 +199,7 @@
</span><span class="cx">     bool addParsedProperty(const CSSProperty&amp;);
</span><span class="cx"> 
</span><span class="cx">     // These expand shorthand properties into multiple properties.
</span><del>-    bool setProperty(CSSPropertyID, const String&amp; value, bool important, CSSParserContext);
</del><ins>+    bool setProperty(CSSPropertyID, const String&amp; value, bool important, CSSParserContext, StyleSheetContents* = nullptr);
</ins><span class="cx">     bool setProperty(CSSPropertyID, const String&amp; value, bool important = false);
</span><span class="cx">     void setProperty(CSSPropertyID, RefPtr&lt;CSSValue&gt;&amp;&amp;, bool important = false);
</span><span class="cx"> 
</span><span class="lines">@@ -260,20 +242,6 @@
</span><span class="cx">     friend class StyleProperties;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-class DeferredStyleProperties final : public StylePropertiesBase {
-public:
-    WEBCORE_EXPORT ~DeferredStyleProperties();
-    static Ref&lt;DeferredStyleProperties&gt; create(const CSSParserTokenRange&amp;, CSSDeferredParser&amp;);
-
-    Ref&lt;ImmutableStyleProperties&gt; parseDeferredProperties();
-    
-private:
-    DeferredStyleProperties(const CSSParserTokenRange&amp;, CSSDeferredParser&amp;);
-    
-    CSSParserTokenRange m_range;
-    Ref&lt;CSSDeferredParser&gt; m_parser;
-};
-
</del><span class="cx"> inline ImmutableStyleProperties::PropertyReference ImmutableStyleProperties::propertyAt(unsigned index) const
</span><span class="cx"> {
</span><span class="cx">     return PropertyReference(metadataArray()[index], valueArray()[index]);
</span><span class="lines">@@ -299,7 +267,7 @@
</span><span class="cx">     return downcast&lt;ImmutableStyleProperties&gt;(*this).propertyCount();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void StylePropertiesBase::deref()
</del><ins>+inline void StyleProperties::deref()
</ins><span class="cx"> {
</span><span class="cx">     if (!derefBase())
</span><span class="cx">         return;
</span><span class="lines">@@ -306,10 +274,8 @@
</span><span class="cx"> 
</span><span class="cx">     if (is&lt;MutableStyleProperties&gt;(*this))
</span><span class="cx">         delete downcast&lt;MutableStyleProperties&gt;(this);
</span><del>-    else if (is&lt;ImmutableStyleProperties&gt;(*this))
</del><ins>+    else
</ins><span class="cx">         delete downcast&lt;ImmutableStyleProperties&gt;(this);
</span><del>-    else
-        delete downcast&lt;DeferredStyleProperties&gt;(this);
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline int StyleProperties::findPropertyIndex(CSSPropertyID propertyID) const
</span><span class="lines">@@ -328,18 +294,10 @@
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><del>-SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::StyleProperties)
-    static bool isType(const WebCore::StylePropertiesBase&amp; set) { return set.type() != WebCore::DeferredPropertiesType; }
-SPECIALIZE_TYPE_TRAITS_END()
-
</del><span class="cx"> SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::MutableStyleProperties)
</span><del>-    static bool isType(const WebCore::StylePropertiesBase&amp; set) { return set.type() == WebCore::MutablePropertiesType; }
</del><ins>+    static bool isType(const WebCore::StyleProperties&amp; set) { return set.isMutable(); }
</ins><span class="cx"> SPECIALIZE_TYPE_TRAITS_END()
</span><span class="cx"> 
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::ImmutableStyleProperties)
</span><del>-    static bool isType(const WebCore::StylePropertiesBase&amp; set) { return set.type() == WebCore::ImmutablePropertiesType; }
</del><ins>+    static bool isType(const WebCore::StyleProperties&amp; set) { return !set.isMutable(); }
</ins><span class="cx"> SPECIALIZE_TYPE_TRAITS_END()
</span><del>-
-SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::DeferredStyleProperties)
-    static bool isType(const WebCore::StylePropertiesBase&amp; set) { return set.type() == WebCore::DeferredPropertiesType; }
-SPECIALIZE_TYPE_TRAITS_END()
</del></span></pre></div>
<a id="trunkSourceWebCorecssStyleRulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleRule.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleRule.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/StyleRule.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -22,7 +22,6 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;StyleRule.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;CSSDeferredParser.h&quot;
</del><span class="cx"> #include &quot;CSSFontFaceRule.h&quot;
</span><span class="cx"> #include &quot;CSSImportRule.h&quot;
</span><span class="cx"> #include &quot;CSSKeyframeRule.h&quot;
</span><span class="lines">@@ -208,7 +207,7 @@
</span><span class="cx">     return sizeof(StyleRule) + sizeof(CSSSelector) + StyleProperties::averageSizeInBytes();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-StyleRule::StyleRule(Ref&lt;StylePropertiesBase&gt;&amp;&amp; properties)
</del><ins>+StyleRule::StyleRule(Ref&lt;StyleProperties&gt;&amp;&amp; properties)
</ins><span class="cx">     : StyleRuleBase(Style)
</span><span class="cx">     , m_properties(WTFMove(properties))
</span><span class="cx"> {
</span><span class="lines">@@ -216,7 +215,7 @@
</span><span class="cx"> 
</span><span class="cx"> StyleRule::StyleRule(const StyleRule&amp; o)
</span><span class="cx">     : StyleRuleBase(o)
</span><del>-    , m_properties(o.properties().mutableCopy())
</del><ins>+    , m_properties(o.m_properties-&gt;mutableCopy())
</ins><span class="cx">     , m_selectorList(o.m_selectorList)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -225,17 +224,10 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const StyleProperties&amp; StyleRule::properties() const
-{
-    if (m_properties-&gt;type() == DeferredPropertiesType)
-        m_properties = downcast&lt;DeferredStyleProperties&gt;(m_properties.get()).parseDeferredProperties();
-    return downcast&lt;StyleProperties&gt;(m_properties.get());
-}
-
</del><span class="cx"> MutableStyleProperties&amp; StyleRule::mutableProperties()
</span><span class="cx"> {
</span><span class="cx">     if (!is&lt;MutableStyleProperties&gt;(m_properties.get()))
</span><del>-        m_properties = properties().mutableCopy();
</del><ins>+        m_properties = m_properties-&gt;mutableCopy();
</ins><span class="cx">     return downcast&lt;MutableStyleProperties&gt;(m_properties.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -264,7 +256,7 @@
</span><span class="cx">             componentsInThisSelector.append(component);
</span><span class="cx"> 
</span><span class="cx">         if (componentsInThisSelector.size() + componentsSinceLastSplit.size() &gt; maxCount &amp;&amp; !componentsSinceLastSplit.isEmpty()) {
</span><del>-            rules.append(create(componentsSinceLastSplit, const_cast&lt;StyleProperties&amp;&gt;(properties())));
</del><ins>+            rules.append(create(componentsSinceLastSplit, const_cast&lt;StyleProperties&amp;&gt;(m_properties.get())));
</ins><span class="cx">             componentsSinceLastSplit.clear();
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -272,7 +264,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!componentsSinceLastSplit.isEmpty())
</span><del>-        rules.append(create(componentsSinceLastSplit, const_cast&lt;StyleProperties&amp;&gt;(properties())));
</del><ins>+        rules.append(create(componentsSinceLastSplit, const_cast&lt;StyleProperties&amp;&gt;(m_properties.get())));
</ins><span class="cx"> 
</span><span class="cx">     return rules;
</span><span class="cx"> }
</span><span class="lines">@@ -324,22 +316,6 @@
</span><span class="cx">     return downcast&lt;MutableStyleProperties&gt;(m_properties.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-DeferredStyleGroupRuleList::DeferredStyleGroupRuleList(const CSSParserTokenRange&amp; range, CSSDeferredParser&amp; parser)
-    : m_range(range)
-    , m_parser(parser)
-{
-}
-
-void DeferredStyleGroupRuleList::parseDeferredRules(Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; childRules)
-{
-    m_parser-&gt;parseRuleList(m_range, childRules);
-}
-
-void DeferredStyleGroupRuleList::parseDeferredKeyframes(StyleRuleKeyframes&amp; keyframesRule)
-{
-    m_parser-&gt;parseKeyframeList(m_range, keyframesRule);
-}
-    
</del><span class="cx"> StyleRuleGroup::StyleRuleGroup(Type type, Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; adoptRule)
</span><span class="cx">     : StyleRuleBase(type)
</span><span class="cx"> {
</span><span class="lines">@@ -346,47 +322,25 @@
</span><span class="cx">     m_childRules.swap(adoptRule);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-StyleRuleGroup::StyleRuleGroup(Type type, std::unique_ptr&lt;DeferredStyleGroupRuleList&gt;&amp;&amp; deferredRules)
-    : StyleRuleBase(type)
-    , m_deferredRules(WTFMove(deferredRules))
-{
-}
-
</del><span class="cx"> StyleRuleGroup::StyleRuleGroup(const StyleRuleGroup&amp; o)
</span><span class="cx">     : StyleRuleBase(o)
</span><span class="cx"> {
</span><del>-    m_childRules.reserveInitialCapacity(o.childRules().size());
-    for (auto&amp; childRule : o.childRules())
</del><ins>+    m_childRules.reserveInitialCapacity(o.m_childRules.size());
+    for (auto&amp; childRule : o.m_childRules)
</ins><span class="cx">         m_childRules.uncheckedAppend(childRule-&gt;copy());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; StyleRuleGroup::childRules() const
-{
-    parseDeferredRulesIfNeeded();
-    return m_childRules;
-}
-
</del><span class="cx"> void StyleRuleGroup::wrapperInsertRule(unsigned index, Ref&lt;StyleRuleBase&gt;&amp;&amp; rule)
</span><span class="cx"> {
</span><del>-    parseDeferredRulesIfNeeded();
</del><span class="cx">     m_childRules.insert(index, WTFMove(rule));
</span><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> void StyleRuleGroup::wrapperRemoveRule(unsigned index)
</span><span class="cx"> {
</span><del>-    parseDeferredRulesIfNeeded();
</del><span class="cx">     m_childRules.remove(index);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void StyleRuleGroup::parseDeferredRulesIfNeeded() const
-{
-    if (!m_deferredRules)
-        return;
-    
-    m_deferredRules-&gt;parseDeferredRules(m_childRules);
-    m_deferredRules = nullptr;
-}
-    
</del><ins>+
</ins><span class="cx"> StyleRuleMedia::StyleRuleMedia(Ref&lt;MediaQuerySet&gt;&amp;&amp; media, Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; adoptRules)
</span><span class="cx">     : StyleRuleGroup(Media, adoptRules)
</span><span class="cx">     , m_mediaQueries(WTFMove(media))
</span><span class="lines">@@ -393,12 +347,6 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-StyleRuleMedia::StyleRuleMedia(Ref&lt;MediaQuerySet&gt;&amp;&amp; media, std::unique_ptr&lt;DeferredStyleGroupRuleList&gt;&amp;&amp; deferredRules)
-    : StyleRuleGroup(Media, WTFMove(deferredRules))
-    , m_mediaQueries(WTFMove(media))
-{
-}
-
</del><span class="cx"> StyleRuleMedia::StyleRuleMedia(const StyleRuleMedia&amp; o)
</span><span class="cx">     : StyleRuleGroup(o)
</span><span class="cx"> {
</span><span class="lines">@@ -414,13 +362,6 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-StyleRuleSupports::StyleRuleSupports(const String&amp; conditionText, bool conditionIsSupported,  std::unique_ptr&lt;DeferredStyleGroupRuleList&gt;&amp;&amp; deferredRules)
-    : StyleRuleGroup(Supports, WTFMove(deferredRules))
-    , m_conditionText(conditionText)
-    , m_conditionIsSupported(conditionIsSupported)
-{
-}
-
</del><span class="cx"> StyleRuleSupports::StyleRuleSupports(const StyleRuleSupports&amp; o)
</span><span class="cx">     : StyleRuleGroup(o)
</span><span class="cx">     , m_conditionText(o.m_conditionText)
</span><span class="lines">@@ -439,7 +380,7 @@
</span><span class="cx">     , m_selectorList(WTFMove(selectors))
</span><span class="cx"> {
</span><span class="cx"> }
</span><del>-
</del><ins>+    
</ins><span class="cx"> StyleRuleRegion::StyleRuleRegion(const StyleRuleRegion&amp; o)
</span><span class="cx">     : StyleRuleGroup(o)
</span><span class="cx">     , m_selectorList(o.m_selectorList)
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleRuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleRule.h (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleRule.h        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/StyleRule.h        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -35,8 +35,7 @@
</span><span class="cx"> class MutableStyleProperties;
</span><span class="cx"> class StyleKeyframe;
</span><span class="cx"> class StyleProperties;
</span><del>-class StyleRuleKeyframes;
-    
</del><ins>+
</ins><span class="cx"> class StyleRuleBase : public WTF::RefCountedBase {
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><span class="lines">@@ -100,7 +99,7 @@
</span><span class="cx">     ~StyleRuleBase() { }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    WEBCORE_EXPORT void destroy();
</del><ins>+    void destroy();
</ins><span class="cx">     
</span><span class="cx">     RefPtr&lt;CSSRule&gt; createCSSOMWrapper(CSSStyleSheet* parentSheet, CSSRule* parentRule) const;
</span><span class="cx"> 
</span><span class="lines">@@ -110,7 +109,7 @@
</span><span class="cx"> class StyleRule final : public StyleRuleBase {
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    static Ref&lt;StyleRule&gt; create(Ref&lt;StylePropertiesBase&gt;&amp;&amp; properties)
</del><ins>+    static Ref&lt;StyleRule&gt; create(Ref&lt;StyleProperties&gt;&amp;&amp; properties)
</ins><span class="cx">     {
</span><span class="cx">         return adoptRef(*new StyleRule(WTFMove(properties)));
</span><span class="cx">     }
</span><span class="lines">@@ -118,11 +117,9 @@
</span><span class="cx">     ~StyleRule();
</span><span class="cx"> 
</span><span class="cx">     const CSSSelectorList&amp; selectorList() const { return m_selectorList; }
</span><ins>+    const StyleProperties&amp; properties() const { return m_properties; }
+    MutableStyleProperties&amp; mutableProperties();
</ins><span class="cx">     
</span><del>-    const StyleProperties&amp; properties() const;
-    MutableStyleProperties&amp; mutableProperties();
-    const StyleProperties* propertiesWithoutDeferredParsing() const;
-
</del><span class="cx">     void parserAdoptSelectorVector(Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;&gt;&amp; selectors) { m_selectorList.adoptSelectorVector(selectors); }
</span><span class="cx">     void wrapperAdoptSelectorList(CSSSelectorList&amp; selectors) { m_selectorList = WTFMove(selectors); }
</span><span class="cx">     void parserAdoptSelectorArray(CSSSelector* selectors) { m_selectorList.adoptSelectorArray(selectors); }
</span><span class="lines">@@ -134,20 +131,15 @@
</span><span class="cx">     static unsigned averageSizeInBytes();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    StyleRule(Ref&lt;StylePropertiesBase&gt;&amp;&amp;);
</del><ins>+    StyleRule(Ref&lt;StyleProperties&gt;&amp;&amp;);
</ins><span class="cx">     StyleRule(const StyleRule&amp;);
</span><span class="cx"> 
</span><span class="cx">     static Ref&lt;StyleRule&gt; create(const Vector&lt;const CSSSelector*&gt;&amp;, Ref&lt;StyleProperties&gt;&amp;&amp;);
</span><span class="cx"> 
</span><del>-    mutable Ref&lt;StylePropertiesBase&gt; m_properties;
</del><ins>+    Ref&lt;StyleProperties&gt; m_properties;
</ins><span class="cx">     CSSSelectorList m_selectorList;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-inline const StyleProperties* StyleRule::propertiesWithoutDeferredParsing() const
-{
-    return m_properties-&gt;type() != DeferredPropertiesType ? &amp;downcast&lt;StyleProperties&gt;(m_properties.get()) : nullptr;
-}
-
</del><span class="cx"> class StyleRuleFontFace final : public StyleRuleBase {
</span><span class="cx"> public:
</span><span class="cx">     static Ref&lt;StyleRuleFontFace&gt; create(Ref&lt;StyleProperties&gt;&amp;&amp; properties) { return adoptRef(*new StyleRuleFontFace(WTFMove(properties))); }
</span><span class="lines">@@ -189,43 +181,21 @@
</span><span class="cx">     CSSSelectorList m_selectorList;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-class DeferredStyleGroupRuleList final {
</del><ins>+class StyleRuleGroup : public StyleRuleBase {
</ins><span class="cx"> public:
</span><del>-    DeferredStyleGroupRuleList(const CSSParserTokenRange&amp;, CSSDeferredParser&amp;);
</del><ins>+    const Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; childRules() const { return m_childRules; }
</ins><span class="cx">     
</span><del>-    void parseDeferredRules(Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp;);
-    void parseDeferredKeyframes(StyleRuleKeyframes&amp;);
-
-private:
-    CSSParserTokenRange m_range;
-    Ref&lt;CSSDeferredParser&gt; m_parser;
-};
-    
-class StyleRuleGroup : public StyleRuleBase {
-public:
-    const Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; childRules() const;
-    const Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;* childRulesWithoutDeferredParsing() const;
-
</del><span class="cx">     void wrapperInsertRule(unsigned, Ref&lt;StyleRuleBase&gt;&amp;&amp;);
</span><span class="cx">     void wrapperRemoveRule(unsigned);
</span><span class="cx">     
</span><span class="cx"> protected:
</span><del>-    StyleRuleGroup(Type, Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp;);
-    StyleRuleGroup(Type, std::unique_ptr&lt;DeferredStyleGroupRuleList&gt;&amp;&amp;);
</del><ins>+    StyleRuleGroup(Type, Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; adoptRule);
</ins><span class="cx">     StyleRuleGroup(const StyleRuleGroup&amp;);
</span><span class="cx">     
</span><span class="cx"> private:
</span><del>-    void parseDeferredRulesIfNeeded() const;
-
-    mutable Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt; m_childRules;
-    mutable std::unique_ptr&lt;DeferredStyleGroupRuleList&gt; m_deferredRules;
</del><ins>+    Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt; m_childRules;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><del>-inline const Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;* StyleRuleGroup::childRulesWithoutDeferredParsing() const
-{
-    return !m_deferredRules ? &amp;m_childRules : nullptr;
-}
-
</del><span class="cx"> class StyleRuleMedia final : public StyleRuleGroup {
</span><span class="cx"> public:
</span><span class="cx">     static Ref&lt;StyleRuleMedia&gt; create(Ref&lt;MediaQuerySet&gt;&amp;&amp; media, Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; adoptRules)
</span><span class="lines">@@ -233,11 +203,6 @@
</span><span class="cx">         return adoptRef(*new StyleRuleMedia(WTFMove(media), adoptRules));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static Ref&lt;StyleRuleMedia&gt; create(Ref&lt;MediaQuerySet&gt;&amp;&amp; media, std::unique_ptr&lt;DeferredStyleGroupRuleList&gt;&amp;&amp; deferredChildRules)
-    {
-        return adoptRef(*new StyleRuleMedia(WTFMove(media), WTFMove(deferredChildRules)));
-    }
-
</del><span class="cx">     MediaQuerySet* mediaQueries() const { return m_mediaQueries.get(); }
</span><span class="cx"> 
</span><span class="cx">     Ref&lt;StyleRuleMedia&gt; copy() const { return adoptRef(*new StyleRuleMedia(*this)); }
</span><span class="lines">@@ -244,7 +209,6 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     StyleRuleMedia(Ref&lt;MediaQuerySet&gt;&amp;&amp;, Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; adoptRules);
</span><del>-    StyleRuleMedia(Ref&lt;MediaQuerySet&gt;&amp;&amp;, std::unique_ptr&lt;DeferredStyleGroupRuleList&gt;&amp;&amp;);
</del><span class="cx">     StyleRuleMedia(const StyleRuleMedia&amp;);
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;MediaQuerySet&gt; m_mediaQueries;
</span><span class="lines">@@ -256,11 +220,6 @@
</span><span class="cx">     {
</span><span class="cx">         return adoptRef(*new StyleRuleSupports(conditionText, conditionIsSupported, adoptRules));
</span><span class="cx">     }
</span><del>-    
-    static Ref&lt;StyleRuleSupports&gt; create(const String&amp; conditionText, bool conditionIsSupported, std::unique_ptr&lt;DeferredStyleGroupRuleList&gt;&amp;&amp; deferredChildRules)
-    {
-        return adoptRef(*new StyleRuleSupports(conditionText, conditionIsSupported, WTFMove(deferredChildRules)));
-    }
</del><span class="cx"> 
</span><span class="cx">     String conditionText() const { return m_conditionText; }
</span><span class="cx">     bool conditionIsSupported() const { return m_conditionIsSupported; }
</span><span class="lines">@@ -268,8 +227,6 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     StyleRuleSupports(const String&amp; conditionText, bool conditionIsSupported, Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; adoptRules);
</span><del>-    StyleRuleSupports(const String&amp; conditionText, bool conditionIsSupported, std::unique_ptr&lt;DeferredStyleGroupRuleList&gt;&amp;&amp;);
-    
</del><span class="cx">     StyleRuleSupports(const StyleRuleSupports&amp;);
</span><span class="cx"> 
</span><span class="cx">     String m_conditionText;
</span><span class="lines">@@ -295,7 +252,6 @@
</span><span class="cx"> private:
</span><span class="cx">     StyleRuleRegion(Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;&gt;*, Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; adoptRules);
</span><span class="cx">     StyleRuleRegion(CSSSelectorList&amp;, Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp;);
</span><del>-    
</del><span class="cx">     StyleRuleRegion(const StyleRuleRegion&amp;);
</span><span class="cx">     
</span><span class="cx">     CSSSelectorList m_selectorList;
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleSheetContentscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleSheetContents.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleSheetContents.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/StyleSheetContents.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -330,7 +330,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     CSSParser p(parserContext());
</span><del>-    p.parseSheet(this, sheetText, CSSParser::RuleParsing::Deferred);
</del><ins>+    p.parseSheet(this, sheetText);
</ins><span class="cx"> 
</span><span class="cx">     if (m_parserContext.needsSiteSpecificQuirks &amp;&amp; isStrictParserMode(m_parserContext.mode)) {
</span><span class="cx">         // Work around &lt;https://bugs.webkit.org/show_bug.cgi?id=28350&gt;.
</span><span class="lines">@@ -346,7 +346,7 @@
</span><span class="cx"> bool StyleSheetContents::parseString(const String&amp; sheetText)
</span><span class="cx"> {
</span><span class="cx">     CSSParser p(parserContext());
</span><del>-    p.parseSheet(this, sheetText, parserContext().mode != UASheetMode ? CSSParser::RuleParsing::Deferred : CSSParser::RuleParsing::Normal);
</del><ins>+    p.parseSheet(this, sheetText);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -428,22 +428,18 @@
</span><span class="cx"> {
</span><span class="cx">     for (auto&amp; rule : rules) {
</span><span class="cx">         switch (rule-&gt;type()) {
</span><del>-        case StyleRuleBase::Style: {
-            auto* properties = downcast&lt;StyleRule&gt;(*rule).propertiesWithoutDeferredParsing();
-            if (properties &amp;&amp; properties-&gt;traverseSubresources(handler))
</del><ins>+        case StyleRuleBase::Style:
+            if (downcast&lt;StyleRule&gt;(*rule).properties().traverseSubresources(handler))
</ins><span class="cx">                 return true;
</span><span class="cx">             break;
</span><del>-        }
</del><span class="cx">         case StyleRuleBase::FontFace:
</span><span class="cx">             if (downcast&lt;StyleRuleFontFace&gt;(*rule).properties().traverseSubresources(handler))
</span><span class="cx">                 return true;
</span><span class="cx">             break;
</span><del>-        case StyleRuleBase::Media: {
-            auto* childRules = downcast&lt;StyleRuleMedia&gt;(*rule).childRulesWithoutDeferredParsing();
-            if (childRules &amp;&amp; traverseSubresourcesInRules(*childRules, handler))
</del><ins>+        case StyleRuleBase::Media:
+            if (traverseSubresourcesInRules(downcast&lt;StyleRuleMedia&gt;(*rule).childRules(), handler))
</ins><span class="cx">                 return true;
</span><span class="cx">             break;
</span><del>-        }
</del><span class="cx">         case StyleRuleBase::Region:
</span><span class="cx">             if (traverseSubresourcesInRules(downcast&lt;StyleRuleRegion&gt;(*rule).childRules(), handler))
</span><span class="cx">                 return true;
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleSheetContentsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleSheetContents.h (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleSheetContents.h        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/StyleSheetContents.h        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx"> #include &lt;wtf/ListHashSet.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><del>-#include &lt;wtf/WeakPtr.h&gt;
</del><span class="cx"> #include &lt;wtf/text/AtomicStringHash.h&gt;
</span><span class="cx"> #include &lt;wtf/text/TextPosition.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -143,8 +142,6 @@
</span><span class="cx"> 
</span><span class="cx">     void shrinkToFit();
</span><span class="cx"> 
</span><del>-    WeakPtr&lt;StyleSheetContents&gt; createWeakPtr() { return m_weakPtrFactory.createWeakPtr(); }
-
</del><span class="cx"> private:
</span><span class="cx">     WEBCORE_EXPORT StyleSheetContents(StyleRuleImport* ownerRule, const String&amp; originalURL, const CSSParserContext&amp;);
</span><span class="cx">     StyleSheetContents(const StyleSheetContents&amp;);
</span><span class="lines">@@ -174,8 +171,6 @@
</span><span class="cx">     CSSParserContext m_parserContext;
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;CSSStyleSheet*&gt; m_clients;
</span><del>-    
-    WeakPtrFactory&lt;StyleSheetContents&gt; m_weakPtrFactory { this };
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorecssWebKitCSSMatrixcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/WebKitCSSMatrix.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/WebKitCSSMatrix.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/WebKitCSSMatrix.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx">         return { };
</span><span class="cx"> 
</span><span class="cx">     auto styleDeclaration = MutableStyleProperties::create();
</span><del>-    if (CSSParser::parseValue(styleDeclaration, CSSPropertyTransform, string, true, HTMLStandardMode) == CSSParser::ParseResult::Error)
</del><ins>+    if (CSSParser::parseValue(styleDeclaration, CSSPropertyTransform, string, true, HTMLStandardMode, nullptr) == CSSParser::ParseResult::Error)
</ins><span class="cx">         return Exception { SYNTAX_ERR };
</span><span class="cx"> 
</span><span class="cx">     // Convert to TransformOperations. This can fail if a property requires style (i.e., param uses 'ems' or 'exs')
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSDeferredParsercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/css/parser/CSSDeferredParser.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSDeferredParser.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/parser/CSSDeferredParser.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -1,57 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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;CSSDeferredParser.h&quot;
-
-#include &quot;CSSParserImpl.h&quot;
-#include &quot;StyleSheetContents.h&quot;
-#include &lt;wtf/text/WTFString.h&gt;
-
-namespace WebCore {
-
-CSSDeferredParser::CSSDeferredParser(const String&amp; sheetText, const CSSParserContext&amp; context, StyleSheetContents&amp; styleSheet)
-    : m_tokenizer(sheetText)
-    , m_context(context)
-    , m_styleSheet(styleSheet.createWeakPtr())
-{
-}
-
-Ref&lt;ImmutableStyleProperties&gt; CSSDeferredParser::parseDeclaration(const CSSParserTokenRange&amp; range)
-{
-    return CSSParserImpl::parseDeferredDeclaration(range, m_context, m_styleSheet.get());
-}
-
-void CSSDeferredParser::parseRuleList(const CSSParserTokenRange&amp; range, Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; childRules)
-{
-    CSSParserImpl::parseDeferredRuleList(range, *this, childRules);
-}
-
-void CSSDeferredParser::parseKeyframeList(const CSSParserTokenRange&amp; range, StyleRuleKeyframes&amp;keyframesRule)
-{
-    CSSParserImpl::parseDeferredKeyframeList(range, *this, keyframesRule);
-}
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSDeferredParserh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/css/parser/CSSDeferredParser.h (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSDeferredParser.h        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/parser/CSSDeferredParser.h        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -1,65 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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.
- */
-
-#pragma once
-
-#include &quot;CSSParserMode.h&quot;
-#include &quot;CSSTokenizer.h&quot;
-#include &lt;wtf/RefCounted.h&gt;
-#include &lt;wtf/WeakPtr.h&gt;
-
-namespace WebCore {
-
-class ImmutableStyleProperties;
-class StyleRuleKeyframes;
-class StyleRuleBase;
-
-class CSSDeferredParser : public RefCounted&lt;CSSDeferredParser&gt; {
-public:
-    static Ref&lt;CSSDeferredParser&gt; create(const String&amp; sheetText, const CSSParserContext&amp; parserContext, StyleSheetContents&amp; styleSheet)
-    {
-        return adoptRef(*new CSSDeferredParser(sheetText, parserContext, styleSheet));
-    }
-
-    const CSSTokenizer&amp; tokenizer() const { return m_tokenizer; }
-    CSSParserMode mode() const { return m_context.mode; }
-
-    const CSSParserContext&amp; context() const { return m_context; }
-    StyleSheetContents* styleSheet() const { return m_styleSheet.get(); }
-
-    Ref&lt;ImmutableStyleProperties&gt; parseDeclaration(const CSSParserTokenRange&amp;);
-    void parseRuleList(const CSSParserTokenRange&amp;, Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp;);
-    void parseKeyframeList(const CSSParserTokenRange&amp;, StyleRuleKeyframes&amp;);
-
-private:
-    CSSDeferredParser(const String&amp;, const CSSParserContext&amp;, StyleSheetContents&amp;);
-    
-    CSSTokenizer m_tokenizer;
-    CSSParserContext m_context;
-    
-    WeakPtr&lt;StyleSheetContents&gt; m_styleSheet;
-};
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParser.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParser.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/parser/CSSParser.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -133,9 +133,9 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSParser::parseSheet(StyleSheetContents* sheet, const String&amp; string, RuleParsing ruleParsing)
</del><ins>+void CSSParser::parseSheet(StyleSheetContents* sheet, const String&amp; string)
</ins><span class="cx"> {
</span><del>-    return CSSParserImpl::parseStyleSheet(string, m_context, sheet, ruleParsing);
</del><ins>+    return CSSParserImpl::parseStyleSheet(string, m_context, sheet);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CSSParser::parseSheetForInspector(const CSSParserContext&amp; context, StyleSheetContents* sheet, const String&amp; string, CSSParserObserver&amp; observer)
</span><span class="lines">@@ -156,8 +156,10 @@
</span><span class="cx"> 
</span><span class="cx"> bool CSSParser::parseSupportsCondition(const String&amp; condition)
</span><span class="cx"> {
</span><del>-    CSSParserImpl parser(m_context, condition);
-    return CSSSupportsParser::supportsCondition(parser.tokenizer().tokenRange(), parser) == CSSSupportsParser::Supported;
</del><ins>+    CSSTokenizer tokenizer(condition);
+    CSSParserTokenRange range = tokenizer.tokenRange();
+    CSSParserImpl parser(m_context);
+    return CSSSupportsParser::supportsCondition(range, parser) == CSSSupportsParser::Supported;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Color CSSParser::parseColor(const String&amp; string, bool strict)
</span><span class="lines">@@ -200,16 +202,16 @@
</span><span class="cx"> {
</span><span class="cx">     if (string.isEmpty())
</span><span class="cx">         return nullptr;
</span><del>-    if (RefPtr&lt;CSSValue&gt; value = CSSParserFastPaths::maybeParseValue(propertyID, string, context.mode))
</del><ins>+    if (RefPtr&lt;CSSValue&gt; value = CSSParserFastPaths::maybeParseValue(propertyID, string, context.mode, nullptr))
</ins><span class="cx">         return value;
</span><span class="cx">     CSSTokenizer tokenizer(string);
</span><span class="cx">     return CSSPropertyParser::parseSingleValue(propertyID, tokenizer.tokenRange(), context, nullptr);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSParser::ParseResult CSSParser::parseValue(MutableStyleProperties&amp; declaration, CSSPropertyID propertyID, const String&amp; string, bool important, const CSSParserContext&amp; context)
</del><ins>+CSSParser::ParseResult CSSParser::parseValue(MutableStyleProperties&amp; declaration, CSSPropertyID propertyID, const String&amp; string, bool important, const CSSParserContext&amp; context, StyleSheetContents* contextStyleSheet)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!string.isEmpty());
</span><del>-    RefPtr&lt;CSSValue&gt; value = CSSParserFastPaths::maybeParseValue(propertyID, string, context.mode);
</del><ins>+    RefPtr&lt;CSSValue&gt; value = CSSParserFastPaths::maybeParseValue(propertyID, string, context.mode, contextStyleSheet);
</ins><span class="cx">     if (value)
</span><span class="cx">         return declaration.addParsedProperty(CSSProperty(propertyID, WTFMove(value), important)) ? CSSParser::ParseResult::Changed : CSSParser::ParseResult::Unchanged;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParser.h (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParser.h        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/parser/CSSParser.h        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -47,11 +47,10 @@
</span><span class="cx">         Error
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT explicit CSSParser(const CSSParserContext&amp;);
</del><ins>+    WEBCORE_EXPORT CSSParser(const CSSParserContext&amp;);
</ins><span class="cx">     WEBCORE_EXPORT ~CSSParser();
</span><span class="cx"> 
</span><del>-    enum class RuleParsing { Normal, Deferred };
-    void parseSheet(StyleSheetContents*, const String&amp;, RuleParsing = RuleParsing::Normal);
</del><ins>+    void parseSheet(StyleSheetContents*, const String&amp;);
</ins><span class="cx">     
</span><span class="cx">     static RefPtr&lt;StyleRuleBase&gt; parseRule(const CSSParserContext&amp;, StyleSheetContents*, const String&amp;);
</span><span class="cx">     
</span><span class="lines">@@ -63,7 +62,7 @@
</span><span class="cx">     static void parseSheetForInspector(const CSSParserContext&amp;, StyleSheetContents*, const String&amp;, CSSParserObserver&amp;);
</span><span class="cx">     static void parseDeclarationForInspector(const CSSParserContext&amp;, const String&amp;, CSSParserObserver&amp;);
</span><span class="cx"> 
</span><del>-    static ParseResult parseValue(MutableStyleProperties&amp;, CSSPropertyID, const String&amp;, bool important, const CSSParserContext&amp;);
</del><ins>+    static ParseResult parseValue(MutableStyleProperties&amp;, CSSPropertyID, const String&amp;, bool important, const CSSParserContext&amp;, StyleSheetContents*);
</ins><span class="cx">     static ParseResult parseCustomPropertyValue(MutableStyleProperties&amp;, const AtomicString&amp; propertyName, const String&amp;, bool important, const CSSParserContext&amp;);
</span><span class="cx">     
</span><span class="cx">     static RefPtr&lt;CSSValue&gt; parseFontFaceDescriptor(CSSPropertyID, const String&amp;, const CSSParserContext&amp;);
</span><span class="lines">@@ -72,7 +71,7 @@
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT bool parseDeclaration(MutableStyleProperties&amp;, const String&amp;);
</span><span class="cx">     static Ref&lt;ImmutableStyleProperties&gt; parseInlineStyleDeclaration(const String&amp;, Element*);
</span><del>-
</del><ins>+    
</ins><span class="cx">     void parseSelector(const String&amp;, CSSSelectorList&amp;);
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;CSSValue&gt; parseValueWithVariableReferences(CSSPropertyID, const CSSValue&amp;, const CustomPropertyValueMap&amp; customProperties, TextDirection, WritingMode);
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserFastPathscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -496,7 +496,7 @@
</span><span class="cx">     return CSSValuePool::singleton().createColorValue(color);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyID propertyId, CSSValueID valueID, CSSParserMode parserMode)
</del><ins>+bool CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyID propertyId, CSSValueID valueID, CSSParserMode parserMode, StyleSheetContents* styleSheetContents)
</ins><span class="cx"> {
</span><span class="cx">     if (valueID == CSSValueInvalid || !isValueAllowedInMode(valueID, parserMode))
</span><span class="cx">         return false;
</span><span class="lines">@@ -751,9 +751,21 @@
</span><span class="cx">     case CSSPropertyWebkitUserDrag: // auto | none | element
</span><span class="cx">         return valueID == CSSValueAuto || valueID == CSSValueNone || valueID == CSSValueElement;
</span><span class="cx">     case CSSPropertyWebkitUserModify: // read-only | read-write
</span><del>-        return valueID == CSSValueReadOnly || valueID == CSSValueReadWrite || valueID == CSSValueReadWritePlaintextOnly;
</del><ins>+        if (valueID == CSSValueReadOnly || valueID == CSSValueReadWrite || valueID == CSSValueReadWritePlaintextOnly) {
+            if (styleSheetContents)
+                styleSheetContents-&gt;parserSetUsesStyleBasedEditability();
+            return true;
+        }
+        return false;
</ins><span class="cx">     case CSSPropertyWebkitUserSelect: // auto | none | text | all
</span><del>-        return valueID == CSSValueAuto || valueID == CSSValueNone || valueID == CSSValueText || valueID == CSSValueAll;
</del><ins>+        if (valueID == CSSValueAuto || valueID == CSSValueNone || valueID == CSSValueText)
+            return true;
+        if (valueID == CSSValueAll) {
+            if (styleSheetContents)
+                styleSheetContents-&gt;parserSetUsesStyleBasedEditability();
+            return true;
+        }
+        return false;
</ins><span class="cx">     case CSSPropertyWritingMode:
</span><span class="cx">         // Note that horizontal-bt is not supported by the unprefixed version of
</span><span class="cx">         // the property, only by the -webkit- version.
</span><span class="lines">@@ -1014,7 +1026,7 @@
</span><span class="cx">     || equalLettersIgnoringASCIICase(string, &quot;revert&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static RefPtr&lt;CSSValue&gt; parseKeywordValue(CSSPropertyID propertyId, const String&amp; string, CSSParserMode parserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; parseKeywordValue(CSSPropertyID propertyId, const String&amp; string, CSSParserMode parserMode, StyleSheetContents* styleSheetContents)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!string.isEmpty());
</span><span class="cx"> 
</span><span class="lines">@@ -1046,7 +1058,7 @@
</span><span class="cx">     if (valueID == CSSValueRevert)
</span><span class="cx">         return CSSValuePool::singleton().createRevertValue();
</span><span class="cx">     
</span><del>-    if (CSSParserFastPaths::isValidKeywordPropertyAndValue(propertyId, valueID, parserMode))
</del><ins>+    if (CSSParserFastPaths::isValidKeywordPropertyAndValue(propertyId, valueID, parserMode, styleSheetContents))
</ins><span class="cx">         return CSSPrimitiveValue::createIdentifier(valueID);
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="lines">@@ -1260,7 +1272,7 @@
</span><span class="cx">     return parseSimpleTransformList(string.characters16(), string.length());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;CSSValue&gt; CSSParserFastPaths::maybeParseValue(CSSPropertyID propertyID, const String&amp; string, CSSParserMode parserMode)
</del><ins>+RefPtr&lt;CSSValue&gt; CSSParserFastPaths::maybeParseValue(CSSPropertyID propertyID, const String&amp; string, CSSParserMode parserMode, StyleSheetContents* styleSheetContents)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr&lt;CSSValue&gt; result = parseSimpleLengthValue(propertyID, string, parserMode);
</span><span class="cx">     if (result)
</span><span class="lines">@@ -1267,7 +1279,7 @@
</span><span class="cx">         return result;
</span><span class="cx">     if (isColorPropertyID(propertyID))
</span><span class="cx">         return parseColor(string, parserMode);
</span><del>-    result = parseKeywordValue(propertyID, string, parserMode);
</del><ins>+    result = parseKeywordValue(propertyID, string, parserMode, styleSheetContents);
</ins><span class="cx">     if (result)
</span><span class="cx">         return result;
</span><span class="cx">     result = parseSimpleTransform(propertyID, string);
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserFastPathsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserFastPaths.h (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserFastPaths.h        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/parser/CSSParserFastPaths.h        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -43,11 +43,11 @@
</span><span class="cx"> public:
</span><span class="cx">     // Parses simple values like '10px' or 'green', but makes no guarantees
</span><span class="cx">     // about handling any property completely.
</span><del>-    static RefPtr&lt;CSSValue&gt; maybeParseValue(CSSPropertyID, const String&amp;, CSSParserMode);
</del><ins>+    static RefPtr&lt;CSSValue&gt; maybeParseValue(CSSPropertyID, const String&amp;, CSSParserMode, StyleSheetContents*);
</ins><span class="cx"> 
</span><span class="cx">     // Properties handled here shouldn't be explicitly handled in CSSPropertyParser
</span><span class="cx">     static bool isKeywordPropertyID(CSSPropertyID);
</span><del>-    static bool isValidKeywordPropertyAndValue(CSSPropertyID, CSSValueID, CSSParserMode);
</del><ins>+    static bool isValidKeywordPropertyAndValue(CSSPropertyID, CSSValueID, CSSParserMode, StyleSheetContents*);
</ins><span class="cx"> 
</span><span class="cx">     static RefPtr&lt;CSSValue&gt; parseColor(const String&amp;, CSSParserMode);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserImpl.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserImpl.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/parser/CSSParserImpl.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CSSAtRuleID.h&quot;
</span><span class="cx"> #include &quot;CSSCustomPropertyValue.h&quot;
</span><del>-#include &quot;CSSDeferredParser.h&quot;
</del><span class="cx"> #include &quot;CSSKeyframeRule.h&quot;
</span><span class="cx"> #include &quot;CSSKeyframesRule.h&quot;
</span><span class="cx"> #include &quot;CSSParserObserver.h&quot;
</span><span class="lines">@@ -59,42 +58,20 @@
</span><span class="cx"> CSSParserImpl::CSSParserImpl(const CSSParserContext&amp; context, StyleSheetContents* styleSheet)
</span><span class="cx">     : m_context(context)
</span><span class="cx">     , m_styleSheet(styleSheet)
</span><ins>+    , m_observerWrapper(nullptr)
</ins><span class="cx"> {
</span><del>-    
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSParserImpl::CSSParserImpl(CSSDeferredParser&amp; deferredParser)
-    : m_context(deferredParser.context())
-    , m_styleSheet(deferredParser.styleSheet())
-    , m_deferredParser(&amp;deferredParser)
-{
-}
-
-CSSParserImpl::CSSParserImpl(const CSSParserContext&amp; context, const String&amp; string, StyleSheetContents* styleSheet, CSSParserObserverWrapper* wrapper, CSSParser::RuleParsing ruleParsing)
-    : m_context(context)
-    , m_styleSheet(styleSheet)
-    , m_observerWrapper(wrapper)
-{
-    if (!wrapper &amp;&amp; styleSheet &amp;&amp; ruleParsing == CSSParser::RuleParsing::Deferred)
-        m_deferredParser = CSSDeferredParser::create(string, context, *styleSheet);
-    else
-        m_tokenizer = wrapper ? std::make_unique&lt;CSSTokenizer&gt;(string, *wrapper) : std::make_unique&lt;CSSTokenizer&gt;(string);
-}
-
-const CSSTokenizer&amp; CSSParserImpl::tokenizer() const
-{
-    return m_deferredParser ? m_deferredParser-&gt;tokenizer() : *m_tokenizer;
-}
-
</del><span class="cx"> CSSParser::ParseResult CSSParserImpl::parseValue(MutableStyleProperties* declaration, CSSPropertyID propertyID, const String&amp; string, bool important, const CSSParserContext&amp; context)
</span><span class="cx"> {
</span><del>-    CSSParserImpl parser(context, string);
</del><ins>+    CSSParserImpl parser(context);
</ins><span class="cx">     StyleRule::Type ruleType = StyleRule::Style;
</span><span class="cx"> #if ENABLE(CSS_DEVICE_ADAPTATION)
</span><span class="cx">     if (declaration-&gt;cssParserMode() == CSSViewportRuleMode)
</span><span class="cx">         ruleType = StyleRule::Viewport;
</span><span class="cx"> #endif
</span><del>-    parser.consumeDeclarationValue(parser.tokenizer().tokenRange(), propertyID, important, ruleType);
</del><ins>+    CSSTokenizer tokenizer(string);
+    parser.consumeDeclarationValue(tokenizer.tokenRange(), propertyID, important, ruleType);
</ins><span class="cx">     if (parser.m_parsedProperties.isEmpty())
</span><span class="cx">         return CSSParser::ParseResult::Error;
</span><span class="cx">     return declaration-&gt;addParsedProperties(parser.m_parsedProperties) ? CSSParser::ParseResult::Changed : CSSParser::ParseResult::Unchanged;
</span><span class="lines">@@ -102,8 +79,9 @@
</span><span class="cx"> 
</span><span class="cx"> CSSParser::ParseResult CSSParserImpl::parseCustomPropertyValue(MutableStyleProperties* declaration, const AtomicString&amp; propertyName, const String&amp; string, bool important, const CSSParserContext&amp; context)
</span><span class="cx"> {
</span><del>-    CSSParserImpl parser(context, string);
-    parser.consumeCustomPropertyValue(parser.tokenizer().tokenRange(), propertyName, important);
</del><ins>+    CSSParserImpl parser(context);
+    CSSTokenizer tokenizer(string);
+    parser.consumeCustomPropertyValue(tokenizer.tokenRange(), propertyName, important);
</ins><span class="cx">     if (parser.m_parsedProperties.isEmpty())
</span><span class="cx">         return CSSParser::ParseResult::Error;
</span><span class="cx">     return declaration-&gt;addParsedProperties(parser.m_parsedProperties) ? CSSParser::ParseResult::Changed : CSSParser::ParseResult::Unchanged;
</span><span class="lines">@@ -139,12 +117,6 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;DeferredStyleProperties&gt; CSSParserImpl::createDeferredStyleProperties(const CSSParserTokenRange&amp; propertyRange)
-{
-    ASSERT(m_deferredParser);
-    return DeferredStyleProperties::create(propertyRange, *m_deferredParser);
-}
-
</del><span class="cx"> static Ref&lt;ImmutableStyleProperties&gt; createStyleProperties(ParsedPropertyVector&amp; parsedProperties, CSSParserMode mode)
</span><span class="cx"> {
</span><span class="cx">     std::bitset&lt;numCSSProperties&gt; seenProperties;
</span><span class="lines">@@ -165,51 +137,22 @@
</span><span class="cx">     CSSParserContext context(element-&gt;document());
</span><span class="cx">     context.mode = strictToCSSParserMode(element-&gt;isHTMLElement() &amp;&amp; !element-&gt;document().inQuirksMode());
</span><span class="cx"> 
</span><del>-    CSSParserImpl parser(context, string);
-    parser.consumeDeclarationList(parser.tokenizer().tokenRange(), StyleRule::Style);
</del><ins>+    CSSParserImpl parser(context);
+    CSSTokenizer tokenizer(string);
+    parser.consumeDeclarationList(tokenizer.tokenRange(), StyleRule::Style);
</ins><span class="cx">     return createStyleProperties(parser.m_parsedProperties, context.mode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;ImmutableStyleProperties&gt; CSSParserImpl::parseDeferredDeclaration(CSSParserTokenRange tokenRange, const CSSParserContext&amp; context, StyleSheetContents* styleSheet)
-{
-    if (!styleSheet) {
-        ParsedPropertyVector properties;
-        return createStyleProperties(properties, context.mode);
-    }
-    CSSParserImpl parser(context, styleSheet);
-    parser.consumeDeclarationList(tokenRange, StyleRule::Style);
-    return createStyleProperties(parser.m_parsedProperties, context.mode);
-}
-    
-void CSSParserImpl::parseDeferredRuleList(CSSParserTokenRange tokenRange, CSSDeferredParser&amp; deferredParser, Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; childRules)
-{
-    if (!deferredParser.styleSheet())
-        return;
-    CSSParserImpl parser(deferredParser);
-    parser.consumeRuleList(tokenRange, RegularRuleList, [&amp;childRules](const RefPtr&lt;StyleRuleBase&gt;&amp; rule) {
-        childRules.append(rule);
-    });
-}
-
-void CSSParserImpl::parseDeferredKeyframeList(CSSParserTokenRange tokenRange, CSSDeferredParser&amp; deferredParser, StyleRuleKeyframes&amp; keyframeRule)
-{
-    if (!deferredParser.styleSheet())
-        return;
-    CSSParserImpl parser(deferredParser);
-    parser.consumeRuleList(tokenRange, KeyframesRuleList, [&amp;keyframeRule](const RefPtr&lt;StyleRuleBase&gt;&amp; keyframe) {
-        keyframeRule.parserAppendKeyframe(downcast&lt;const StyleKeyframe&gt;(keyframe.get()));
-    });
-}
-
</del><span class="cx"> bool CSSParserImpl::parseDeclarationList(MutableStyleProperties* declaration, const String&amp; string, const CSSParserContext&amp; context)
</span><span class="cx"> {
</span><del>-    CSSParserImpl parser(context, string);
</del><ins>+    CSSParserImpl parser(context);
</ins><span class="cx">     StyleRule::Type ruleType = StyleRule::Style;
</span><span class="cx"> #if ENABLE(CSS_DEVICE_ADAPTATION)
</span><span class="cx">     if (declaration-&gt;cssParserMode() == CSSViewportRuleMode)
</span><span class="cx">         ruleType = StyleRule::Viewport;
</span><span class="cx"> #endif
</span><del>-    parser.consumeDeclarationList(parser.tokenizer().tokenRange(), ruleType);
</del><ins>+    CSSTokenizer tokenizer(string);
+    parser.consumeDeclarationList(tokenizer.tokenRange(), ruleType);
</ins><span class="cx">     if (parser.m_parsedProperties.isEmpty())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -226,8 +169,9 @@
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;StyleRuleBase&gt; CSSParserImpl::parseRule(const String&amp; string, const CSSParserContext&amp; context, StyleSheetContents* styleSheet, AllowedRulesType allowedRules)
</span><span class="cx"> {
</span><del>-    CSSParserImpl parser(context, string, styleSheet);
-    CSSParserTokenRange range = parser.tokenizer().tokenRange();
</del><ins>+    CSSParserImpl parser(context, styleSheet);
+    CSSTokenizer tokenizer(string);
+    CSSParserTokenRange range = tokenizer.tokenRange();
</ins><span class="cx">     range.consumeWhitespace();
</span><span class="cx">     if (range.atEnd())
</span><span class="cx">         return nullptr; // Parse error, empty rule
</span><span class="lines">@@ -244,10 +188,11 @@
</span><span class="cx">     return rule;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSParserImpl::parseStyleSheet(const String&amp; string, const CSSParserContext&amp; context, StyleSheetContents* styleSheet, CSSParser::RuleParsing ruleParsing)
</del><ins>+void CSSParserImpl::parseStyleSheet(const String&amp; string, const CSSParserContext&amp; context, StyleSheetContents* styleSheet)
</ins><span class="cx"> {
</span><del>-    CSSParserImpl parser(context, string, styleSheet, nullptr, ruleParsing);
-    bool firstRuleValid = parser.consumeRuleList(parser.tokenizer().tokenRange(), TopLevelRuleList, [&amp;styleSheet](RefPtr&lt;StyleRuleBase&gt; rule) {
</del><ins>+    CSSTokenizer tokenizer(string);
+    CSSParserImpl parser(context, styleSheet);
+    bool firstRuleValid = parser.consumeRuleList(tokenizer.tokenRange(), TopLevelRuleList, [&amp;styleSheet](RefPtr&lt;StyleRuleBase&gt; rule) {
</ins><span class="cx">         if (rule-&gt;isCharsetRule())
</span><span class="cx">             return;
</span><span class="cx">         styleSheet-&gt;parserAppendRule(rule.releaseNonNull());
</span><span class="lines">@@ -313,18 +258,22 @@
</span><span class="cx"> 
</span><span class="cx"> void CSSParserImpl::parseDeclarationListForInspector(const String&amp; declaration, const CSSParserContext&amp; context, CSSParserObserver&amp; observer)
</span><span class="cx"> {
</span><ins>+    CSSParserImpl parser(context);
</ins><span class="cx">     CSSParserObserverWrapper wrapper(observer);
</span><del>-    CSSParserImpl parser(context, declaration, nullptr, &amp;wrapper);
</del><ins>+    parser.m_observerWrapper = &amp;wrapper;
+    CSSTokenizer tokenizer(declaration, wrapper);
</ins><span class="cx">     observer.startRuleHeader(StyleRule::Style, 0);
</span><span class="cx">     observer.endRuleHeader(1);
</span><del>-    parser.consumeDeclarationList(parser.tokenizer().tokenRange(), StyleRule::Style);
</del><ins>+    parser.consumeDeclarationList(tokenizer.tokenRange(), StyleRule::Style);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CSSParserImpl::parseStyleSheetForInspector(const String&amp; string, const CSSParserContext&amp; context, StyleSheetContents* styleSheet, CSSParserObserver&amp; observer)
</span><span class="cx"> {
</span><ins>+    CSSParserImpl parser(context, styleSheet);
</ins><span class="cx">     CSSParserObserverWrapper wrapper(observer);
</span><del>-    CSSParserImpl parser(context, string, styleSheet, &amp;wrapper);
-    bool firstRuleValid = parser.consumeRuleList(parser.tokenizer().tokenRange(), TopLevelRuleList, [&amp;styleSheet](RefPtr&lt;StyleRuleBase&gt; rule) {
</del><ins>+    parser.m_observerWrapper = &amp;wrapper;
+    CSSTokenizer tokenizer(string, wrapper);
+    bool firstRuleValid = parser.consumeRuleList(tokenizer.tokenRange(), TopLevelRuleList, [&amp;styleSheet](RefPtr&lt;StyleRuleBase&gt; rule) {
</ins><span class="cx">         if (rule-&gt;isCharsetRule())
</span><span class="cx">             return;
</span><span class="cx">         styleSheet-&gt;parserAppendRule(rule.releaseNonNull());
</span><span class="lines">@@ -468,7 +417,7 @@
</span><span class="cx">         return nullptr; // Parse error, EOF instead of qualified rule block
</span><span class="cx"> 
</span><span class="cx">     CSSParserTokenRange prelude = range.makeSubRange(preludeStart, &amp;range.peek());
</span><del>-    CSSParserTokenRange block = range.consumeBlockCheckingForEditability(m_styleSheet.get());
</del><ins>+    CSSParserTokenRange block = range.consumeBlock();
</ins><span class="cx"> 
</span><span class="cx">     if (allowedRules &lt;= RegularRules)
</span><span class="cx">         return consumeStyleRule(prelude, block);
</span><span class="lines">@@ -519,7 +468,7 @@
</span><span class="cx">         m_observerWrapper-&gt;observer().endRuleBody(endOffset);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return StyleRuleImport::create(uri, MediaQueryParser::parseMediaQuerySet(prelude));
</del><ins>+    return StyleRuleImport::create(uri, MediaQueryParser::parseMediaQuerySet(prelude).releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;StyleRuleNamespace&gt; CSSParserImpl::consumeNamespaceRule(CSSParserTokenRange prelude)
</span><span class="lines">@@ -537,9 +486,6 @@
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;StyleRuleMedia&gt; CSSParserImpl::consumeMediaRule(CSSParserTokenRange prelude, CSSParserTokenRange block)
</span><span class="cx"> {
</span><del>-    if (m_deferredParser)
-        return StyleRuleMedia::create(MediaQueryParser::parseMediaQuerySet(prelude), std::make_unique&lt;DeferredStyleGroupRuleList&gt;(block, *m_deferredParser));
-
</del><span class="cx">     Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt; rules;
</span><span class="cx"> 
</span><span class="cx">     if (m_observerWrapper) {
</span><span class="lines">@@ -555,7 +501,7 @@
</span><span class="cx">     if (m_observerWrapper)
</span><span class="cx">         m_observerWrapper-&gt;observer().endRuleBody(m_observerWrapper-&gt;endOffset(block));
</span><span class="cx"> 
</span><del>-    return StyleRuleMedia::create(MediaQueryParser::parseMediaQuerySet(prelude), rules);
</del><ins>+    return StyleRuleMedia::create(MediaQueryParser::parseMediaQuerySet(prelude).releaseNonNull(), rules);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;StyleRuleSupports&gt; CSSParserImpl::consumeSupportsRule(CSSParserTokenRange prelude, CSSParserTokenRange block)
</span><span class="lines">@@ -564,9 +510,6 @@
</span><span class="cx">     if (supported == CSSSupportsParser::Invalid)
</span><span class="cx">         return nullptr; // Parse error, invalid @supports condition
</span><span class="cx"> 
</span><del>-    if (m_deferredParser)
-        return StyleRuleSupports::create(prelude.serialize().stripWhiteSpace(), supported, std::make_unique&lt;DeferredStyleGroupRuleList&gt;(block, *m_deferredParser));
-
</del><span class="cx">     if (m_observerWrapper) {
</span><span class="cx">         m_observerWrapper-&gt;observer().startRuleHeader(StyleRule::Supports, m_observerWrapper-&gt;startOffset(prelude));
</span><span class="cx">         m_observerWrapper-&gt;observer().endRuleHeader(m_observerWrapper-&gt;endOffset(prelude));
</span><span class="lines">@@ -635,9 +578,6 @@
</span><span class="cx">     else
</span><span class="cx">         return nullptr; // Parse error; expected ident token in @keyframes header
</span><span class="cx"> 
</span><del>-    if (m_deferredParser)
-        return StyleRuleKeyframes::create(name, std::make_unique&lt;DeferredStyleGroupRuleList&gt;(block, *m_deferredParser));
-
</del><span class="cx">     if (m_observerWrapper) {
</span><span class="cx">         m_observerWrapper-&gt;observer().startRuleHeader(StyleRule::Keyframes, m_observerWrapper-&gt;startOffset(rangeCopy));
</span><span class="cx">         m_observerWrapper-&gt;observer().endRuleHeader(m_observerWrapper-&gt;endOffset(prelude));
</span><span class="lines">@@ -645,11 +585,12 @@
</span><span class="cx">         m_observerWrapper-&gt;observer().endRuleBody(m_observerWrapper-&gt;endOffset(block));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RefPtr&lt;StyleRuleKeyframes&gt; keyframeRule = StyleRuleKeyframes::create(name);
-    consumeRuleList(block, KeyframesRuleList, [keyframeRule](const RefPtr&lt;StyleRuleBase&gt;&amp; keyframe) {
-        keyframeRule-&gt;parserAppendKeyframe(downcast&lt;const StyleKeyframe&gt;(keyframe.get()));
</del><ins>+    RefPtr&lt;StyleRuleKeyframes&gt; keyframeRule = StyleRuleKeyframes::create();
+    consumeRuleList(block, KeyframesRuleList, [keyframeRule](RefPtr&lt;StyleRuleBase&gt; keyframe) {
+        RefPtr&lt;StyleKeyframe&gt; key = static_cast&lt;StyleKeyframe*&gt;(keyframe.get());
+        keyframeRule-&gt;parserAppendKeyframe(key.releaseNonNull());
</ins><span class="cx">     });
</span><del>-
</del><ins>+    keyframeRule-&gt;setName(name);
</ins><span class="cx">     // FIXME-NEWPARSER: Find out why this is done. Behavior difference when prefixed?
</span><span class="cx">     // keyframeRule-&gt;setVendorPrefixed(webkitPrefixed);
</span><span class="cx">     return keyframeRule;
</span><span class="lines">@@ -753,26 +694,12 @@
</span><span class="cx">     if (!selectorList.isValid())
</span><span class="cx">         return nullptr; // Parse error, invalid selector list
</span><span class="cx"> 
</span><del>-    RefPtr&lt;StyleRule&gt; rule;
</del><span class="cx">     if (m_observerWrapper)
</span><span class="cx">         observeSelectors(*m_observerWrapper, prelude);
</span><del>-    
-    if (m_deferredParser) {
-        // If a rule is empty (i.e., only whitespace), don't bother using
-        // deferred parsing. This allows the empty rule optimization in ElementRuleCollector
-        // to continue to work. Note we don't have to consider CommentTokens, since those
-        // are stripped out.
-        CSSParserTokenRange blockCopy = block;
-        blockCopy.consumeWhitespace();
-        if (!blockCopy.atEnd()) {
-            rule = StyleRule::create(createDeferredStyleProperties(block));
-            rule-&gt;wrapperAdoptSelectorList(selectorList);
-            return rule;
-        }
-    }
</del><span class="cx"> 
</span><span class="cx">     consumeDeclarationList(block, StyleRule::Style);
</span><del>-    rule = StyleRule::create(createStyleProperties(m_parsedProperties, m_context.mode));
</del><ins>+
+    RefPtr&lt;StyleRule&gt; rule = StyleRule::create(createStyleProperties(m_parsedProperties, m_context.mode));
</ins><span class="cx">     rule-&gt;wrapperAdoptSelectorList(selectorList);
</span><span class="cx">     return rule;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserImpl.h (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserImpl.h        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/parser/CSSParserImpl.h        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><del>-#include &quot;CSSDeferredParser.h&quot;
</del><span class="cx"> #include &quot;CSSParser.h&quot;
</span><span class="cx"> #include &quot;CSSParserMode.h&quot;
</span><span class="cx"> #include &quot;CSSParserTokenRange.h&quot;
</span><span class="lines">@@ -47,7 +46,6 @@
</span><span class="cx"> class CSSParserObserver;
</span><span class="cx"> class CSSParserObserverWrapper;
</span><span class="cx"> class CSSSelectorList;
</span><del>-class CSSTokenizer;
</del><span class="cx"> class StyleKeyframe;
</span><span class="cx"> class StyleRule;
</span><span class="cx"> class StyleRuleBase;
</span><span class="lines">@@ -68,7 +66,7 @@
</span><span class="cx"> class CSSParserImpl {
</span><span class="cx">     WTF_MAKE_NONCOPYABLE(CSSParserImpl);
</span><span class="cx"> public:
</span><del>-    CSSParserImpl(const CSSParserContext&amp;, const String&amp;, StyleSheetContents* = nullptr, CSSParserObserverWrapper* = nullptr, CSSParser::RuleParsing = CSSParser::RuleParsing::Normal);
</del><ins>+    CSSParserImpl(const CSSParserContext&amp;, StyleSheetContents* = nullptr);
</ins><span class="cx"> 
</span><span class="cx">     enum AllowedRulesType {
</span><span class="cx">         // As per css-syntax, css-cascade and css-namespaces, @charset rules
</span><span class="lines">@@ -90,7 +88,7 @@
</span><span class="cx">     static Ref&lt;ImmutableStyleProperties&gt; parseInlineStyleDeclaration(const String&amp;, Element*);
</span><span class="cx">     static bool parseDeclarationList(MutableStyleProperties*, const String&amp;, const CSSParserContext&amp;);
</span><span class="cx">     static RefPtr&lt;StyleRuleBase&gt; parseRule(const String&amp;, const CSSParserContext&amp;, StyleSheetContents*, AllowedRulesType);
</span><del>-    static void parseStyleSheet(const String&amp;, const CSSParserContext&amp;, StyleSheetContents*, CSSParser::RuleParsing);
</del><ins>+    static void parseStyleSheet(const String&amp;, const CSSParserContext&amp;, StyleSheetContents*);
</ins><span class="cx">     static CSSSelectorList parsePageSelector(CSSParserTokenRange, StyleSheetContents*);
</span><span class="cx"> 
</span><span class="cx">     static std::unique_ptr&lt;Vector&lt;double&gt;&gt; parseKeyframeKeyList(const String&amp;);
</span><span class="lines">@@ -100,16 +98,7 @@
</span><span class="cx">     static void parseDeclarationListForInspector(const String&amp;, const CSSParserContext&amp;, CSSParserObserver&amp;);
</span><span class="cx">     static void parseStyleSheetForInspector(const String&amp;, const CSSParserContext&amp;, StyleSheetContents*, CSSParserObserver&amp;);
</span><span class="cx"> 
</span><del>-    static Ref&lt;ImmutableStyleProperties&gt; parseDeferredDeclaration(CSSParserTokenRange, const CSSParserContext&amp;, StyleSheetContents*);
-    static void parseDeferredRuleList(CSSParserTokenRange, CSSDeferredParser&amp;, Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp;);
-    static void parseDeferredKeyframeList(CSSParserTokenRange, CSSDeferredParser&amp;, StyleRuleKeyframes&amp;);
-
-    const CSSTokenizer&amp; tokenizer() const;
-
</del><span class="cx"> private:
</span><del>-    CSSParserImpl(const CSSParserContext&amp;, StyleSheetContents*);
-    CSSParserImpl(CSSDeferredParser&amp;);
-
</del><span class="cx">     enum RuleListType {
</span><span class="cx">         TopLevelRuleList,
</span><span class="cx">         RegularRuleList,
</span><span class="lines">@@ -151,8 +140,6 @@
</span><span class="cx"> 
</span><span class="cx">     static std::unique_ptr&lt;Vector&lt;double&gt;&gt; consumeKeyframeKeyList(CSSParserTokenRange);
</span><span class="cx"> 
</span><del>-    Ref&lt;DeferredStyleProperties&gt; createDeferredStyleProperties(const CSSParserTokenRange&amp; propertyRange);
-    
</del><span class="cx">     // FIXME: Can we build StylePropertySets directly?
</span><span class="cx">     // FIXME: Investigate using a smaller inline buffer
</span><span class="cx">     ParsedPropertyVector m_parsedProperties;
</span><span class="lines">@@ -160,14 +147,8 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;StyleSheetContents&gt; m_styleSheet;
</span><span class="cx"> 
</span><del>-    // For deferred property parsing.
-    RefPtr&lt;CSSDeferredParser&gt; m_deferredParser;
-    
-    // For normal parsing.
-    std::unique_ptr&lt;CSSTokenizer&gt; m_tokenizer;
-
</del><span class="cx">     // For the inspector
</span><del>-    CSSParserObserverWrapper* m_observerWrapper { nullptr };
</del><ins>+    CSSParserObserverWrapper* m_observerWrapper;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserTokenRangecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserTokenRange.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserTokenRange.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/parser/CSSParserTokenRange.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -30,7 +30,6 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;CSSParserTokenRange.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;StyleSheetContents.h&quot;
</del><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><span class="cx"> #include &lt;wtf/text/StringBuilder.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -70,27 +69,6 @@
</span><span class="cx">     return makeSubRange(start, m_first - 1);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSParserTokenRange CSSParserTokenRange::consumeBlockCheckingForEditability(StyleSheetContents* styleSheet)
-{
-    ASSERT(peek().getBlockType() == CSSParserToken::BlockStart);
-    const auto* start = &amp;peek() + 1;
-    unsigned nestingLevel = 0;
-    do {
-        const auto&amp; token = consume();
-        if (token.getBlockType() == CSSParserToken::BlockStart)
-            nestingLevel++;
-        else if (token.getBlockType() == CSSParserToken::BlockEnd)
-            nestingLevel--;
-
-        if (styleSheet &amp;&amp; !styleSheet-&gt;usesStyleBasedEditability() &amp;&amp; token.type() == IdentToken &amp;&amp; equalLettersIgnoringASCIICase(token.value(), &quot;-webkit-user-modify&quot;))
-            styleSheet-&gt;parserSetUsesStyleBasedEditability();
-    } while (nestingLevel &amp;&amp; m_first &lt; m_last);
-    
-    if (nestingLevel)
-        return makeSubRange(start, m_first); // Ended at EOF
-    return makeSubRange(start, m_first - 1);
-}
-
</del><span class="cx"> void CSSParserTokenRange::consumeComponentValue()
</span><span class="cx"> {
</span><span class="cx">     // FIXME: This is going to do multiple passes over large sections of a stylesheet.
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserTokenRangeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserTokenRange.h (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserTokenRange.h        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/parser/CSSParserTokenRange.h        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -75,7 +75,6 @@
</span><span class="cx"> 
</span><span class="cx">     // The returned range doesn't include the brackets
</span><span class="cx">     CSSParserTokenRange consumeBlock();
</span><del>-    CSSParserTokenRange consumeBlockCheckingForEditability(StyleSheetContents*);
</del><span class="cx"> 
</span><span class="cx">     void consumeComponentValue();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSPropertyParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -3712,7 +3712,7 @@
</span><span class="cx"> RefPtr&lt;CSSValue&gt; CSSPropertyParser::parseSingleValue(CSSPropertyID property, CSSPropertyID currentShorthand)
</span><span class="cx"> {
</span><span class="cx">     if (CSSParserFastPaths::isKeywordPropertyID(property)) {
</span><del>-        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(property, m_range.peek().id(), m_context.mode))
</del><ins>+        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(property, m_range.peek().id(), m_context.mode, m_styleSheetContents))
</ins><span class="cx">             return nullptr;
</span><span class="cx">         return consumeIdent(m_range);
</span><span class="cx">     }
</span><span class="lines">@@ -4257,7 +4257,7 @@
</span><span class="cx">     case CSSPropertyFontStretch:
</span><span class="cx">     case CSSPropertyFontStyle: {
</span><span class="cx">         CSSValueID id = m_range.consumeIncludingWhitespace().id();
</span><del>-        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(propId, id, m_context.mode))
</del><ins>+        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(propId, id, m_context.mode, m_styleSheetContents))
</ins><span class="cx">             return false;
</span><span class="cx">         parsedValue = CSSValuePool::singleton().createIdentifierValue(id);
</span><span class="cx">         break;
</span><span class="lines">@@ -4342,7 +4342,7 @@
</span><span class="cx">     // FIXME-NEWPARSER: Implement. RefPtr&lt;CSSPrimitiveValue&gt; fontStretch;
</span><span class="cx">     while (!m_range.atEnd()) {
</span><span class="cx">         CSSValueID id = m_range.peek().id();
</span><del>-        if (!fontStyle &amp;&amp; CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyFontStyle, id, m_context.mode)) {
</del><ins>+        if (!fontStyle &amp;&amp; CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyFontStyle, id, m_context.mode, m_styleSheetContents)) {
</ins><span class="cx">             fontStyle = consumeIdent(m_range);
</span><span class="cx">             continue;
</span><span class="cx">         }
</span><span class="lines">@@ -5347,7 +5347,7 @@
</span><span class="cx">     switch (property) {
</span><span class="cx">     case CSSPropertyWebkitMarginCollapse: {
</span><span class="cx">         CSSValueID id = m_range.consumeIncludingWhitespace().id();
</span><del>-        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyWebkitMarginBeforeCollapse, id, m_context.mode))
</del><ins>+        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyWebkitMarginBeforeCollapse, id, m_context.mode, m_styleSheetContents))
</ins><span class="cx">             return false;
</span><span class="cx">         addProperty(CSSPropertyWebkitMarginBeforeCollapse, CSSPropertyWebkitMarginCollapse, CSSValuePool::singleton().createIdentifierValue(id), important);
</span><span class="cx">         if (m_range.atEnd()) {
</span><span class="lines">@@ -5355,7 +5355,7 @@
</span><span class="cx">             return true;
</span><span class="cx">         }
</span><span class="cx">         id = m_range.consumeIncludingWhitespace().id();
</span><del>-        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyWebkitMarginAfterCollapse, id, m_context.mode))
</del><ins>+        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyWebkitMarginAfterCollapse, id, m_context.mode, m_styleSheetContents))
</ins><span class="cx">             return false;
</span><span class="cx">         addProperty(CSSPropertyWebkitMarginAfterCollapse, CSSPropertyWebkitMarginCollapse, CSSValuePool::singleton().createIdentifierValue(id), important);
</span><span class="cx">         return true;
</span><span class="lines">@@ -5362,7 +5362,7 @@
</span><span class="cx">     }
</span><span class="cx">     case CSSPropertyOverflow: {
</span><span class="cx">         CSSValueID id = m_range.consumeIncludingWhitespace().id();
</span><del>-        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyOverflowY, id, m_context.mode))
</del><ins>+        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyOverflowY, id, m_context.mode, m_styleSheetContents))
</ins><span class="cx">             return false;
</span><span class="cx">         if (!m_range.atEnd())
</span><span class="cx">             return false;
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSTokenizercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSTokenizer.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSTokenizer.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/parser/CSSTokenizer.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx">     wrapper.finalizeConstruction(m_tokens.begin());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSParserTokenRange CSSTokenizer::tokenRange() const
</del><ins>+CSSParserTokenRange CSSTokenizer::tokenRange()
</ins><span class="cx"> {
</span><span class="cx">     return m_tokens;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSTokenizerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSTokenizer.h (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSTokenizer.h        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/parser/CSSTokenizer.h        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx">     CSSTokenizer(const String&amp;);
</span><span class="cx">     CSSTokenizer(const String&amp;, CSSParserObserverWrapper&amp;); // For the inspector
</span><span class="cx"> 
</span><del>-    CSSParserTokenRange tokenRange() const;
</del><ins>+    CSSParserTokenRange tokenRange();
</ins><span class="cx">     unsigned tokenCount();
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserMediaQueryParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/MediaQueryParser.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/MediaQueryParser.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/parser/MediaQueryParser.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -36,17 +36,17 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-Ref&lt;MediaQuerySet&gt; MediaQueryParser::parseMediaQuerySet(const String&amp; queryString)
</del><ins>+RefPtr&lt;MediaQuerySet&gt; MediaQueryParser::parseMediaQuerySet(const String&amp; queryString)
</ins><span class="cx"> {
</span><span class="cx">     return parseMediaQuerySet(CSSTokenizer(queryString).tokenRange());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;MediaQuerySet&gt; MediaQueryParser::parseMediaQuerySet(CSSParserTokenRange range)
</del><ins>+RefPtr&lt;MediaQuerySet&gt; MediaQueryParser::parseMediaQuerySet(CSSParserTokenRange range)
</ins><span class="cx"> {
</span><span class="cx">     return MediaQueryParser(MediaQuerySetParser).parseInternal(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;MediaQuerySet&gt; MediaQueryParser::parseMediaCondition(CSSParserTokenRange range)
</del><ins>+RefPtr&lt;MediaQuerySet&gt; MediaQueryParser::parseMediaCondition(CSSParserTokenRange range)
</ins><span class="cx"> {
</span><span class="cx">     return MediaQueryParser(MediaConditionParser).parseInternal(range);
</span><span class="cx"> }
</span><span class="lines">@@ -246,7 +246,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // The state machine loop
</span><del>-Ref&lt;MediaQuerySet&gt; MediaQueryParser::parseInternal(CSSParserTokenRange range)
</del><ins>+RefPtr&lt;MediaQuerySet&gt; MediaQueryParser::parseInternal(CSSParserTokenRange range)
</ins><span class="cx"> {
</span><span class="cx">     while (!range.atEnd())
</span><span class="cx">         processToken(range.consume());
</span><span class="lines">@@ -261,7 +261,7 @@
</span><span class="cx">     } else if (m_mediaQueryData.currentMediaQueryChanged())
</span><span class="cx">         commitMediaQuery();
</span><span class="cx"> 
</span><del>-    return WTFMove(m_querySet);
</del><ins>+    return m_querySet;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> MediaQueryData::MediaQueryData()
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserMediaQueryParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/MediaQueryParser.h (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/MediaQueryParser.h        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/css/parser/MediaQueryParser.h        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -76,9 +76,9 @@
</span><span class="cx"> class MediaQueryParser {
</span><span class="cx">     WTF_MAKE_NONCOPYABLE(MediaQueryParser);
</span><span class="cx"> public:
</span><del>-    static Ref&lt;MediaQuerySet&gt; parseMediaQuerySet(const String&amp;);
-    static Ref&lt;MediaQuerySet&gt; parseMediaQuerySet(CSSParserTokenRange);
-    static Ref&lt;MediaQuerySet&gt; parseMediaCondition(CSSParserTokenRange);
</del><ins>+    static RefPtr&lt;MediaQuerySet&gt; parseMediaQuerySet(const String&amp;);
+    static RefPtr&lt;MediaQuerySet&gt; parseMediaQuerySet(CSSParserTokenRange);
+    static RefPtr&lt;MediaQuerySet&gt; parseMediaCondition(CSSParserTokenRange);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     enum ParserType {
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">     MediaQueryParser(ParserType);
</span><span class="cx">     virtual ~MediaQueryParser();
</span><span class="cx"> 
</span><del>-    Ref&lt;MediaQuerySet&gt; parseInternal(CSSParserTokenRange);
</del><ins>+    RefPtr&lt;MediaQuerySet&gt; parseInternal(CSSParserTokenRange);
</ins><span class="cx"> 
</span><span class="cx">     void processToken(const CSSParserToken&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx">     State m_state;
</span><span class="cx">     ParserType m_parserType;
</span><span class="cx">     MediaQueryData m_mediaQueryData;
</span><del>-    Ref&lt;MediaQuerySet&gt; m_querySet;
</del><ins>+    RefPtr&lt;MediaQuerySet&gt; m_querySet;
</ins><span class="cx">     MediaQueryBlockWatcher m_blockWatcher;
</span><span class="cx"> 
</span><span class="cx">     const static State ReadRestrictor;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -2117,7 +2117,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     auto parsedStyle = MutableStyleProperties::create();
</span><del>-    CSSParser::parseValue(parsedStyle, CSSPropertyFont, newFont, true, strictToCSSParserMode(!m_usesCSSCompatibilityParseMode));
</del><ins>+    CSSParser::parseValue(parsedStyle, CSSPropertyFont, newFont, true, strictToCSSParserMode(!m_usesCSSCompatibilityParseMode), nullptr);
</ins><span class="cx">     if (parsedStyle-&gt;isEmpty())
</span><span class="cx">         return;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/testing/Internals.cpp        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -34,10 +34,6 @@
</span><span class="cx"> #include &quot;Autofill.h&quot;
</span><span class="cx"> #include &quot;BackForwardController.h&quot;
</span><span class="cx"> #include &quot;BitmapImage.h&quot;
</span><del>-#include &quot;CSSKeyframesRule.h&quot;
-#include &quot;CSSMediaRule.h&quot;
-#include &quot;CSSStyleRule.h&quot;
-#include &quot;CSSSupportsRule.h&quot;
</del><span class="cx"> #include &quot;CachedImage.h&quot;
</span><span class="cx"> #include &quot;CachedResourceLoader.h&quot;
</span><span class="cx"> #include &quot;Chrome.h&quot;
</span><span class="lines">@@ -123,7 +119,6 @@
</span><span class="cx"> #include &quot;SourceBuffer.h&quot;
</span><span class="cx"> #include &quot;SpellChecker.h&quot;
</span><span class="cx"> #include &quot;StaticNodeList.h&quot;
</span><del>-#include &quot;StyleRule.h&quot;
</del><span class="cx"> #include &quot;StyleScope.h&quot;
</span><span class="cx"> #include &quot;StyleSheetContents.h&quot;
</span><span class="cx"> #include &quot;TextIterator.h&quot;
</span><span class="lines">@@ -850,101 +845,6 @@
</span><span class="cx">     return element.setPseudo(id);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static unsigned deferredStyleRulesCountForList(const Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; childRules)
-{
-    unsigned count = 0;
-    for (auto rule : childRules) {
-        if (is&lt;StyleRule&gt;(rule.get())) {
-            auto* cssRule = downcast&lt;StyleRule&gt;(rule.get());
-            if (!cssRule-&gt;propertiesWithoutDeferredParsing())
-                count++;
-            continue;
-        }
-        
-        StyleRuleGroup* groupRule = nullptr;
-        if (is&lt;StyleRuleMedia&gt;(rule.get()))
-            groupRule = downcast&lt;StyleRuleMedia&gt;(rule.get());
-        else if (is&lt;StyleRuleSupports&gt;(rule.get()))
-            groupRule = downcast&lt;StyleRuleSupports&gt;(rule.get());
-        if (!groupRule)
-            continue;
-        
-        auto* groupChildRules = groupRule-&gt;childRulesWithoutDeferredParsing();
-        if (!groupChildRules)
-            continue;
-        
-        count += deferredStyleRulesCountForList(*groupChildRules);
-    }
-
-    return count;
-}
-
-unsigned Internals::deferredStyleRulesCount(StyleSheet&amp; styleSheet)
-{
-    return deferredStyleRulesCountForList(downcast&lt;CSSStyleSheet&gt;(styleSheet).contents().childRules());
-}
-
-static unsigned deferredGroupRulesCountForList(const Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; childRules)
-{
-    unsigned count = 0;
-    for (auto rule : childRules) {
-        StyleRuleGroup* groupRule = nullptr;
-        if (is&lt;StyleRuleMedia&gt;(rule.get()))
-            groupRule = downcast&lt;StyleRuleMedia&gt;(rule.get());
-        else if (is&lt;StyleRuleSupports&gt;(rule.get()))
-            groupRule = downcast&lt;StyleRuleSupports&gt;(rule.get());
-        if (!groupRule)
-            continue;
-        
-        auto* groupChildRules = groupRule-&gt;childRulesWithoutDeferredParsing();
-        if (!groupChildRules)
-            count++;
-        else
-            count += deferredGroupRulesCountForList(*groupChildRules);
-    }
-    return count;
-}
-
-unsigned Internals::deferredGroupRulesCount(StyleSheet&amp; styleSheet)
-{
-    return deferredGroupRulesCountForList(downcast&lt;CSSStyleSheet&gt;(styleSheet).contents().childRules());
-}
-
-static unsigned deferredKeyframesRulesCountForList(const Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; childRules)
-{
-    unsigned count = 0;
-    for (auto rule : childRules) {
-        if (is&lt;StyleRuleKeyframes&gt;(rule.get())) {
-            auto* cssRule = downcast&lt;StyleRuleKeyframes&gt;(rule.get());
-            if (!cssRule-&gt;keyframesWithoutDeferredParsing())
-                count++;
-            continue;
-        }
-        
-        StyleRuleGroup* groupRule = nullptr;
-        if (is&lt;StyleRuleMedia&gt;(rule.get()))
-            groupRule = downcast&lt;StyleRuleMedia&gt;(rule.get());
-        else if (is&lt;StyleRuleSupports&gt;(rule.get()))
-            groupRule = downcast&lt;StyleRuleSupports&gt;(rule.get());
-        if (!groupRule)
-            continue;
-        
-        auto* groupChildRules = groupRule-&gt;childRulesWithoutDeferredParsing();
-        if (!groupChildRules)
-            continue;
-        
-        count += deferredKeyframesRulesCountForList(*groupChildRules);
-    }
-    
-    return count;
-}
-
-unsigned Internals::deferredKeyframesRulesCount(StyleSheet&amp; styleSheet)
-{
-    StyleSheetContents&amp; contents = downcast&lt;CSSStyleSheet&gt;(styleSheet).contents();
-    return deferredKeyframesRulesCountForList(contents.childRules());
-}
-
</del><span class="cx"> ExceptionOr&lt;bool&gt; Internals::isTimerThrottled(int timeoutId)
</span><span class="cx"> {
</span><span class="cx">     DOMTimer* timer = scriptExecutionContext()-&gt;findTimeout(timeoutId);
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.h (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.h        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/testing/Internals.h        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -67,7 +67,6 @@
</span><span class="cx"> class RTCPeerConnection;
</span><span class="cx"> class SerializedScriptValue;
</span><span class="cx"> class SourceBuffer;
</span><del>-class StyleSheet;
</del><span class="cx"> class TimeRanges;
</span><span class="cx"> class TypeConversions;
</span><span class="cx"> class XMLHttpRequest;
</span><span class="lines">@@ -118,11 +117,6 @@
</span><span class="cx">     String shadowPseudoId(Element&amp;);
</span><span class="cx">     void setShadowPseudoId(Element&amp;, const String&amp;);
</span><span class="cx"> 
</span><del>-    // CSS Deferred Parsing Testing
-    unsigned deferredStyleRulesCount(StyleSheet&amp;);
-    unsigned deferredGroupRulesCount(StyleSheet&amp;);
-    unsigned deferredKeyframesRulesCount(StyleSheet&amp;);
-
</del><span class="cx">     // DOMTimers throttling testing.
</span><span class="cx">     ExceptionOr&lt;bool&gt; isTimerThrottled(int timeoutId);
</span><span class="cx">     bool isRequestAnimationFrameThrottled() const;
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.idl (209793 => 209794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.idl        2016-12-14 07:20:33 UTC (rev 209793)
+++ trunk/Source/WebCore/testing/Internals.idl        2016-12-14 08:23:23 UTC (rev 209794)
</span><span class="lines">@@ -108,11 +108,6 @@
</span><span class="cx">     Node ensureUserAgentShadowRoot(Element host);
</span><span class="cx">     Node shadowRoot(Element host);
</span><span class="cx"> 
</span><del>-    // CSS Deferred Parsing Testing.
-    long deferredStyleRulesCount(StyleSheet sheet);
-    long deferredGroupRulesCount(StyleSheet sheet);
-    long deferredKeyframesRulesCount(StyleSheet sheet);
-
</del><span class="cx">     [MayThrowException] DOMString shadowRootType(Node root);
</span><span class="cx">     DOMString shadowPseudoId(Element element);
</span><span class="cx">     void setShadowPseudoId(Element element, DOMString id);
</span></span></pre>
</div>
</div>

</body>
</html>