<!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>[208847] 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/208847">208847</a></dd>
<dt>Author</dt> <dd>hyatt@apple.com</dd>
<dt>Date</dt> <dd>2016-11-17 09:28:52 -0800 (Thu, 17 Nov 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[CSS Parser] Add @supports, @keyframe and media query parsing options
https://bugs.webkit.org/show_bug.cgi?id=164821

Reviewed by Sam Weinig and Zalan Bujtas.

Source/WebCore:

* css/CSSKeyframeRule.cpp:
(WebCore::StyleKeyframe::setKeyText):
* css/CSSKeyframeRule.h:
* css/CSSKeyframesRule.cpp:
(WebCore::StyleRuleKeyframes::findKeyframeIndex):
Changed to call into CSSParserImpls implementation. The new parser
is now always used when parsing the key list.

* css/MediaList.cpp:
(WebCore::MediaQuerySet::create):
(WebCore::MediaQuerySet::MediaQuerySet):
(WebCore::MediaQuerySet::set):
(WebCore::MediaQuerySet::add):
(WebCore::MediaQuerySet::remove):
(WebCore::MediaList::setMediaText):
(WebCore::parseMediaDescriptor): Deleted.
(WebCore::MediaQuerySet::internalParse): Deleted.
(WebCore::MediaQuerySet::parse): Deleted.
* css/MediaList.h:
Rewritten to remove fallback descriptor support/parsing, since no other
browser supports it, and this was part of our initial 2005 landing that
nobody else appears to use.  Media queries now call into the new parser always.

* css/MediaQueryExp.cpp:
(WebCore::featureWithValidDensity):
(WebCore::featureWithPositiveNumber):
(WebCore::MediaQueryExpression::MediaQueryExpression):
Make sure to support transform2d, animation and transition.

* css/StyleMedia.cpp:
(WebCore::StyleMedia::matchMedium):
Call the normal create now that fallback descriptor syntax is gone.

* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseKeyframeRule):
(WebCore::CSSParser::parseSupportsCondition):
(WebCore::CSSParser::parseInlineStyleDeclaration):
(WebCore::CSSParser::parseDeclarationDeprecated):
(WebCore::CSSParser::parseDeclaration):
(WebCore::CSSParser::parseKeyframeKeyList):
(WebCore::CSSParser::parseMediaQuery): Deleted.
(WebCore::CSSParser::parseKeyframeSelector): Deleted.
* css/parser/CSSParser.h:
Patched the old parser to have flags to call into the new parser
for supports conditions and keyframes. Rename the parseDeclaration that
is only used by the old parser to have the word Deprecated in it. Removed
the media query and key list parsing functions, since the new parser
now does it always.

* css/parser/CSSParserIdioms.cpp:
(WebCore::convertToASCIILowercaseInPlace): Deleted.
* css/parser/CSSParserIdioms.h:
* css/parser/CSSParserToken.cpp:
(WebCore::convertToASCIILowercaseInPlace):
(WebCore::CSSParserToken::convertToASCIILowercaseInPlace):
* css/parser/CSSParserToken.h:
(WebCore::CSSParserToken::value):
(WebCore::CSSParserToken::initValueFromStringView):
* css/parser/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePseudoElementSelectorFromStringView):
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeAttr):
* css/parser/CSSSelectorParser.cpp:
(WebCore::CSSSelectorParser::consumeId):
(WebCore::CSSSelectorParser::consumeClass):
(WebCore::CSSSelectorParser::consumePseudo):
Moving convertToASCIILowercase to be a CSSParserToken member function instead
of operating on StringView. This saves an extra step, since the token itself
already had all the correct members. Note that converting in-place is bad,
and we'll be removing it once the new parser turns on.

* css/parser/MediaQueryParser.cpp:
(WebCore::MediaQueryParser::readMediaType):
(WebCore::MediaQueryParser::readFeature):
(WebCore::MediaQueryParser::readFeatureEnd):
Require the closing &quot;)&quot; on features. Fix the in-place lowercasing to only
be done for features, not for types. This matches the old parser.

* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createCSSStyleSheet):
* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::createSheet):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
(WebCore::HTMLLinkElement::initializeStyleSheet):
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::parseAttribute):
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::parseAttribute):
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
* html/parser/HTMLResourcePreloader.cpp:
(WebCore::mediaAttributeMatches):
Patched to call the normal MediaQuerySet::create and not the one that had fallback
descriptor support.

Source/WebKit/mac:

Fix up the create call now that fallback descriptor syntax is gone.

* DOM/DOM.mm:
(-[DOMHTMLLinkElement _mediaQueryMatches]):

LayoutTests:

Delete the fallback descriptor tests, since that feature has been
removed. Update some of the other tests based off some parsing changes
from using the new parser always.

* fast/media/media-descriptor-syntax-01-expected.html: Removed.
* fast/media/media-descriptor-syntax-01.html: Removed.
* fast/media/media-descriptor-syntax-02-expected.html: Removed.
* fast/media/media-descriptor-syntax-02.html: Removed.
* fast/media/media-descriptor-syntax-03-expected.html: Removed.
* fast/media/media-descriptor-syntax-03.html: Removed.
* fast/media/media-descriptor-syntax-04-expected.html: Removed.
* fast/media/media-descriptor-syntax-04.html: Removed.
* fast/media/media-descriptor-syntax-06-expected.html: Removed.
* fast/media/media-descriptor-syntax-06.html: Removed.
* fast/media/media-query-list-02-expected.txt:
* fast/media/media-query-list-03-expected.txt:
* fast/media/media-query-list-04-expected.txt:
* fast/media/media-query-list-05-expected.txt:
* fast/media/media-query-list-06-expected.txt:
* fast/media/mq-pointer-expected.txt:
* fast/media/w3c/test_media_queries-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastmediamqpointerexpectedtxt">trunk/LayoutTests/fast/media/mq-pointer-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediaw3ctest_media_queriesexpectedtxt">trunk/LayoutTests/fast/media/w3c/test_media_queries-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsembeddedcontenttheimgelementupdatethesourcesetexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-source-set-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSKeyframeRulecpp">trunk/Source/WebCore/css/CSSKeyframeRule.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSKeyframeRuleh">trunk/Source/WebCore/css/CSSKeyframeRule.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSKeyframesRulecpp">trunk/Source/WebCore/css/CSSKeyframesRule.cpp</a></li>
<li><a href="#trunkSourceWebCorecssMediaListcpp">trunk/Source/WebCore/css/MediaList.cpp</a></li>
<li><a href="#trunkSourceWebCorecssMediaListh">trunk/Source/WebCore/css/MediaList.h</a></li>
<li><a href="#trunkSourceWebCorecssMediaQueryExpcpp">trunk/Source/WebCore/css/MediaQueryExp.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleMediacpp">trunk/Source/WebCore/css/StyleMedia.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="#trunkSourceWebCorecssparserCSSParserIdiomscpp">trunk/Source/WebCore/css/parser/CSSParserIdioms.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserIdiomsh">trunk/Source/WebCore/css/parser/CSSParserIdioms.h</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserTokencpp">trunk/Source/WebCore/css/parser/CSSParserToken.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserTokenh">trunk/Source/WebCore/css/parser/CSSParserToken.h</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserValuescpp">trunk/Source/WebCore/css/parser/CSSParserValues.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSPropertyParsercpp">trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSSelectorParsercpp">trunk/Source/WebCore/css/parser/CSSSelectorParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserMediaQueryParsercpp">trunk/Source/WebCore/css/parser/MediaQueryParser.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDOMImplementationcpp">trunk/Source/WebCore/dom/DOMImplementation.cpp</a></li>
<li><a href="#trunkSourceWebCoredomInlineStyleSheetOwnercpp">trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLLinkElementcpp">trunk/Source/WebCore/html/HTMLLinkElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLSourceElementcpp">trunk/Source/WebCore/html/HTMLSourceElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLStyleElementcpp">trunk/Source/WebCore/html/HTMLStyleElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlparserHTMLPreloadScannercpp">trunk/Source/WebCore/html/parser/HTMLPreloadScanner.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlparserHTMLResourcePreloadercpp">trunk/Source/WebCore/html/parser/HTMLResourcePreloader.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacDOMDOMmm">trunk/Source/WebKit/mac/DOM/DOM.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastmediamediadescriptorsyntax01expectedhtml">trunk/LayoutTests/fast/media/media-descriptor-syntax-01-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamediadescriptorsyntax01html">trunk/LayoutTests/fast/media/media-descriptor-syntax-01.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamediadescriptorsyntax02expectedhtml">trunk/LayoutTests/fast/media/media-descriptor-syntax-02-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamediadescriptorsyntax02html">trunk/LayoutTests/fast/media/media-descriptor-syntax-02.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamediadescriptorsyntax03expectedhtml">trunk/LayoutTests/fast/media/media-descriptor-syntax-03-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamediadescriptorsyntax03html">trunk/LayoutTests/fast/media/media-descriptor-syntax-03.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamediadescriptorsyntax04expectedhtml">trunk/LayoutTests/fast/media/media-descriptor-syntax-04-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamediadescriptorsyntax04html">trunk/LayoutTests/fast/media/media-descriptor-syntax-04.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamediadescriptorsyntax06expectedhtml">trunk/LayoutTests/fast/media/media-descriptor-syntax-06-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamediadescriptorsyntax06html">trunk/LayoutTests/fast/media/media-descriptor-syntax-06.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqinvalidsyntax01expectedhtml">trunk/LayoutTests/fast/media/mq-invalid-syntax-01-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqinvalidsyntax01html">trunk/LayoutTests/fast/media/mq-invalid-syntax-01.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqinvalidsyntax02expectedhtml">trunk/LayoutTests/fast/media/mq-invalid-syntax-02-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqinvalidsyntax02html">trunk/LayoutTests/fast/media/mq-invalid-syntax-02.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqinvalidsyntax05expectedhtml">trunk/LayoutTests/fast/media/mq-invalid-syntax-05-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqinvalidsyntax05html">trunk/LayoutTests/fast/media/mq-invalid-syntax-05.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqjsmediaexcept02expectedhtml">trunk/LayoutTests/fast/media/mq-js-media-except-02-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqjsmediaexcept02html">trunk/LayoutTests/fast/media/mq-js-media-except-02.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqjsmediaexcept03expectedhtml">trunk/LayoutTests/fast/media/mq-js-media-except-03-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqjsmediaexcept03html">trunk/LayoutTests/fast/media/mq-js-media-except-03.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqjsmediaforwardsyntaxexpectedhtml">trunk/LayoutTests/fast/media/mq-js-media-forward-syntax-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqjsmediaforwardsyntaxhtml">trunk/LayoutTests/fast/media/mq-js-media-forward-syntax.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqjsstylesheetmedia01expectedhtml">trunk/LayoutTests/fast/media/mq-js-stylesheet-media-01-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqjsstylesheetmedia01html">trunk/LayoutTests/fast/media/mq-js-stylesheet-media-01.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqjsstylesheetmedia02expectedhtml">trunk/LayoutTests/fast/media/mq-js-stylesheet-media-02-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqjsstylesheetmedia02html">trunk/LayoutTests/fast/media/mq-js-stylesheet-media-02.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqjsstylesheetmedia03expectedhtml">trunk/LayoutTests/fast/media/mq-js-stylesheet-media-03-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqjsstylesheetmedia03html">trunk/LayoutTests/fast/media/mq-js-stylesheet-media-03.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqjsstylesheetmedia04expectedhtml">trunk/LayoutTests/fast/media/mq-js-stylesheet-media-04-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqjsstylesheetmedia04html">trunk/LayoutTests/fast/media/mq-js-stylesheet-media-04.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/ChangeLog        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2016-11-16  Dave Hyatt  &lt;hyatt@apple.com&gt;
+
+        [CSS Parser] Add @supports, @keyframe and media query parsing options
+        https://bugs.webkit.org/show_bug.cgi?id=164821
+
+        Reviewed by Sam Weinig and Zalan Bujtas.
+
+        Delete the fallback descriptor tests, since that feature has been
+        removed. Update some of the other tests based off some parsing changes
+        from using the new parser always.
+
+        * fast/media/media-descriptor-syntax-01-expected.html: Removed.
+        * fast/media/media-descriptor-syntax-01.html: Removed.
+        * fast/media/media-descriptor-syntax-02-expected.html: Removed.
+        * fast/media/media-descriptor-syntax-02.html: Removed.
+        * fast/media/media-descriptor-syntax-03-expected.html: Removed.
+        * fast/media/media-descriptor-syntax-03.html: Removed.
+        * fast/media/media-descriptor-syntax-04-expected.html: Removed.
+        * fast/media/media-descriptor-syntax-04.html: Removed.
+        * fast/media/media-descriptor-syntax-06-expected.html: Removed.
+        * fast/media/media-descriptor-syntax-06.html: Removed.
+        * fast/media/media-query-list-02-expected.txt:
+        * fast/media/media-query-list-03-expected.txt:
+        * fast/media/media-query-list-04-expected.txt:
+        * fast/media/media-query-list-05-expected.txt:
+        * fast/media/media-query-list-06-expected.txt:
+        * fast/media/mq-pointer-expected.txt:
+        * fast/media/w3c/test_media_queries-expected.txt:
+
</ins><span class="cx"> 2016-11-17  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove pass expectation for custom-elements tests on ios-sim because CEReactions were disabled in r208837.
</span></span></pre></div>
<a id="trunkLayoutTestsfastmediamediadescriptorsyntax01expectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/media-descriptor-syntax-01-expected.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/media-descriptor-syntax-01-expected.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/media-descriptor-syntax-01-expected.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,5 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;body&gt;
-&lt;p style=&quot;color: green&quot;&gt;This text should be green.&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamediadescriptorsyntax01html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/media-descriptor-syntax-01.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/media-descriptor-syntax-01.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/media-descriptor-syntax-01.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,14 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;head&gt;
-&lt;title&gt;HTML4 media descriptors test: parsing style element media attribute, forward-compatible syntax&lt;/title&gt;
-&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/REC-html40/types.html#h-6.13&quot; /&gt;
-
-&lt;style type=&quot;text/css&quot; media=&quot;3d-glasses, screen and resolution &gt; 40dpi, braille&quot;&gt;
-p { color: green }
-&lt;/style&gt;
-
-&lt;/head&gt;
-&lt;body&gt;
-&lt;/body&gt;
-&lt;p&gt; This text should be green. &lt;/p&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamediadescriptorsyntax02expectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/media-descriptor-syntax-02-expected.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/media-descriptor-syntax-02-expected.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/media-descriptor-syntax-02-expected.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,5 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;body&gt;
-&lt;p style=&quot;color: green&quot;&gt;This text should be green.&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamediadescriptorsyntax02html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/media-descriptor-syntax-02.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/media-descriptor-syntax-02.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/media-descriptor-syntax-02.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,15 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;head&gt;
-&lt;title&gt;HTML4 media descriptor test: parsing style element media attribute, forward-compatible syntax&lt;/title&gt; 
-&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/REC-html40/types.html#h-6.13&quot; /&gt;
-&lt;!-- actual testcase from http://www.hixie.ch/tests/evil/css/import/extra/styleexoticmedia.html --&gt;
-
-&lt;style type=&quot;text/css&quot; media=&quot;screen;braille&quot;&gt;
-p { color: green }
-&lt;/style&gt;
-
-&lt;/head&gt;
-&lt;body&gt;
-&lt;p&gt; This text should be green.&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamediadescriptorsyntax03expectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/media-descriptor-syntax-03-expected.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/media-descriptor-syntax-03-expected.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/media-descriptor-syntax-03-expected.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,5 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;body&gt;
-&lt;p style=&quot;color: green&quot;&gt;This text should be green.&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamediadescriptorsyntax03html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/media-descriptor-syntax-03.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/media-descriptor-syntax-03.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/media-descriptor-syntax-03.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,14 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;head&gt;
-&lt;title&gt;HTML4 media descriptor test: parsing style element media attribute, forward-compatible syntax&lt;/title&gt;
-&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/REC-html40/types.html#h-6.13&quot; /&gt;
-&lt;!-- actual testcase from http://www.hixie.ch/tests/evil/css/import/extra/styleexoticmedia.html --&gt;
-&lt;style type=&quot;text/css&quot; media=&quot;braille, all with print&quot;&gt;
-p { color: green }
-&lt;/style&gt;
-
-&lt;/head&gt;
-&lt;body&gt;
-&lt;p&gt; This text should be green.&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamediadescriptorsyntax04expectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/media-descriptor-syntax-04-expected.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/media-descriptor-syntax-04-expected.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/media-descriptor-syntax-04-expected.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,5 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;body&gt;
-&lt;p style=&quot;color: green&quot;&gt;This text should be green.&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamediadescriptorsyntax04html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/media-descriptor-syntax-04.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/media-descriptor-syntax-04.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/media-descriptor-syntax-04.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,13 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;head&gt;
-&lt;title&gt;HTML4 media descriptor test: parsing style element media attribute, forward-compatible syntax&lt;/title&gt;
-&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/REC-html40/types.html#h-6.13&quot; /&gt;
-&lt;style type=&quot;text/css&quot; media=&quot;,,,,&quot;&gt;
-p { color: green }
-&lt;/style&gt;
-
-&lt;/head&gt;
-&lt;body&gt;
-&lt;p&gt; This text should be green.&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamediadescriptorsyntax06expectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/media-descriptor-syntax-06-expected.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/media-descriptor-syntax-06-expected.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/media-descriptor-syntax-06-expected.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,5 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;body&gt;
-&lt;p style=&quot;color: green&quot;&gt;This text should be green.&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamediadescriptorsyntax06html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/media-descriptor-syntax-06.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/media-descriptor-syntax-06.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/media-descriptor-syntax-06.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,13 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;head&gt;
-&lt;title&gt;HTML4 media descriptor test: parsing style element media attribute, forward-compatible syntax&lt;/title&gt;
-&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/REC-html40/types.html#h-6.13&quot; /&gt;
-&lt;style type=&quot;text/css&quot; media=&quot;     &quot;&gt;
-p { color: green }
-&lt;/style&gt;
-
-&lt;/head&gt;
-&lt;body&gt;
-&lt;p&gt; This text should be green.&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqinvalidsyntax01expectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-invalid-syntax-01-expected.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-invalid-syntax-01-expected.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-invalid-syntax-01-expected.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,5 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;body&gt;
-&lt;p style=&quot;color: green&quot;&gt;This text should be green.&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqinvalidsyntax01html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-invalid-syntax-01.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-invalid-syntax-01.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-invalid-syntax-01.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,14 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;head&gt;
-&lt;title&gt;CSS3 media query test: syntactically invalid media query inside html element should be treated as html media descriptor. Using style element, media attribute.&lt;/title&gt;  
-&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/css3-mediaqueries/&quot; /&gt;
-
-&lt;style type=&quot;text/css&quot; media=&quot;all and invalid&quot;&gt;
-p { color: green }
-&lt;/style&gt;
-
-&lt;/head&gt;
-&lt;body&gt;
-&lt;p&gt; This text should be green.&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqinvalidsyntax02expectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-invalid-syntax-02-expected.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-invalid-syntax-02-expected.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-invalid-syntax-02-expected.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,5 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;body&gt;
-&lt;p style=&quot;color: green&quot;&gt;This text should be green.&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqinvalidsyntax02html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-invalid-syntax-02.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-invalid-syntax-02.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-invalid-syntax-02.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,12 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;head&gt;
-&lt;title&gt;CSS3 media query test: syntactically invalid media query inside html element should be treated as media descriptor. Using link element, media attribute.&lt;/title&gt;
-&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/css3-mediaqueries/&quot; /&gt;
-
-&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;all and invalid&quot; href=&quot;import-p-green.css&quot; /&gt;
-
-&lt;/head&gt;
-&lt;body&gt;
-&lt;p&gt; This text should be green.&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqinvalidsyntax05expectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-invalid-syntax-05-expected.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-invalid-syntax-05-expected.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-invalid-syntax-05-expected.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,5 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;body&gt;
-&lt;p style=&quot;color: green&quot;&gt;This text should be green.&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqinvalidsyntax05html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-invalid-syntax-05.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-invalid-syntax-05.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-invalid-syntax-05.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,17 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;head&gt;
-&lt;title&gt;CSS3 media query test: syntactically invalid media query inside css rule should eval to false (,,,,). Using style element, css import rule.&lt;/title&gt;
-&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/css3-mediaqueries/&quot; /&gt;
-&lt;!-- this test shows slight disconnect between css media queries and html4 media descriptors --&gt;
-&lt;style type=&quot;text/css&quot; media=&quot;,,,,,,&quot;&gt;
-p { color: green }
-&lt;/styl&gt;
-&lt;style type=&quot;text/css&quot;&gt;
-@import url(import-p-red.css) all,,,,,,;
-
-&lt;/style&gt;
-&lt;/head&gt;
-&lt;body&gt;
-&lt;p&gt; This text should be green.&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqjsmediaexcept02expectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-js-media-except-02-expected.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-js-media-except-02-expected.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-js-media-except-02-expected.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,6 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;body&gt;
-&lt;p style=&quot;color: green&quot;&gt;This text should be green.&lt;/p&gt;
-&lt;p&gt;Caught exception: SyntaxError (DOM Exception 12): The string did not match the expected pattern.&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqjsmediaexcept02html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-js-media-except-02.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-js-media-except-02.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-js-media-except-02.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,38 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;head&gt;
-&lt;title&gt;CSS3 media query test: @media css rule media.mediaText property parsing, media query syntax error should be handled correctly.&lt;/title&gt;
-&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/CSS21/media.html&quot; /&gt;
-
-&lt;style type=&quot;text/css&quot;&gt;
-p#result {color: green}
-
-@media not screen {
-/* query will be modified from javascript */
-/* the manipulation contains syntax error, and should fail */
-p#result {color: red}
-}
-
-@media screen and resolution &gt; 40dpi {
-/* media query with syntax error should fail */
-/* corresponding DOM manipulation will fail */
-p#result {color: red}
-}
-&lt;/style&gt;
-&lt;script language=&quot;javascript&quot;&gt;
-function test() {
-    try {
-        // this should throw
-        document.styleSheets[0].cssRules[1].media.mediaText = &quot;screen and resolution &gt; 40dpi&quot;;
-    } catch (e) {
-        document.getElementById(&quot;result&quot;).innerHTML = &quot;This text should be green.&quot;;
-        document.getElementById(&quot;details&quot;).innerHTML = &quot;Caught exception: &quot; + e;
-   }
-}
-&lt;/script&gt;
-
-&lt;/head&gt;
-&lt;body onload=&quot;test()&quot;&gt;
-&lt;p id=&quot;result&quot;&gt;Failure: test not run&lt;/p&gt;
-&lt;p id=&quot;details&quot;&gt;&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqjsmediaexcept03expectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-js-media-except-03-expected.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-js-media-except-03-expected.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-js-media-except-03-expected.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,6 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;body&gt;
-&lt;p style=&quot;color: green&quot;&gt;Success. This text should be green.&lt;/p&gt;
-&lt;p&gt;Caught exception: SyntaxError (DOM Exception 12): The string did not match the expected pattern.&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqjsmediaexcept03html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-js-media-except-03.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-js-media-except-03.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-js-media-except-03.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,43 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;head&gt;
-&lt;title&gt;CSS3 media query test: @media css rule media.mediaText property parsing, media query syntax error should be handled correctly (,,,,).&lt;/title&gt;
-&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/CSS21/media.html&quot; /&gt;
-&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule&quot; /&gt;
-&lt;!-- this test shows slight disconnect between css media queries and html4 media descriptors --&gt;
-&lt;style type=&quot;text/css&quot;&gt;
-p#result {color: green}
-
-@media braille {
-/* query will be modified from javascript */
-/* the manipulation contains syntax error, and should fail */
-p#result {color: red}
-}
-}
-&lt;/style&gt;
-&lt;script language=&quot;javascript&quot;&gt;
-function test() {
-    try {
-        // this shouldn't throw
-        document.styleSheets[0].media.mediaText = &quot;,,,,&quot;;
-    } catch (e) {
-        document.getElementById(&quot;result&quot;).innerHTML = &quot;Failure. ,,,, should be valid media descriptor.&quot;;
-        document.getElementById(&quot;details&quot;).innerHTML = &quot;Caught exception: &quot; + e;
-        return;
-    }
-    try {
-        // this should throw
-        document.styleSheets[0].cssRules[1].media.mediaText = &quot;,,,,&quot;;
-        document.getElementById(&quot;result&quot;).innerHTML = &quot;Failure. No exception thrown.&quot;;
-    } catch (e) {
-        document.getElementById(&quot;result&quot;).innerHTML = &quot;Success. This text should be green.&quot;;
-        document.getElementById(&quot;details&quot;).innerHTML = &quot;Caught exception: &quot; + e;
-   }
-}
-&lt;/script&gt;
-
-&lt;/head&gt;
-&lt;body onload=&quot;test()&quot;&gt;
-&lt;p id=&quot;result&quot;&gt;Failure: test not run&lt;/p&gt;
-&lt;p id=&quot;details&quot;&gt;aaa&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqjsmediaforwardsyntaxexpectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-js-media-forward-syntax-expected.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-js-media-forward-syntax-expected.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-js-media-forward-syntax-expected.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,5 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;body&gt;
-&lt;p style=&quot;color: green&quot;&gt;This text should be green.&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqjsmediaforwardsyntaxhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-js-media-forward-syntax.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-js-media-forward-syntax.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-js-media-forward-syntax.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,33 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;head&gt;
-&lt;title&gt;CSS3 media query test: stylesheet media.mediaText = parsing, media descriptor fallback in document.StyleSheet.media.mediaText&lt;/title&gt;
-&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/css3-mediaqueries/&quot; /&gt;
-
-&lt;!-- the media property of stylesheet below will be manipulated, and
- manipulation should respect html media descriptor forward-compatible syntax.
- This means the manipulation should succeed. --&gt;
-&lt;style type=&quot;text/css&quot;&gt;
-
-p#result { color: green;}
-
-@media screen and resolution &gt; 40dpi {
-/* media query with syntax error should fail */
-/* corresponding DOM manipulation to the mediaText of the stylesheet will succeed */
-p#result { color: red;}
-
-}
-&lt;/style&gt;
-&lt;script language=&quot;javascript&quot;&gt;
-function test() {
-   // this should not throw, because StyleSheet should respect Media Description forward-compatible syntax
-   document.styleSheets[0].media.mediaText = &quot;screen and resolution &gt; 40dpi&quot;;
-   document.getElementById(&quot;result&quot;).innerHTML = &quot;This text should be green.&quot;;
-}
-&lt;/script&gt;
-
-
-&lt;/head&gt;
-&lt;body onload=&quot;test()&quot;&gt;
-&lt;p id=&quot;result&quot;&gt;Failure: test not run&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqjsstylesheetmedia01expectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-js-stylesheet-media-01-expected.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-js-stylesheet-media-01-expected.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-js-stylesheet-media-01-expected.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,6 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;body&gt;
-&lt;p&gt;The text below should be green and contain &quot;braille, media, screen and (color) and (grid: 0), tty&quot;.&lt;/p&gt;
-&lt;p style=&quot;color: green&quot;&gt;braille, media, screen and (color) and (grid: 0), tty&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqjsstylesheetmedia01html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-js-stylesheet-media-01.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-js-stylesheet-media-01.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-js-stylesheet-media-01.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,23 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;head&gt;
-&lt;title&gt;CSS3 media query test: stylesheet media.mediaText property inspection.&lt;/title&gt;
-&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/css3-mediaqueries/#syntax&quot; /&gt;
-
-&lt;style type=&quot;text/css&quot; media=&quot;braille, media with error, screen and (color) and (grid:0), tty resolution &gt; 600px&quot;&gt;
-#result { color: green }
-&lt;/style&gt;
-
-&lt;script language=&quot;javascript&quot;&gt;
-function test() {
-    re = document.getElementById(&quot;result&quot;);
-    re.innerHTML = &quot;started&quot;;
-    re.innerHTML = document.styleSheets[0].media.mediaText;
-}
-&lt;/script&gt;
-
-&lt;/head&gt;
-&lt;body onload=&quot;test()&quot;&gt;
-&lt;p&gt; The text below should be green and contain &quot;braille, media, screen and (color) and (grid: 0), tty&quot;. &lt;/p&gt;
-&lt;p id=&quot;result&quot;&gt;Failure: test not run&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqjsstylesheetmedia02expectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-js-stylesheet-media-02-expected.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-js-stylesheet-media-02-expected.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-js-stylesheet-media-02-expected.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,6 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;body&gt;
-&lt;p&gt;The text below should be green and contain &quot;braille, media, screen and (color) and (grid: 0), tty&quot;.&lt;/p&gt;
-&lt;p style=&quot;color: green&quot;&gt;braille, media, screen and (color) and (grid: 0), tty&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqjsstylesheetmedia02html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-js-stylesheet-media-02.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-js-stylesheet-media-02.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-js-stylesheet-media-02.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,27 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;head&gt;
-&lt;title&gt;CSS3 media query test: stylesheet media property enumeration.&lt;/title&gt;
-&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/css3-mediaqueries/#syntax&quot; /&gt;
-&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html&quot; /&gt;
-
-&lt;style type=&quot;text/css&quot; media=&quot;braille, media with error, screen and (color) and (grid:0), tty resolution &gt; 600px&quot;&gt;
-#result { color: green; }
-&lt;/style&gt;
-
-&lt;script language=&quot;javascript&quot;&gt;
-function test() {
-    re = document.getElementById(&quot;result&quot;);
-    re.innerHTML = &quot;started&quot;;
-    re.innerHTML = document.styleSheets[0].media.item(0)
-                    + &quot;, &quot; + document.styleSheets[0].media.item(1)
-                    + &quot;, &quot; + document.styleSheets[0].media.item(2)
-                    + &quot;, &quot; + document.styleSheets[0].media.item(3) ;
-}
-&lt;/script&gt;
-
-&lt;/head&gt;
-&lt;body onload=&quot;test()&quot;&gt;
-&lt;p&gt; The text below should be green and contain &quot;braille, media, screen and (color) and (grid: 0), tty&quot;. &lt;/p&gt;
-&lt;p id=&quot;result&quot;&gt;Failure: test not run&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqjsstylesheetmedia03expectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-js-stylesheet-media-03-expected.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-js-stylesheet-media-03-expected.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-js-stylesheet-media-03-expected.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,7 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;body&gt;
-&lt;p style=&quot;color: green&quot;&gt;This text should be green and below should read &quot;braille, not screen, screen and (color)&quot;.&lt;/p&gt;
-&lt;p style=&quot;color: green&quot;&gt;braille, not screen, screen and (color), not screen&lt;/p&gt;
-&lt;p style=&quot;color: green&quot;&gt;expected to fail (24.07.2005)&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqjsstylesheetmedia03html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-js-stylesheet-media-03.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-js-stylesheet-media-03.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-js-stylesheet-media-03.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,35 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;head&gt;
-&lt;title&gt;CSS3 media query test: stylesheet media.appendMedium&lt;/title&gt;
-&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/css3-mediaqueries/#syntax&quot; /&gt;
-&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html&quot; /&gt;
-&lt;style type=&quot;text/css&quot; media=&quot;braille, not screen&quot;&gt;
-p { color: green }
-&lt;/style&gt;
-
-&lt;script language=&quot;javascript&quot;&gt;
-function test() {
-    var re = document.getElementById(&quot;result&quot;);
-    var media = document.styleSheets[0].media;
-    media.appendMedium(&quot;screen and (color)&quot;);
-    media.appendMedium(&quot;not screen&quot;);
-    var first = true;
-    for (var i = 0; i &lt; media.length; ++i) {
-        if (!first)  re.innerHTML += &quot;, &quot; + media.item(i);
-        else re.innerHTML = media.item(i);
-        first = false;
-    }
-
-}
-&lt;/script&gt;
-
-&lt;/head&gt;
-&lt;body onload=&quot;test()&quot;&gt;
-&lt;!-- FIXME: NOTE! This will fail until dynamic setting of media property causes style recalculation.
-          This is not the case currently (24.07.2005)
---&gt;
-&lt;p&gt; This text should be green and below should read &quot;braille, not screen, screen and (color)&quot;. &lt;/p&gt;
-&lt;p id=&quot;result&quot;&gt;Failure: test not run&lt;/p&gt;
-&lt;p&gt; expected to fail (24.07.2005)&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqjsstylesheetmedia04expectedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-js-stylesheet-media-04-expected.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-js-stylesheet-media-04-expected.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-js-stylesheet-media-04-expected.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,7 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;body&gt;
-&lt;p style=&quot;color: green&quot;&gt;This text should be green and below should read &quot;media list is empty&quot;.&lt;/p&gt;
-&lt;p style=&quot;color: green&quot;&gt;media list is empty&lt;/p&gt;
-&lt;p style=&quot;color: green&quot;&gt;Expected to fail (24.7.2005)&lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqjsstylesheetmedia04html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/media/mq-js-stylesheet-media-04.html (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-js-stylesheet-media-04.html        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-js-stylesheet-media-04.html        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,37 +0,0 @@
</span><del>-&lt;html&gt;
-&lt;head&gt;
-&lt;title&gt;CSS3 media query test: stylesheet media deleteMedium &lt;/title&gt;
-&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/css3-mediaqueries/&quot; /&gt;
-&lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html&quot; /&gt;
-&lt;style type=&quot;text/css&quot; media=&quot;braille, not screen&quot;&gt;
-p { color: green }
-&lt;/style&gt;
-
-&lt;script language=&quot;javascript&quot;&gt;
-function test() {
-    var re = document.getElementById(&quot;result&quot;);
-    var media = document.styleSheets[0].media;
-    media.appendMedium(&quot;screen and (color)&quot;);
-    while (media.length) {
-        media.deleteMedium(media.item(0));
-    }
-    re.innerHTML = &quot;media list is empty&quot;
-    var first = true;
-    for (var i = 0; i &lt; media.length; ++i) {
-        if (!first)  re.innerHTML += &quot;, &quot; + media.item(i);
-        else re.innerHTML = media.item(i);
-        first = false;
-    }
-}
-&lt;/script&gt;
-
-&lt;/head&gt;
-&lt;body onload=&quot;test()&quot;&gt;
-&lt;!-- FIXME: NOTE! This will fail until dynamic setting of media property causes style recalculation.
-          This is not the case currently (24.07.2005)
---&gt;
-&lt;p&gt; This text should be green and below should read &quot;media list is empty&quot;.  &lt;/p&gt;
-&lt;p id=&quot;result&quot;&gt;Failure: test not run&lt;/p&gt;
-&lt;p&gt; Expected to fail (24.7.2005) &lt;/p&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastmediamqpointerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/media/mq-pointer-expected.txt (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-pointer-expected.txt        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/mq-pointer-expected.txt        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> Test the (pointer) and (hover) media features. See Bug 87403 for details.
</span><span class="cx"> 
</span><span class="cx"> Query &quot;(pointer)&quot;: true
</span><del>-Query &quot;(Pointer)&quot;: true
</del><ins>+Query &quot;(pointer)&quot;: true
</ins><span class="cx"> Query &quot;(pointer:none)&quot;: false
</span><span class="cx"> Query &quot;(pointer:coarse)&quot;: false
</span><span class="cx"> Query &quot;(pointer:coARse)&quot;: false
</span></span></pre></div>
<a id="trunkLayoutTestsfastmediaw3ctest_media_queriesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/media/w3c/test_media_queries-expected.txt (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/w3c/test_media_queries-expected.txt        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/fast/media/w3c/test_media_queries-expected.txt        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -278,13 +278,13 @@
</span><span class="cx"> PASS (resolution: dpi) should not apply 
</span><span class="cx"> PASS (resolution: dpi + 1) should not apply 
</span><span class="cx"> FAIL (min-resolution: dpi - 1 ) should apply assert_true: expected true got false
</span><del>-PASS not all and (min-resolution: dpi - 1 ) should not apply 
-FAIL not all and (min-resolution: dpi + 1 ) should apply assert_true: expected true got false
</del><ins>+FAIL not all and (min-resolution: dpi - 1 ) should not apply assert_false: expected false got true
+PASS not all and (min-resolution: dpi + 1 ) should apply 
</ins><span class="cx"> PASS all and (min-resolution: dpi + 1 ) should not apply 
</span><span class="cx"> FAIL (min-resolution: dpcm (dpi - 1) ) should apply assert_true: expected true got false
</span><span class="cx"> FAIL (max-resolution: dpcm  (dpi + 1) ) should apply assert_true: expected true got false
</span><span class="cx"> PASS (max-resolution: dpcm  (dpi - 1) ) should not apply 
</span><del>-FAIL not all and (min-resolution: dpcm  (dpi + 1) ) should apply assert_true: expected true got false
</del><ins>+PASS not all and (min-resolution: dpcm  (dpi + 1) ) should apply 
</ins><span class="cx"> PASS expression grid should be parseable 
</span><span class="cx"> PASS expression grid: 0 should be parseable 
</span><span class="cx"> PASS expression grid: 1 should be parseable 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsembeddedcontenttheimgelementupdatethesourcesetexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-source-set-expected.txt (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-source-set-expected.txt        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-source-set-expected.txt        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -34,8 +34,8 @@
</span><span class="cx"> PASS &lt;picture&gt;&lt;source srcset=&quot;data:,b&quot; media=&quot;&quot;&gt;&lt;img src=&quot;data:,a&quot; data-expect=&quot;data:,b&quot;&gt;&lt;/picture&gt; 
</span><span class="cx"> PASS &lt;picture&gt;&lt;source srcset=&quot;data:,b&quot; media=&quot;all&quot;&gt;&lt;img src=&quot;data:,a&quot; data-expect=&quot;data:,b&quot;&gt;&lt;/picture&gt; 
</span><span class="cx"> PASS &lt;picture&gt;&lt;source srcset=&quot;data:,b&quot; media=&quot;all and (min-width:0)&quot;&gt;&lt;img src=&quot;data:,a&quot; data-expect=&quot;data:,b&quot;&gt;&lt;/picture&gt; 
</span><del>-FAIL &lt;picture&gt;&lt;source srcset=&quot;data:,b&quot; media=&quot;all and !&quot;&gt;&lt;img src=&quot;data:,a&quot; data-expect=&quot;data:,a&quot;&gt;&lt;/picture&gt; assert_equals: expected &quot;data:,a&quot; but got &quot;data:,b&quot;
-FAIL &lt;picture&gt;&lt;source srcset=&quot;data:,b&quot; media=&quot;all and (!)&quot;&gt;&lt;img src=&quot;data:,a&quot; data-expect=&quot;data:,a&quot;&gt;&lt;/picture&gt; assert_equals: expected &quot;data:,a&quot; but got &quot;data:,b&quot;
</del><ins>+PASS &lt;picture&gt;&lt;source srcset=&quot;data:,b&quot; media=&quot;all and !&quot;&gt;&lt;img src=&quot;data:,a&quot; data-expect=&quot;data:,a&quot;&gt;&lt;/picture&gt; 
+PASS &lt;picture&gt;&lt;source srcset=&quot;data:,b&quot; media=&quot;all and (!)&quot;&gt;&lt;img src=&quot;data:,a&quot; data-expect=&quot;data:,a&quot;&gt;&lt;/picture&gt; 
</ins><span class="cx"> PASS &lt;picture&gt;&lt;source srcset=&quot;data:,b&quot; media=&quot;not all&quot;&gt;&lt;img src=&quot;data:,a&quot; data-expect=&quot;data:,a&quot;&gt;&lt;/picture&gt; 
</span><span class="cx"> PASS &lt;picture&gt;&lt;source srcset=&quot;data:,b&quot; media=&quot;not all and (min-width:0)&quot;&gt;&lt;img src=&quot;data:,a&quot; data-expect=&quot;data:,a&quot;&gt;&lt;/picture&gt; 
</span><span class="cx"> PASS &lt;picture&gt;&lt;source srcset=&quot;data:,b&quot; media=&quot;not all and (max-width:0)&quot;&gt;&lt;img src=&quot;data:,a&quot; data-expect=&quot;data:,b&quot;&gt;&lt;/picture&gt; 
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> PASS &lt;picture&gt;&lt;source srcset=&quot;data:,b&quot; media=&quot;not all and !&quot;&gt;&lt;img src=&quot;data:,a&quot; data-expect=&quot;data:,a&quot;&gt;&lt;/picture&gt; 
</span><span class="cx"> PASS &lt;picture&gt;&lt;source srcset=&quot;data:,b&quot; media=&quot;not all and (!)&quot;&gt;&lt;img src=&quot;data:,a&quot; data-expect=&quot;data:,a&quot;&gt;&lt;/picture&gt; 
</span><span class="cx"> PASS &lt;picture&gt;&lt;source srcset=&quot;data:,b&quot; media=&quot;all, !&quot;&gt;&lt;img src=&quot;data:,a&quot; data-expect=&quot;data:,b&quot;&gt;&lt;/picture&gt; 
</span><del>-FAIL &lt;picture&gt;&lt;source srcset=&quot;data:,b&quot; media=&quot;,&quot;&gt;&lt;img src=&quot;data:,a&quot; data-expect=&quot;data:,a&quot;&gt;&lt;/picture&gt; assert_equals: expected &quot;data:,a&quot; but got &quot;data:,b&quot;
</del><ins>+PASS &lt;picture&gt;&lt;source srcset=&quot;data:,b&quot; media=&quot;,&quot;&gt;&lt;img src=&quot;data:,a&quot; data-expect=&quot;data:,a&quot;&gt;&lt;/picture&gt; 
</ins><span class="cx"> PASS &lt;picture&gt;&lt;source srcset=&quot;data:,b&quot; media=&quot;, all&quot;&gt;&lt;img src=&quot;data:,a&quot; data-expect=&quot;data:,b&quot;&gt;&lt;/picture&gt; 
</span><span class="cx"> PASS &lt;picture&gt;&lt;source srcset=&quot;data:,b&quot; type=&quot;&quot;&gt;&lt;img src=&quot;data:,a&quot; data-expect=&quot;data:,b&quot;&gt;&lt;/picture&gt; 
</span><span class="cx"> PASS &lt;picture&gt;&lt;source srcset=&quot;data:,b&quot; type=&quot; &quot;&gt;&lt;img src=&quot;data:,a&quot; data-expect=&quot;data:,b&quot;&gt;&lt;/picture&gt; 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/ChangeLog        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,3 +1,106 @@
</span><ins>+2016-11-16  Dave Hyatt  &lt;hyatt@apple.com&gt;
+
+        [CSS Parser] Add @supports, @keyframe and media query parsing options
+        https://bugs.webkit.org/show_bug.cgi?id=164821
+
+        Reviewed by Sam Weinig and Zalan Bujtas.
+
+        * css/CSSKeyframeRule.cpp:
+        (WebCore::StyleKeyframe::setKeyText):
+        * css/CSSKeyframeRule.h:
+        * css/CSSKeyframesRule.cpp:
+        (WebCore::StyleRuleKeyframes::findKeyframeIndex):
+        Changed to call into CSSParserImpls implementation. The new parser
+        is now always used when parsing the key list.
+
+        * css/MediaList.cpp:
+        (WebCore::MediaQuerySet::create):
+        (WebCore::MediaQuerySet::MediaQuerySet):
+        (WebCore::MediaQuerySet::set):
+        (WebCore::MediaQuerySet::add):
+        (WebCore::MediaQuerySet::remove):
+        (WebCore::MediaList::setMediaText):
+        (WebCore::parseMediaDescriptor): Deleted.
+        (WebCore::MediaQuerySet::internalParse): Deleted.
+        (WebCore::MediaQuerySet::parse): Deleted.
+        * css/MediaList.h:
+        Rewritten to remove fallback descriptor support/parsing, since no other
+        browser supports it, and this was part of our initial 2005 landing that
+        nobody else appears to use.  Media queries now call into the new parser always.
+
+        * css/MediaQueryExp.cpp:
+        (WebCore::featureWithValidDensity):
+        (WebCore::featureWithPositiveNumber):
+        (WebCore::MediaQueryExpression::MediaQueryExpression):
+        Make sure to support transform2d, animation and transition.
+
+        * css/StyleMedia.cpp:
+        (WebCore::StyleMedia::matchMedium):
+        Call the normal create now that fallback descriptor syntax is gone.
+
+        * css/parser/CSSParser.cpp:
+        (WebCore::CSSParser::parseKeyframeRule):
+        (WebCore::CSSParser::parseSupportsCondition):
+        (WebCore::CSSParser::parseInlineStyleDeclaration):
+        (WebCore::CSSParser::parseDeclarationDeprecated):
+        (WebCore::CSSParser::parseDeclaration):
+        (WebCore::CSSParser::parseKeyframeKeyList):
+        (WebCore::CSSParser::parseMediaQuery): Deleted.
+        (WebCore::CSSParser::parseKeyframeSelector): Deleted.
+        * css/parser/CSSParser.h:
+        Patched the old parser to have flags to call into the new parser
+        for supports conditions and keyframes. Rename the parseDeclaration that
+        is only used by the old parser to have the word Deprecated in it. Removed
+        the media query and key list parsing functions, since the new parser
+        now does it always.
+
+        * css/parser/CSSParserIdioms.cpp:
+        (WebCore::convertToASCIILowercaseInPlace): Deleted.
+        * css/parser/CSSParserIdioms.h:
+        * css/parser/CSSParserToken.cpp:
+        (WebCore::convertToASCIILowercaseInPlace):
+        (WebCore::CSSParserToken::convertToASCIILowercaseInPlace):
+        * css/parser/CSSParserToken.h:
+        (WebCore::CSSParserToken::value):
+        (WebCore::CSSParserToken::initValueFromStringView):
+        * css/parser/CSSParserValues.cpp:
+        (WebCore::CSSParserSelector::parsePseudoElementSelectorFromStringView):
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::consumeAttr):
+        * css/parser/CSSSelectorParser.cpp:
+        (WebCore::CSSSelectorParser::consumeId):
+        (WebCore::CSSSelectorParser::consumeClass):
+        (WebCore::CSSSelectorParser::consumePseudo):
+        Moving convertToASCIILowercase to be a CSSParserToken member function instead
+        of operating on StringView. This saves an extra step, since the token itself
+        already had all the correct members. Note that converting in-place is bad,
+        and we'll be removing it once the new parser turns on.
+
+        * css/parser/MediaQueryParser.cpp:
+        (WebCore::MediaQueryParser::readMediaType):
+        (WebCore::MediaQueryParser::readFeature):
+        (WebCore::MediaQueryParser::readFeatureEnd):
+        Require the closing &quot;)&quot; on features. Fix the in-place lowercasing to only
+        be done for features, not for types. This matches the old parser.
+
+        * dom/DOMImplementation.cpp:
+        (WebCore::DOMImplementation::createCSSStyleSheet):
+        * dom/InlineStyleSheetOwner.cpp:
+        (WebCore::InlineStyleSheetOwner::createSheet):
+        * html/HTMLLinkElement.cpp:
+        (WebCore::HTMLLinkElement::process):
+        (WebCore::HTMLLinkElement::initializeStyleSheet):
+        * html/HTMLSourceElement.cpp:
+        (WebCore::HTMLSourceElement::parseAttribute):
+        * html/HTMLStyleElement.cpp:
+        (WebCore::HTMLStyleElement::parseAttribute):
+        * html/parser/HTMLPreloadScanner.cpp:
+        (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
+        * html/parser/HTMLResourcePreloader.cpp:
+        (WebCore::mediaAttributeMatches):
+        Patched to call the normal MediaQuerySet::create and not the one that had fallback
+        descriptor support.
+
</ins><span class="cx"> 2016-11-17  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, attempt to fix link error after r208841 part2
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSKeyframeRulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSKeyframeRule.cpp (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSKeyframeRule.cpp        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/css/CSSKeyframeRule.cpp        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -70,6 +70,16 @@
</span><span class="cx"> 
</span><span class="cx">     return keyText.toString();
</span><span class="cx"> }
</span><ins>+    
+bool StyleKeyframe::setKeyText(const String&amp; keyText)
+{
+    ASSERT(!keyText.isNull());
+    auto keys = CSSParser::parseKeyframeKeyList(keyText);
+    if (!keys || keys-&gt;isEmpty())
+        return false;
+    m_keys = *keys;
+    return true;
+}
</ins><span class="cx"> 
</span><span class="cx"> String StyleKeyframe::cssText() const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSKeyframeRuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSKeyframeRule.h (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSKeyframeRule.h        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/css/CSSKeyframeRule.h        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx">     ~StyleKeyframe();
</span><span class="cx"> 
</span><span class="cx">     String keyText() const;
</span><del>-    void setKeyText(const String&amp; text) { m_keys = CSSParser::parseKeyframeSelector(text); }
</del><ins>+    bool setKeyText(const String&amp;);
</ins><span class="cx">     void setKey(double key)
</span><span class="cx">     {
</span><span class="cx">         ASSERT(m_keys.isEmpty());
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSKeyframesRulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSKeyframesRule.cpp (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSKeyframesRule.cpp        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/css/CSSKeyframesRule.cpp        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -74,10 +74,10 @@
</span><span class="cx"> 
</span><span class="cx"> size_t StyleRuleKeyframes::findKeyframeIndex(const String&amp; key) const
</span><span class="cx"> {
</span><del>-    Vector&lt;double&gt;&amp;&amp; keys = CSSParser::parseKeyframeSelector(key);
</del><ins>+    auto keys = CSSParser::parseKeyframeKeyList(key);
</ins><span class="cx"> 
</span><span class="cx">     for (size_t i = m_keyframes.size(); i--; ) {
</span><del>-        if (m_keyframes[i]-&gt;keys() == keys)
</del><ins>+        if (m_keyframes[i]-&gt;keys() == *keys)
</ins><span class="cx">             return i;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssMediaListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/MediaList.cpp (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/MediaList.cpp        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/css/MediaList.cpp        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include &quot;HTMLParserIdioms.h&quot;
</span><span class="cx"> #include &quot;MediaFeatureNames.h&quot;
</span><span class="cx"> #include &quot;MediaQuery.h&quot;
</span><ins>+#include &quot;MediaQueryParser.h&quot;
</ins><span class="cx"> #include &quot;ScriptableDocumentParser.h&quot;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><span class="cx"> #include &lt;wtf/text/StringBuilder.h&gt;
</span><span class="lines">@@ -64,35 +65,21 @@
</span><span class="cx">  * throw SYNTAX_ERR exception.
</span><span class="cx">  */
</span><span class="cx">     
</span><del>-MediaQuerySet::MediaQuerySet()
-    : m_fallbackToDescriptor(false)
-    , m_lastLine(0)
</del><ins>+Ref&lt;MediaQuerySet&gt; MediaQuerySet::create(const String&amp; mediaString)
</ins><span class="cx"> {
</span><ins>+    if (mediaString.isEmpty())
+        return MediaQuerySet::create();
+    
+    return MediaQueryParser::parseMediaQuerySet(mediaString).releaseNonNull();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-MediaQuerySet::MediaQuerySet(const String&amp; mediaString, bool fallbackToDescriptor)
-    : m_fallbackToDescriptor(fallbackToDescriptor)
-    , m_lastLine(0)
</del><ins>+MediaQuerySet::MediaQuerySet()
+    : m_lastLine(0)
</ins><span class="cx"> {
</span><del>-    bool success = parse(mediaString);
-
-    // FIXME: parsing can fail. The problem with failing constructor is that
-    // we would need additional flag saying MediaList is not valid
-    // Parse can fail only when fallbackToDescriptor == false, i.e when HTML4 media descriptor
-    // forward-compatible syntax is not in use.
-    // DOMImplementationCSS seems to mandate that media descriptors are used
-    // for both HTML and SVG, even though svg:style doesn't use media descriptors
-    // Currently the only places where parsing can fail are
-    // creating &lt;svg:style&gt;, creating css media / import rules from js
-
-    // FIXME: This doesn't make much sense.
-    if (!success)
-        parse(&quot;invalid&quot;);
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> MediaQuerySet::MediaQuerySet(const MediaQuerySet&amp; o)
</span><span class="cx">     : RefCounted()
</span><del>-    , m_fallbackToDescriptor(o.m_fallbackToDescriptor)
</del><span class="cx">     , m_lastLine(o.m_lastLine)
</span><span class="cx">     , m_queries(o.m_queries)
</span><span class="cx"> {
</span><span class="lines">@@ -102,85 +89,62 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static String parseMediaDescriptor(const String&amp; string)
</del><ins>+bool MediaQuerySet::set(const String&amp; mediaString)
</ins><span class="cx"> {
</span><del>-    // http://www.w3.org/TR/REC-html40/types.html#type-media-descriptors
-    // &quot;Each entry is truncated just before the first character that isn't a
-    // US ASCII letter [a-zA-Z] (ISO 10646 hex 41-5a, 61-7a), digit [0-9] (hex 30-39),
-    // or hyphen (hex 2d).&quot;
-    unsigned length = string.length();
-    unsigned i;
-    for (i = 0; i &lt; length; ++i) {
-        auto character = string[i];
-        if (!(isASCIIAlphanumeric(character) || character == '-'))
-            break;
-    }
-    return string.left(i);
</del><ins>+    auto result = create(mediaString);
+    m_queries.swap(result-&gt;m_queries);
+    return true;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Optional&lt;MediaQuery&gt; MediaQuerySet::internalParse(CSSParser&amp; parser, const String&amp; queryString)
</del><ins>+bool MediaQuerySet::add(const String&amp; queryString)
</ins><span class="cx"> {
</span><del>-    if (auto query = parser.parseMediaQuery(queryString))
-        return WTFMove(*query);
-    if (!m_fallbackToDescriptor)
-        return Nullopt;
-    return MediaQuery { MediaQuery::None, parseMediaDescriptor(queryString), Vector&lt;MediaQueryExpression&gt; { } };
</del><ins>+    // To &quot;parse a media query&quot; for a given string means to follow &quot;the parse
+    // a media query list&quot; steps and return &quot;null&quot; if more than one media query
+    // is returned, or else the returned media query.
+    auto result = create(queryString);
+    
+    // Only continue if exactly one media query is found, as described above.
+    if (result-&gt;m_queries.size() != 1)
+        return true;
+    
+    // If comparing with any of the media queries in the collection of media
+    // queries returns true terminate these steps.
+    for (size_t i = 0; i &lt; m_queries.size(); ++i) {
+        if (m_queries[i] == result-&gt;m_queries[0])
+            return true;
+    }
+    
+    m_queries.append(result-&gt;m_queries[0]);
+    return true;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Optional&lt;MediaQuery&gt; MediaQuerySet::internalParse(const String&amp; queryString)
</del><ins>+bool MediaQuerySet::remove(const String&amp; queryStringToRemove)
</ins><span class="cx"> {
</span><del>-    CSSParser parser(HTMLStandardMode);
-    return internalParse(parser, queryString);
-}
-
-bool MediaQuerySet::parse(const String&amp; mediaString)
-{
-    CSSParser parser(HTMLStandardMode);
</del><ins>+    // To &quot;parse a media query&quot; for a given string means to follow &quot;the parse
+    // a media query list&quot; steps and return &quot;null&quot; if more than one media query
+    // is returned, or else the returned media query.
+    auto result = create(queryStringToRemove);
</ins><span class="cx">     
</span><del>-    Vector&lt;MediaQuery&gt; result;
-    Vector&lt;String&gt; list;
-    mediaString.split(',', list);
-    for (auto&amp; listString : list) {
-        String medium = stripLeadingAndTrailingHTMLSpaces(listString);
-        if (medium.isEmpty()) {
-            if (m_fallbackToDescriptor)
-                continue;
-        } else if (auto query = internalParse(parser, medium)) {
-            result.append(WTFMove(query.value()));
-            continue;
</del><ins>+    // Only continue if exactly one media query is found, as described above.
+    if (result-&gt;m_queries.size() != 1)
+        return true;
+    
+    // Remove any media query from the collection of media queries for which
+    // comparing with the media query returns true.
+    bool found = false;
+    
+    // Using signed int here, since for the first value, --i will result in -1.
+    for (int i = 0; i &lt; (int)m_queries.size(); ++i) {
+        if (m_queries[i] == result-&gt;m_queries[0]) {
+            m_queries.remove(i);
+            --i;
+            found = true;
</ins><span class="cx">         }
</span><del>-        return false;
</del><span class="cx">     }
</span><del>-    // &quot;,,,,&quot; falls straight through, but is not valid unless fallback
-    if (!m_fallbackToDescriptor &amp;&amp; list.isEmpty()) {
-        String strippedMediaString = stripLeadingAndTrailingHTMLSpaces(mediaString);
-        if (!strippedMediaString.isEmpty())
-            return false;
-    }
-    m_queries = WTFMove(result);
-    shrinkToFit();
-    return true;
</del><ins>+    
+    return found;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool MediaQuerySet::add(const String&amp; queryString)
-{
-    auto parsedQuery = internalParse(queryString);
-    if (!parsedQuery)
-        return false;
-    m_queries.append(WTFMove(parsedQuery.value()));
-    return true;
-}
-
-bool MediaQuerySet::remove(const String&amp; queryString)
-{
-    auto parsedQuery = internalParse(queryString);
-    if (!parsedQuery)
-        return false;
-    return m_queries.removeFirstMatching([&amp;parsedQuery](auto&amp; query) {
-        return query == parsedQuery.value();
-    });
-}
-
</del><span class="cx"> void MediaQuerySet::addMediaQuery(MediaQuery&amp;&amp; mediaQuery)
</span><span class="cx"> {
</span><span class="cx">     m_queries.append(WTFMove(mediaQuery));
</span><span class="lines">@@ -225,8 +189,7 @@
</span><span class="cx"> ExceptionOr&lt;void&gt; MediaList::setMediaText(const String&amp; value)
</span><span class="cx"> {
</span><span class="cx">     CSSStyleSheet::RuleMutationScope mutationScope(m_parentRule);
</span><del>-    if (!m_mediaQueries-&gt;parse(value))
-        return Exception { SYNTAX_ERR };
</del><ins>+    m_mediaQueries-&gt;set(value);
</ins><span class="cx">     if (m_parentStyleSheet)
</span><span class="cx">         m_parentStyleSheet-&gt;didMutate();
</span><span class="cx">     return { };
</span></span></pre></div>
<a id="trunkSourceWebCorecssMediaListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/MediaList.h (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/MediaList.h        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/css/MediaList.h        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -39,17 +39,12 @@
</span><span class="cx">     {
</span><span class="cx">         return adoptRef(*new MediaQuerySet);
</span><span class="cx">     }
</span><del>-    static Ref&lt;MediaQuerySet&gt; create(const String&amp; mediaString)
-    {
-        return adoptRef(*new MediaQuerySet(mediaString, false));
-    }
-    static Ref&lt;MediaQuerySet&gt; createAllowingDescriptionSyntax(const String&amp; mediaString)
-    {
-        return adoptRef(*new MediaQuerySet(mediaString, true));
-    }
</del><ins>+
+    static WEBCORE_EXPORT Ref&lt;MediaQuerySet&gt; create(const String&amp; mediaString);
+
</ins><span class="cx">     WEBCORE_EXPORT ~MediaQuerySet();
</span><span class="cx"> 
</span><del>-    bool parse(const String&amp;);
</del><ins>+    bool set(const String&amp;);
</ins><span class="cx">     bool add(const String&amp;);
</span><span class="cx">     bool remove(const String&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -68,14 +63,10 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     MediaQuerySet();
</span><del>-    WEBCORE_EXPORT MediaQuerySet(const String&amp; mediaQuery, bool fallbackToDescription);
</del><ins>+    WEBCORE_EXPORT MediaQuerySet(const String&amp; mediaQuery);
</ins><span class="cx">     MediaQuerySet(const MediaQuerySet&amp;);
</span><span class="cx"> 
</span><del>-    Optional&lt;MediaQuery&gt; internalParse(CSSParser&amp;, const String&amp;);
-    Optional&lt;MediaQuery&gt; internalParse(const String&amp;);
-
-    unsigned m_fallbackToDescriptor : 1; // true if failed media query parsing should fallback to media description parsing.
-    signed m_lastLine : 31;
</del><ins>+    signed m_lastLine;
</ins><span class="cx">     Vector&lt;MediaQuery&gt; m_queries;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssMediaQueryExpcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/MediaQueryExp.cpp (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/MediaQueryExp.cpp        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/css/MediaQueryExp.cpp        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> 
</span><span class="cx"> static inline bool featureWithValidDensity(const String&amp; mediaFeature, const CSSParserToken&amp; token)
</span><span class="cx"> {
</span><del>-    if ((token.unitType() != CSSPrimitiveValue::UnitTypes::CSS_DPPX &amp;&amp; token.unitType() != CSSPrimitiveValue::UnitTypes::CSS_DPI &amp;&amp; token.unitType() != CSSPrimitiveValue::UnitTypes::CSS_DPCM) || token.numericValue() &lt;= 0)
</del><ins>+    if (!CSSPrimitiveValue::isResolution(static_cast&lt;CSSPrimitiveValue::UnitTypes&gt;(token.unitType())) || token.numericValue() &lt;= 0)
</ins><span class="cx">         return false;
</span><span class="cx">     
</span><span class="cx">     return mediaFeature == MediaFeatureNames::resolution
</span><span class="lines">@@ -108,7 +108,10 @@
</span><span class="cx">     return mediaFeature == MediaFeatureNames::transform3d
</span><span class="cx">     || mediaFeature == MediaFeatureNames::devicePixelRatio
</span><span class="cx">     || mediaFeature == MediaFeatureNames::maxDevicePixelRatio
</span><del>-    || mediaFeature == MediaFeatureNames::minDevicePixelRatio;
</del><ins>+    || mediaFeature == MediaFeatureNames::minDevicePixelRatio
+    || mediaFeature == MediaFeatureNames::transition
+    || mediaFeature == MediaFeatureNames::animation
+    || mediaFeature == MediaFeatureNames::transform2d;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static inline bool featureWithZeroOrOne(const String&amp; mediaFeature, const CSSParserToken&amp; token)
</span><span class="lines">@@ -334,7 +337,6 @@
</span><span class="cx">         
</span><span class="cx">         m_value = CSSAspectRatioValue::create(numerator.numericValue(), denominator.numericValue());
</span><span class="cx">         m_isValid = true;
</span><del>-
</del><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleMediacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleMedia.cpp (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleMedia.cpp        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/css/StyleMedia.cpp        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -65,9 +65,7 @@
</span><span class="cx"> 
</span><span class="cx">     auto rootStyle = document-&gt;styleScope().resolver().styleForElement(*documentElement, document-&gt;renderStyle(), nullptr, MatchOnlyUserAgentRules).renderStyle;
</span><span class="cx"> 
</span><del>-    auto media = MediaQuerySet::create();
-    if (!media-&gt;parse(query))
-        return false;
</del><ins>+    auto media = MediaQuerySet::create(query);
</ins><span class="cx"> 
</span><span class="cx">     return MediaQueryEvaluator { type(), *document, rootStyle.get() }.evaluate(media.get());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParser.cpp (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParser.cpp        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/css/parser/CSSParser.cpp        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -69,6 +69,7 @@
</span><span class="cx"> #include &quot;CSSSelectorParser.h&quot;
</span><span class="cx"> #include &quot;CSSShadowValue.h&quot;
</span><span class="cx"> #include &quot;CSSStyleSheet.h&quot;
</span><ins>+#include &quot;CSSSupportsParser.h&quot;
</ins><span class="cx"> #include &quot;CSSTimingFunctionValue.h&quot;
</span><span class="cx"> #include &quot;CSSTokenizer.h&quot;
</span><span class="cx"> #include &quot;CSSUnicodeRangeValue.h&quot;
</span><span class="lines">@@ -404,6 +405,11 @@
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;StyleKeyframe&gt; CSSParser::parseKeyframeRule(StyleSheetContents* sheet, const String&amp; string)
</span><span class="cx"> {
</span><ins>+    if (m_context.useNewParser &amp;&amp; m_context.mode != UASheetMode) {
+        RefPtr&lt;StyleRuleBase&gt; keyframe = CSSParserImpl::parseRule(string, m_context, nullptr, CSSParserImpl::KeyframeRules);
+        return downcast&lt;StyleKeyframe&gt;(keyframe.get());
+    }
+
</ins><span class="cx">     setStyleSheet(sheet);
</span><span class="cx">     setupParser(&quot;@-webkit-keyframe-rule{ &quot;, string, &quot;} &quot;);
</span><span class="cx">     cssyyparse(this);
</span><span class="lines">@@ -410,12 +416,19 @@
</span><span class="cx">     return m_keyframe;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool CSSParser::parseSupportsCondition(const String&amp; string)
</del><ins>+bool CSSParser::parseSupportsCondition(const String&amp; condition)
</ins><span class="cx"> {
</span><ins>+    if (m_context.useNewParser &amp;&amp; m_context.mode != UASheetMode) {
+        CSSTokenizer::Scope scope(condition);
+        CSSParserTokenRange range = scope.tokenRange();
+        CSSParserImpl parser(strictCSSParserContext());
+        return CSSSupportsParser::supportsCondition(range, parser) == CSSSupportsParser::Supported;
+    }
+
</ins><span class="cx">     m_supportsCondition = false;
</span><span class="cx">     // can't use { because tokenizer state switches from supports to initial state when it sees { token.
</span><span class="cx">     // instead insert one &quot; &quot; (which is WHITESPACE in CSSGrammar.y)
</span><del>-    setupParser(&quot;@-webkit-supports-condition &quot;, string, &quot;} &quot;);
</del><ins>+    setupParser(&quot;@-webkit-supports-condition &quot;, condition, &quot;} &quot;);
</ins><span class="cx">     cssyyparse(this);
</span><span class="cx">     return m_supportsCondition;
</span><span class="cx"> }
</span><span class="lines">@@ -1440,11 +1453,13 @@
</span><span class="cx">     if (context.useNewParser)
</span><span class="cx">         return CSSParserImpl::parseInlineStyleDeclaration(string, element);
</span><span class="cx"> 
</span><del>-    return CSSParser(context).parseDeclaration(string, nullptr);
</del><ins>+    return CSSParser(context).parseDeclarationDeprecated(string, nullptr);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;ImmutableStyleProperties&gt; CSSParser::parseDeclaration(const String&amp; string, StyleSheetContents* contextStyleSheet)
</del><ins>+Ref&lt;ImmutableStyleProperties&gt; CSSParser::parseDeclarationDeprecated(const String&amp; string, StyleSheetContents* contextStyleSheet)
</ins><span class="cx"> {
</span><ins>+    ASSERT(!m_context.useNewParser);
+    
</ins><span class="cx">     setStyleSheet(contextStyleSheet);
</span><span class="cx"> 
</span><span class="cx">     setupParser(&quot;@-webkit-decls{&quot;, string, &quot;} &quot;);
</span><span class="lines">@@ -1459,6 +1474,9 @@
</span><span class="cx"> 
</span><span class="cx"> bool CSSParser::parseDeclaration(MutableStyleProperties&amp; declaration, const String&amp; string, RefPtr&lt;CSSRuleSourceData&gt;&amp;&amp; ruleSourceData, StyleSheetContents* contextStyleSheet)
</span><span class="cx"> {
</span><ins>+    if (m_context.useNewParser &amp;&amp; m_context.mode != UASheetMode)
+        return CSSParserImpl::parseDeclarationList(&amp;declaration, string, m_context);
+
</ins><span class="cx">     // Length of the &quot;@-webkit-decls{&quot; prefix.
</span><span class="cx">     static const unsigned prefixLength = 15;
</span><span class="cx"> 
</span><span class="lines">@@ -1497,21 +1515,6 @@
</span><span class="cx">     return ok;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;MediaQuery&gt; CSSParser::parseMediaQuery(const String&amp; string)
-{
-    if (string.isEmpty())
-        return nullptr;
-
-    ASSERT(!m_mediaQuery);
-
-    // can't use { because tokenizer state switches from mediaquery to initial state when it sees { token.
-    // instead insert one &quot; &quot; (which is WHITESPACE in CSSGrammar.y)
-    setupParser(&quot;@-webkit-mediaquery &quot;, string, &quot;} &quot;);
-    cssyyparse(this);
-
-    return WTFMove(m_mediaQuery);
-}
-
</del><span class="cx"> static inline void filterProperties(bool important, const ParsedPropertyVector&amp; input, Vector&lt;CSSProperty, 256&gt;&amp; output, size_t&amp; unusedEntries, std::bitset&lt;numCSSProperties&gt;&amp; seenProperties, HashSet&lt;AtomicString&gt;&amp; seenCustomProperties)
</span><span class="cx"> {
</span><span class="cx">     // Add properties in reverse order so that highest priority definitions are reached first. Duplicate definitions can then be ignored when found.
</span><span class="lines">@@ -4943,34 +4946,9 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /* static */
</span><del>-Vector&lt;double&gt; CSSParser::parseKeyframeSelector(const String&amp; selector) {
-    Vector&lt;double&gt; keys;
-    Vector&lt;String&gt; strings;
-    selector.split(',', strings);
-
-    keys.reserveInitialCapacity(strings.size());
-    for (size_t i = 0; i &lt; strings.size(); ++i) {
-        double key = -1;
-        String cur = strings[i].stripWhiteSpace();
-
-        // For now the syntax MUST be 'xxx%' or 'from' or 'to', where xxx is a legal floating point number
-        if (equalLettersIgnoringASCIICase(cur, &quot;from&quot;))
-            key = 0;
-        else if (equalLettersIgnoringASCIICase(cur, &quot;to&quot;))
-            key = 1;
-        else if (cur.endsWith('%')) {
-            double k = cur.substring(0, cur.length() - 1).toDouble();
-            if (k &gt;= 0 &amp;&amp; k &lt;= 100)
-                key = k / 100;
-        }
-        if (key &lt; 0) {
-            keys.clear();
-            break;
-        }
-        keys.uncheckedAppend(key);
-    }
-
-    return keys;
</del><ins>+std::unique_ptr&lt;Vector&lt;double&gt;&gt; CSSParser::parseKeyframeKeyList(const String&amp; selector)
+{
+    return CSSParserImpl::parseKeyframeKeyList(selector);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool CSSParser::parseTransformOriginShorthand(RefPtr&lt;CSSPrimitiveValue&gt;&amp; value1, RefPtr&lt;CSSPrimitiveValue&gt;&amp; value2, RefPtr&lt;CSSValue&gt;&amp; value3)
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParser.h (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParser.h        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/css/parser/CSSParser.h        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -143,7 +143,6 @@
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT bool parseDeclaration(MutableStyleProperties&amp;, const String&amp;, RefPtr&lt;CSSRuleSourceData&gt;&amp;&amp;, StyleSheetContents* contextStyleSheet);
</span><span class="cx">     static Ref&lt;ImmutableStyleProperties&gt; parseInlineStyleDeclaration(const String&amp;, Element*);
</span><del>-    std::unique_ptr&lt;MediaQuery&gt; parseMediaQuery(const String&amp;);
</del><span class="cx"> 
</span><span class="cx">     void addProperty(CSSPropertyID, RefPtr&lt;CSSValue&gt;&amp;&amp;, bool important, bool implicit = false);
</span><span class="cx">     void rollbackLastProperties(int num);
</span><span class="lines">@@ -207,7 +206,7 @@
</span><span class="cx"> #if ENABLE(CSS_ANIMATIONS_LEVEL_2)
</span><span class="cx">     RefPtr&lt;CSSValue&gt; parseAnimationTrigger();
</span><span class="cx"> #endif
</span><del>-    static Vector&lt;double&gt; parseKeyframeSelector(const String&amp;);
</del><ins>+    static std::unique_ptr&lt;Vector&lt;double&gt;&gt; parseKeyframeKeyList(const String&amp;);
</ins><span class="cx"> 
</span><span class="cx">     bool parseTransformOriginShorthand(RefPtr&lt;CSSPrimitiveValue&gt;&amp;, RefPtr&lt;CSSPrimitiveValue&gt;&amp;, RefPtr&lt;CSSValue&gt;&amp;);
</span><span class="cx">     Optional&lt;double&gt; parseCubicBezierTimingFunctionValue(CSSParserValueList&amp;);
</span><span class="lines">@@ -592,7 +591,9 @@
</span><span class="cx">     bool parseGeneratedImage(CSSParserValueList&amp;, RefPtr&lt;CSSValue&gt;&amp;);
</span><span class="cx"> 
</span><span class="cx">     ParseResult parseValue(MutableStyleProperties&amp;, CSSPropertyID, const String&amp;, bool important, StyleSheetContents* contextStyleSheet);
</span><del>-    Ref&lt;ImmutableStyleProperties&gt; parseDeclaration(const String&amp;, StyleSheetContents* contextStyleSheet);
</del><ins>+    
+    // FIXME-NEWPARSER: Remove once old parser is gone.
+    Ref&lt;ImmutableStyleProperties&gt; parseDeclarationDeprecated(const String&amp;, StyleSheetContents* contextStyleSheet);
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;CSSBasicShapeInset&gt; parseInsetRoundedCorners(Ref&lt;CSSBasicShapeInset&gt;&amp;&amp;, CSSParserValueList&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserIdiomscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserIdioms.cpp (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserIdioms.cpp        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/css/parser/CSSParserIdioms.cpp        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -34,22 +34,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-template&lt;typename CharacterType&gt; ALWAYS_INLINE static void convertToASCIILowercaseInPlace(CharacterType* characters, unsigned length)
-{
-    for (unsigned i = 0; i &lt; length; ++i)
-        characters[i] = toASCIILower(characters[i]);
-}
-
-// FIXME-NEWPARSER: Would like to get rid of this operation. Blink uses HTMLParser static lowercase
-// string hashing, but we don't have that code in our HTMLParser.
-void convertToASCIILowercaseInPlace(StringView&amp; stringView)
-{
-    if (stringView.is8Bit())
-        WebCore::convertToASCIILowercaseInPlace(const_cast&lt;LChar*&gt;(stringView.characters8()), stringView.length());
-    else
-        WebCore::convertToASCIILowercaseInPlace(const_cast&lt;UChar*&gt;(stringView.characters16()), stringView.length());
-}
-
</del><span class="cx"> bool isValueAllowedInMode(unsigned short id, CSSParserMode mode)
</span><span class="cx"> {
</span><span class="cx">     switch (id) {
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserIdiomsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserIdioms.h (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserIdioms.h        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/css/parser/CSSParserIdioms.h        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -60,8 +60,6 @@
</span><span class="cx">     return isNameStartCodePoint(c) || isASCIIDigit(c) || c == '-';
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void convertToASCIILowercaseInPlace(StringView&amp;);
-
</del><span class="cx"> bool isValueAllowedInMode(unsigned short, CSSParserMode);
</span><span class="cx"> 
</span><span class="cx"> URL completeURL(const CSSParserContext&amp;, const String&amp; url);
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserTokencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserToken.cpp (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserToken.cpp        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/css/parser/CSSParserToken.cpp        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -476,4 +476,23 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+template&lt;typename CharacterType&gt; ALWAYS_INLINE static void convertToASCIILowercaseInPlace(CharacterType* characters, unsigned length)
+{
+    for (unsigned i = 0; i &lt; length; ++i)
+        characters[i] = toASCIILower(characters[i]);
+}
+
+// FIXME-NEWPARSER: Would like to get rid of this operation. Blink uses HTMLParser static lowercase
+// string hashing, but we don't have that code in our HTMLParser.
+void CSSParserToken::convertToASCIILowercaseInPlace()
+{
+    if (!hasStringBacking())
+        return;
+
+    if (m_valueIs8Bit)
+        WebCore::convertToASCIILowercaseInPlace(static_cast&lt;LChar*&gt;(m_valueDataCharRaw), m_valueLength);
+    else
+        WebCore::convertToASCIILowercaseInPlace(static_cast&lt;UChar*&gt;(m_valueDataCharRaw), m_valueLength);
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserTokenh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserToken.h (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserToken.h        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/css/parser/CSSParserToken.h        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -117,10 +117,12 @@
</span><span class="cx">     StringView value() const
</span><span class="cx">     {
</span><span class="cx">         if (m_valueIs8Bit)
</span><del>-            return StringView(reinterpret_cast&lt;const LChar*&gt;(m_valueDataCharRaw), m_valueLength);
-        return StringView(reinterpret_cast&lt;const UChar*&gt;(m_valueDataCharRaw), m_valueLength);
</del><ins>+            return StringView(static_cast&lt;const LChar*&gt;(m_valueDataCharRaw), m_valueLength);
+        return StringView(static_cast&lt;const UChar*&gt;(m_valueDataCharRaw), m_valueLength);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    void convertToASCIILowercaseInPlace();
+
</ins><span class="cx">     UChar delimiter() const;
</span><span class="cx">     NumericSign numericSign() const;
</span><span class="cx">     NumericValueType numericValueType() const;
</span><span class="lines">@@ -146,7 +148,7 @@
</span><span class="cx">     {
</span><span class="cx">         m_valueLength = string.length();
</span><span class="cx">         m_valueIs8Bit = string.is8Bit();
</span><del>-        m_valueDataCharRaw = m_valueIs8Bit ? static_cast&lt;const void*&gt;(string.characters8()) : static_cast&lt;const void*&gt;(string.characters16());
</del><ins>+        m_valueDataCharRaw = m_valueIs8Bit ? const_cast&lt;void*&gt;(static_cast&lt;const void*&gt;(string.characters8())) : const_cast&lt;void*&gt;(static_cast&lt;const void*&gt;(string.characters16()));
</ins><span class="cx">     }
</span><span class="cx">     unsigned m_type : 6; // CSSParserTokenType
</span><span class="cx">     unsigned m_blockType : 2; // BlockType
</span><span class="lines">@@ -160,7 +162,7 @@
</span><span class="cx">     // tightly with the rest of this object for a smaller object size.
</span><span class="cx">     bool m_valueIs8Bit : 1;
</span><span class="cx">     unsigned m_valueLength;
</span><del>-    const void* m_valueDataCharRaw; // Either LChar* or UChar*.
</del><ins>+    void* m_valueDataCharRaw; // Either LChar* or UChar*.
</ins><span class="cx"> 
</span><span class="cx">     union {
</span><span class="cx">         UChar m_delimiter;
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserValuescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserValues.cpp (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserValues.cpp        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/css/parser/CSSParserValues.cpp        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -238,7 +238,6 @@
</span><span class="cx"> 
</span><span class="cx"> CSSParserSelector* CSSParserSelector::parsePseudoElementSelectorFromStringView(StringView&amp; pseudoTypeString)
</span><span class="cx"> {
</span><del>-    convertToASCIILowercaseInPlace(pseudoTypeString);
</del><span class="cx">     AtomicString name = pseudoTypeString.toAtomicString();
</span><span class="cx">     
</span><span class="cx">     CSSSelector::PseudoElementType pseudoType = CSSSelector::parsePseudoElementType(name);
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSPropertyParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1894,11 +1894,11 @@
</span><span class="cx">     if (args.peek().type() != IdentToken)
</span><span class="cx">         return nullptr;
</span><span class="cx">     
</span><del>-    StringView stringView = args.consumeIncludingWhitespace().value();
</del><ins>+    CSSParserToken token = args.consumeIncludingWhitespace();
</ins><span class="cx">     if (context.isHTMLDocument)
</span><del>-        convertToASCIILowercaseInPlace(stringView);
</del><ins>+        token.convertToASCIILowercaseInPlace();
</ins><span class="cx"> 
</span><del>-    String attrName = stringView.toString();
</del><ins>+    String attrName = token.value().toString();
</ins><span class="cx">     if (!args.atEnd())
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSSelectorParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSSelectorParser.cpp (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSSelectorParser.cpp        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/css/parser/CSSSelectorParser.cpp        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -388,10 +388,10 @@
</span><span class="cx">     
</span><span class="cx">     // FIXME-NEWPARSER: Avoid having to do this, but the old parser does and we need
</span><span class="cx">     // to be compatible for now.
</span><del>-    StringView stringView = range.consume().value();
</del><ins>+    CSSParserToken token = range.consume();
</ins><span class="cx">     if (m_context.mode == HTMLQuirksMode)
</span><del>-        convertToASCIILowercaseInPlace(stringView);
-    selector-&gt;setValue(stringView.toAtomicString());
</del><ins>+        token.convertToASCIILowercaseInPlace();
+    selector-&gt;setValue(token.value().toAtomicString());
</ins><span class="cx"> 
</span><span class="cx">     return selector;
</span><span class="cx"> }
</span><span class="lines">@@ -408,10 +408,10 @@
</span><span class="cx">     
</span><span class="cx">     // FIXME-NEWPARSER: Avoid having to do this, but the old parser does and we need
</span><span class="cx">     // to be compatible for now.
</span><del>-    StringView stringView = range.consume().value();
</del><ins>+    CSSParserToken token = range.consume();
</ins><span class="cx">     if (m_context.mode == HTMLQuirksMode)
</span><del>-        convertToASCIILowercaseInPlace(stringView);
-    selector-&gt;setValue(stringView.toAtomicString());
</del><ins>+        token.convertToASCIILowercaseInPlace();
+    selector-&gt;setValue(token.value().toAtomicString());
</ins><span class="cx"> 
</span><span class="cx">     return selector;
</span><span class="cx"> }
</span><span class="lines">@@ -513,6 +513,10 @@
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="cx">     std::unique_ptr&lt;CSSParserSelector&gt; selector;
</span><ins>+    
+    // FIXME-NEWPARSER: Would like to eliminate this.
+    const_cast&lt;CSSParserToken&amp;&gt;(token).convertToASCIILowercaseInPlace();
+    
</ins><span class="cx">     StringView value = token.value();
</span><span class="cx">     
</span><span class="cx">     // FIXME-NEWPARSER: We can't change the pseudoclass/element maps that the old parser
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserMediaQueryParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/MediaQueryParser.cpp (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/MediaQueryParser.cpp        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/css/parser/MediaQueryParser.cpp        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -121,9 +121,7 @@
</span><span class="cx">             &amp;&amp; isRestrictorOrLogicalOperator(token)) {
</span><span class="cx">             m_state = SkipUntilComma;
</span><span class="cx">         } else {
</span><del>-            StringView stringView = token.value();
-            convertToASCIILowercaseInPlace(stringView);
-            m_mediaQueryData.setMediaType(stringView.toString());
</del><ins>+            m_mediaQueryData.setMediaType(token.value().toString());
</ins><span class="cx">             m_state = ReadAnd;
</span><span class="cx">         }
</span><span class="cx">     } else if (type == EOFToken &amp;&amp; (!m_querySet-&gt;queryVector().size() || m_state != ReadRestrictor))
</span><span class="lines">@@ -168,6 +166,8 @@
</span><span class="cx"> void MediaQueryParser::readFeature(CSSParserTokenType type, const CSSParserToken&amp; token)
</span><span class="cx"> {
</span><span class="cx">     if (type == IdentToken) {
</span><ins>+        // FIXME-NEWPARSER: Find a way to avoid this.
+        const_cast&lt;CSSParserToken&amp;&gt;(token).convertToASCIILowercaseInPlace();
</ins><span class="cx">         m_mediaQueryData.setMediaFeature(token.value().toString());
</span><span class="cx">         m_state = ReadFeatureColon;
</span><span class="cx">     } else
</span><span class="lines">@@ -199,7 +199,7 @@
</span><span class="cx"> void MediaQueryParser::readFeatureEnd(CSSParserTokenType type, const CSSParserToken&amp; token)
</span><span class="cx"> {
</span><span class="cx">     if (type == RightParenthesisToken || type == EOFToken) {
</span><del>-        if (m_mediaQueryData.addExpression())
</del><ins>+        if (type != EOFToken &amp;&amp; m_mediaQueryData.addExpression())
</ins><span class="cx">             m_state = ReadAnd;
</span><span class="cx">         else
</span><span class="cx">             m_state = SkipUntilComma;
</span></span></pre></div>
<a id="trunkSourceWebCoredomDOMImplementationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DOMImplementation.cpp (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DOMImplementation.cpp        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/dom/DOMImplementation.cpp        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx">     // FIXME: Title should be set.
</span><span class="cx">     // FIXME: Media could have wrong syntax, in which case we should generate an exception.
</span><span class="cx">     auto sheet = CSSStyleSheet::create(StyleSheetContents::create());
</span><del>-    sheet-&gt;setMediaQueries(MediaQuerySet::createAllowingDescriptionSyntax(media));
</del><ins>+    sheet-&gt;setMediaQueries(MediaQuerySet::create(media));
</ins><span class="cx">     return sheet;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomInlineStyleSheetOwnercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -170,11 +170,7 @@
</span><span class="cx">     if (!contentSecurityPolicy.allowInlineStyle(document.url(), m_startTextPosition.m_line, text, hasKnownNonce))
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    RefPtr&lt;MediaQuerySet&gt; mediaQueries;
-    if (element.isHTMLElement())
-        mediaQueries = MediaQuerySet::createAllowingDescriptionSyntax(m_media);
-    else
-        mediaQueries = MediaQuerySet::create(m_media);
</del><ins>+    RefPtr&lt;MediaQuerySet&gt; mediaQueries = MediaQuerySet::create(m_media);
</ins><span class="cx"> 
</span><span class="cx">     MediaQueryEvaluator screenEval(ASCIILiteral(&quot;screen&quot;), true);
</span><span class="cx">     MediaQueryEvaluator printEval(ASCIILiteral(&quot;print&quot;), true);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLLinkElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLLinkElement.cpp (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLLinkElement.cpp        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/html/HTMLLinkElement.cpp        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -254,7 +254,7 @@
</span><span class="cx">             Optional&lt;RenderStyle&gt; documentStyle;
</span><span class="cx">             if (document().hasLivingRenderTree())
</span><span class="cx">                 documentStyle = Style::resolveForDocument(document());
</span><del>-            auto media = MediaQuerySet::createAllowingDescriptionSyntax(m_media);
</del><ins>+            auto media = MediaQuerySet::create(m_media);
</ins><span class="cx">             mediaQueryMatches = MediaQueryEvaluator { document().frame()-&gt;view()-&gt;mediaType(), document(), documentStyle ? &amp;*documentStyle : nullptr }.evaluate(media.get());
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -348,7 +348,7 @@
</span><span class="cx">         originClean = cachedStyleSheet.isCORSSameOrigin();
</span><span class="cx"> 
</span><span class="cx">     m_sheet = CSSStyleSheet::create(WTFMove(styleSheet), *this, originClean);
</span><del>-    m_sheet-&gt;setMediaQueries(MediaQuerySet::createAllowingDescriptionSyntax(m_media));
</del><ins>+    m_sheet-&gt;setMediaQueries(MediaQuerySet::create(m_media));
</ins><span class="cx">     m_sheet-&gt;setTitle(title());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLSourceElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLSourceElement.cpp (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLSourceElement.cpp        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/html/HTMLSourceElement.cpp        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -181,7 +181,7 @@
</span><span class="cx">     HTMLElement::parseAttribute(name, value);
</span><span class="cx">     if (name == srcsetAttr || name == sizesAttr || name == mediaAttr || name == typeAttr) {
</span><span class="cx">         if (name == mediaAttr)
</span><del>-            m_mediaQuerySet = MediaQuerySet::createAllowingDescriptionSyntax(value);
</del><ins>+            m_mediaQuerySet = MediaQuerySet::create(value);
</ins><span class="cx">         auto* parent = parentNode();
</span><span class="cx">         if (is&lt;HTMLPictureElement&gt;(parent))
</span><span class="cx">             downcast&lt;HTMLPictureElement&gt;(*parent).sourcesChanged();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLStyleElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLStyleElement.cpp (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLStyleElement.cpp        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/html/HTMLStyleElement.cpp        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx">     else if (name == mediaAttr) {
</span><span class="cx">         m_styleSheetOwner.setMedia(value);
</span><span class="cx">         if (sheet()) {
</span><del>-            sheet()-&gt;setMediaQueries(MediaQuerySet::createAllowingDescriptionSyntax(value));
</del><ins>+            sheet()-&gt;setMediaQueries(MediaQuerySet::create(value));
</ins><span class="cx">             if (auto* scope = m_styleSheetOwner.styleScope())
</span><span class="cx">                 scope-&gt;didChangeStyleSheetContents();
</span><span class="cx">         } else
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlparserHTMLPreloadScannercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/parser/HTMLPreloadScanner.cpp (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/parser/HTMLPreloadScanner.cpp        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/html/parser/HTMLPreloadScanner.cpp        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -204,7 +204,7 @@
</span><span class="cx">             }
</span><span class="cx">             if (match(attributeName, mediaAttr) &amp;&amp; m_mediaAttribute.isNull()) {
</span><span class="cx">                 m_mediaAttribute = attributeValue;
</span><del>-                auto mediaSet = MediaQuerySet::createAllowingDescriptionSyntax(attributeValue);
</del><ins>+                auto mediaSet = MediaQuerySet::create(attributeValue);
</ins><span class="cx">                 auto* documentElement = document.documentElement();
</span><span class="cx">                 m_mediaMatched = MediaQueryEvaluator { document.printing() ? &quot;print&quot; : &quot;screen&quot;, document, documentElement ? documentElement-&gt;computedStyle() : nullptr }.evaluate(mediaSet.get());
</span><span class="cx">             }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlparserHTMLResourcePreloadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/parser/HTMLResourcePreloader.cpp (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/parser/HTMLResourcePreloader.cpp        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebCore/html/parser/HTMLResourcePreloader.cpp        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx"> 
</span><span class="cx"> static bool mediaAttributeMatches(Document&amp; document, const RenderStyle* renderStyle, const String&amp; attributeValue)
</span><span class="cx"> {
</span><del>-    auto mediaQueries = MediaQuerySet::createAllowingDescriptionSyntax(attributeValue);
</del><ins>+    auto mediaQueries = MediaQuerySet::create(attributeValue);
</ins><span class="cx">     return MediaQueryEvaluator { &quot;screen&quot;, document, renderStyle }.evaluate(mediaQueries.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-11-16  Dave Hyatt  &lt;hyatt@apple.com&gt;
+
+        [CSS Parser] Add @supports, @keyframe and media query parsing options
+        https://bugs.webkit.org/show_bug.cgi?id=164821
+
+        Reviewed by Sam Weinig and Zalan Bujtas.
+
+        Fix up the create call now that fallback descriptor syntax is gone.
+
+        * DOM/DOM.mm:
+        (-[DOMHTMLLinkElement _mediaQueryMatches]):
+
</ins><span class="cx"> 2016-11-17  Saam Barati  &lt;sbarati@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove async/await compile time flag and enable tests
</span></span></pre></div>
<a id="trunkSourceWebKitmacDOMDOMmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/DOM/DOM.mm (208846 => 208847)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/DOM/DOM.mm        2016-11-17 17:21:43 UTC (rev 208846)
+++ trunk/Source/WebKit/mac/DOM/DOM.mm        2016-11-17 17:28:52 UTC (rev 208847)
</span><span class="lines">@@ -755,7 +755,7 @@
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="cx">     Document&amp; document = link.document();
</span><del>-    auto mediaQuerySet = MediaQuerySet::createAllowingDescriptionSyntax(media);
</del><ins>+    auto mediaQuerySet = MediaQuerySet::create(media);
</ins><span class="cx">     return MediaQueryEvaluator { &quot;screen&quot;, document, document.renderView() ? &amp;document.renderView()-&gt;style() : nullptr }.evaluate(mediaQuerySet.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>