<!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>[179055] 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/179055">179055</a></dd>
<dt>Author</dt> <dd>benjamin@webkit.org</dd>
<dt>Date</dt> <dd>2015-01-23 20:15:56 -0800 (Fri, 23 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add pointer/hover media queries
https://bugs.webkit.org/show_bug.cgi?id=134822

Patch by Benjamin Poulain &lt;bpoulain@apple.com&gt; on 2015-01-23
Reviewed by Antti Koivisto.

Source/WebCore:

Media Queries Level 4 introduces two types of Interaction Media Features:
&quot;pointer&quot; and &quot;hover&quot;. Those media features are useful for adapting the design
to the type of input:
    http://dev.w3.org/csswg/mediaqueries-4/#mf-interaction

This implementation is trivial: just #ifdef the return value depending on
the support for touch events.
In the future we should move that to a client interface but let's start easy
for now.

Tests: fast/media/mq-any-hover-cssom.html
       fast/media/mq-any-hover-invalid.html
       fast/media/mq-any-hover-matchMedia.html
       fast/media/mq-any-hover-styling.html
       fast/media/mq-any-pointer-cssom.html
       fast/media/mq-any-pointer-invalid.html
       fast/media/mq-any-pointer-matchMedia.html
       fast/media/mq-any-pointer-styling.html
       fast/media/mq-hover-cssom.html
       fast/media/mq-hover-invalid.html
       fast/media/mq-hover-matchMedia.html
       fast/media/mq-hover-styling.html
       fast/media/mq-pointer-cssom.html
       fast/media/mq-pointer-invalid.html
       fast/media/mq-pointer-matchMedia.html
       fast/media/mq-pointer-styling.html

* css/CSSValueKeywords.in:
* css/MediaFeatureNames.h:
* css/MediaQueryEvaluator.cpp:
(WebCore::hoverMediaFeatureEval):
(WebCore::any_hoverMediaFeatureEval):
(WebCore::pointerMediaFeatureEval):
(WebCore::any_pointerMediaFeatureEval):
(WebCore::leastCapablePrimaryPointerDeviceType): Deleted.
* css/MediaQueryExp.cpp:
(WebCore::featureWithCSSValueID):
(WebCore::featureWithZeroOrOne):
(WebCore::featureWithoutValue):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
(WebCore::EventHandler::fakeMouseMoveEventTimerFired):
* page/Settings.in:

LayoutTests:

* fast/media/mq-any-hover-cssom-expected.txt: Added.
* fast/media/mq-any-hover-cssom.html: Added.
* fast/media/mq-any-hover-invalid-expected.txt: Added.
* fast/media/mq-any-hover-invalid.html: Added.
* fast/media/mq-any-hover-matchMedia-expected.txt: Added.
* fast/media/mq-any-hover-matchMedia.html: Added.
* fast/media/mq-any-hover-styling-expected.txt: Added.
* fast/media/mq-any-hover-styling.html: Added.
* fast/media/mq-any-pointer-cssom-expected.txt: Added.
* fast/media/mq-any-pointer-cssom.html: Added.
* fast/media/mq-any-pointer-invalid-expected.txt: Added.
* fast/media/mq-any-pointer-invalid.html: Added.
* fast/media/mq-any-pointer-matchMedia-expected.txt: Added.
* fast/media/mq-any-pointer-matchMedia.html: Added.
* fast/media/mq-any-pointer-styling-expected.txt: Added.
* fast/media/mq-any-pointer-styling.html: Added.
* fast/media/mq-hover-cssom-expected.txt: Added.
* fast/media/mq-hover-cssom.html: Added.
* fast/media/mq-hover-invalid-expected.txt: Added.
* fast/media/mq-hover-invalid.html: Added.
* fast/media/mq-hover-matchMedia-expected.txt: Added.
* fast/media/mq-hover-matchMedia.html: Added.
* fast/media/mq-hover-styling-expected.txt: Added.
* fast/media/mq-hover-styling.html: Added.
* fast/media/mq-pointer-cssom-expected.txt: Added.
* fast/media/mq-pointer-cssom.html: Added.
* fast/media/mq-pointer-expected.txt:
* fast/media/mq-pointer-invalid-expected.txt: Added.
* fast/media/mq-pointer-invalid.html: Added.
* fast/media/mq-pointer-matchMedia-expected.txt: Added.
* fast/media/mq-pointer-matchMedia.html: Added.
* fast/media/mq-pointer-styling-expected.txt: Added.
* fast/media/mq-pointer-styling.html: Added.
* fast/media/mq-pointer.html:
* platform/ios-simulator/fast/media/mq-any-hover-matchMedia-expected.txt: Added.
* platform/ios-simulator/fast/media/mq-any-hover-styling-expected.txt: Added.
* platform/ios-simulator/fast/media/mq-any-pointer-matchMedia-expected.txt: Added.
* platform/ios-simulator/fast/media/mq-any-pointer-styling-expected.txt: Added.
* platform/ios-simulator/fast/media/mq-hover-matchMedia-expected.txt: Added.
* platform/ios-simulator/fast/media/mq-hover-styling-expected.txt: Added.
* platform/ios-simulator/fast/media/mq-pointer-expected.txt: Added.
* platform/ios-simulator/fast/media/mq-pointer-matchMedia-expected.txt: Added.
* platform/ios-simulator/fast/media/mq-pointer-styling-expected.txt: Added.</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="#trunkLayoutTestsfastmediamqpointerhtml">trunk/LayoutTests/fast/media/mq-pointer.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueKeywordsin">trunk/Source/WebCore/css/CSSValueKeywords.in</a></li>
<li><a href="#trunkSourceWebCorecssMediaFeatureNamesh">trunk/Source/WebCore/css/MediaFeatureNames.h</a></li>
<li><a href="#trunkSourceWebCorecssMediaQueryEvaluatorcpp">trunk/Source/WebCore/css/MediaQueryEvaluator.cpp</a></li>
<li><a href="#trunkSourceWebCorecssMediaQueryExpcpp">trunk/Source/WebCore/css/MediaQueryExp.cpp</a></li>
<li><a href="#trunkSourceWebCorepageEventHandlercpp">trunk/Source/WebCore/page/EventHandler.cpp</a></li>
<li><a href="#trunkSourceWebCorepageSettingsin">trunk/Source/WebCore/page/Settings.in</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastmediamqanyhovercssomexpectedtxt">trunk/LayoutTests/fast/media/mq-any-hover-cssom-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediamqanyhovercssomhtml">trunk/LayoutTests/fast/media/mq-any-hover-cssom.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqanyhoverinvalidexpectedtxt">trunk/LayoutTests/fast/media/mq-any-hover-invalid-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediamqanyhoverinvalidhtml">trunk/LayoutTests/fast/media/mq-any-hover-invalid.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqanyhovermatchMediaexpectedtxt">trunk/LayoutTests/fast/media/mq-any-hover-matchMedia-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediamqanyhovermatchMediahtml">trunk/LayoutTests/fast/media/mq-any-hover-matchMedia.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqanyhoverstylingexpectedtxt">trunk/LayoutTests/fast/media/mq-any-hover-styling-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediamqanyhoverstylinghtml">trunk/LayoutTests/fast/media/mq-any-hover-styling.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqanypointercssomexpectedtxt">trunk/LayoutTests/fast/media/mq-any-pointer-cssom-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediamqanypointercssomhtml">trunk/LayoutTests/fast/media/mq-any-pointer-cssom.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqanypointerinvalidexpectedtxt">trunk/LayoutTests/fast/media/mq-any-pointer-invalid-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediamqanypointerinvalidhtml">trunk/LayoutTests/fast/media/mq-any-pointer-invalid.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqanypointermatchMediaexpectedtxt">trunk/LayoutTests/fast/media/mq-any-pointer-matchMedia-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediamqanypointermatchMediahtml">trunk/LayoutTests/fast/media/mq-any-pointer-matchMedia.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqanypointerstylingexpectedtxt">trunk/LayoutTests/fast/media/mq-any-pointer-styling-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediamqanypointerstylinghtml">trunk/LayoutTests/fast/media/mq-any-pointer-styling.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqhovercssomexpectedtxt">trunk/LayoutTests/fast/media/mq-hover-cssom-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediamqhovercssomhtml">trunk/LayoutTests/fast/media/mq-hover-cssom.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqhoverinvalidexpectedtxt">trunk/LayoutTests/fast/media/mq-hover-invalid-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediamqhoverinvalidhtml">trunk/LayoutTests/fast/media/mq-hover-invalid.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqhovermatchMediaexpectedtxt">trunk/LayoutTests/fast/media/mq-hover-matchMedia-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediamqhovermatchMediahtml">trunk/LayoutTests/fast/media/mq-hover-matchMedia.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqhoverstylingexpectedtxt">trunk/LayoutTests/fast/media/mq-hover-styling-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediamqhoverstylinghtml">trunk/LayoutTests/fast/media/mq-hover-styling.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqpointercssomexpectedtxt">trunk/LayoutTests/fast/media/mq-pointer-cssom-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediamqpointercssomhtml">trunk/LayoutTests/fast/media/mq-pointer-cssom.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqpointerinvalidexpectedtxt">trunk/LayoutTests/fast/media/mq-pointer-invalid-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediamqpointerinvalidhtml">trunk/LayoutTests/fast/media/mq-pointer-invalid.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqpointermatchMediaexpectedtxt">trunk/LayoutTests/fast/media/mq-pointer-matchMedia-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediamqpointermatchMediahtml">trunk/LayoutTests/fast/media/mq-pointer-matchMedia.html</a></li>
<li><a href="#trunkLayoutTestsfastmediamqpointerstylingexpectedtxt">trunk/LayoutTests/fast/media/mq-pointer-styling-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediamqpointerstylinghtml">trunk/LayoutTests/fast/media/mq-pointer-styling.html</a></li>
<li>trunk/LayoutTests/platform/ios-simulator/fast/media/</li>
<li><a href="#trunkLayoutTestsplatformiossimulatorfastmediamqanyhovermatchMediaexpectedtxt">trunk/LayoutTests/platform/ios-simulator/fast/media/mq-any-hover-matchMedia-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorfastmediamqanyhoverstylingexpectedtxt">trunk/LayoutTests/platform/ios-simulator/fast/media/mq-any-hover-styling-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorfastmediamqanypointermatchMediaexpectedtxt">trunk/LayoutTests/platform/ios-simulator/fast/media/mq-any-pointer-matchMedia-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorfastmediamqanypointerstylingexpectedtxt">trunk/LayoutTests/platform/ios-simulator/fast/media/mq-any-pointer-styling-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorfastmediamqhovermatchMediaexpectedtxt">trunk/LayoutTests/platform/ios-simulator/fast/media/mq-hover-matchMedia-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorfastmediamqhoverstylingexpectedtxt">trunk/LayoutTests/platform/ios-simulator/fast/media/mq-hover-styling-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorfastmediamqpointerexpectedtxt">trunk/LayoutTests/platform/ios-simulator/fast/media/mq-pointer-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorfastmediamqpointermatchMediaexpectedtxt">trunk/LayoutTests/platform/ios-simulator/fast/media/mq-pointer-matchMedia-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorfastmediamqpointerstylingexpectedtxt">trunk/LayoutTests/platform/ios-simulator/fast/media/mq-pointer-styling-expected.txt</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (179054 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-01-24 03:05:36 UTC (rev 179054)
+++ trunk/LayoutTests/ChangeLog        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -1,3 +1,54 @@
</span><ins>+2015-01-23  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
+
+        Add pointer/hover media queries
+        https://bugs.webkit.org/show_bug.cgi?id=134822
+
+        Reviewed by Antti Koivisto.
+
+        * fast/media/mq-any-hover-cssom-expected.txt: Added.
+        * fast/media/mq-any-hover-cssom.html: Added.
+        * fast/media/mq-any-hover-invalid-expected.txt: Added.
+        * fast/media/mq-any-hover-invalid.html: Added.
+        * fast/media/mq-any-hover-matchMedia-expected.txt: Added.
+        * fast/media/mq-any-hover-matchMedia.html: Added.
+        * fast/media/mq-any-hover-styling-expected.txt: Added.
+        * fast/media/mq-any-hover-styling.html: Added.
+        * fast/media/mq-any-pointer-cssom-expected.txt: Added.
+        * fast/media/mq-any-pointer-cssom.html: Added.
+        * fast/media/mq-any-pointer-invalid-expected.txt: Added.
+        * fast/media/mq-any-pointer-invalid.html: Added.
+        * fast/media/mq-any-pointer-matchMedia-expected.txt: Added.
+        * fast/media/mq-any-pointer-matchMedia.html: Added.
+        * fast/media/mq-any-pointer-styling-expected.txt: Added.
+        * fast/media/mq-any-pointer-styling.html: Added.
+        * fast/media/mq-hover-cssom-expected.txt: Added.
+        * fast/media/mq-hover-cssom.html: Added.
+        * fast/media/mq-hover-invalid-expected.txt: Added.
+        * fast/media/mq-hover-invalid.html: Added.
+        * fast/media/mq-hover-matchMedia-expected.txt: Added.
+        * fast/media/mq-hover-matchMedia.html: Added.
+        * fast/media/mq-hover-styling-expected.txt: Added.
+        * fast/media/mq-hover-styling.html: Added.
+        * fast/media/mq-pointer-cssom-expected.txt: Added.
+        * fast/media/mq-pointer-cssom.html: Added.
+        * fast/media/mq-pointer-expected.txt:
+        * fast/media/mq-pointer-invalid-expected.txt: Added.
+        * fast/media/mq-pointer-invalid.html: Added.
+        * fast/media/mq-pointer-matchMedia-expected.txt: Added.
+        * fast/media/mq-pointer-matchMedia.html: Added.
+        * fast/media/mq-pointer-styling-expected.txt: Added.
+        * fast/media/mq-pointer-styling.html: Added.
+        * fast/media/mq-pointer.html:
+        * platform/ios-simulator/fast/media/mq-any-hover-matchMedia-expected.txt: Added.
+        * platform/ios-simulator/fast/media/mq-any-hover-styling-expected.txt: Added.
+        * platform/ios-simulator/fast/media/mq-any-pointer-matchMedia-expected.txt: Added.
+        * platform/ios-simulator/fast/media/mq-any-pointer-styling-expected.txt: Added.
+        * platform/ios-simulator/fast/media/mq-hover-matchMedia-expected.txt: Added.
+        * platform/ios-simulator/fast/media/mq-hover-styling-expected.txt: Added.
+        * platform/ios-simulator/fast/media/mq-pointer-expected.txt: Added.
+        * platform/ios-simulator/fast/media/mq-pointer-matchMedia-expected.txt: Added.
+        * platform/ios-simulator/fast/media/mq-pointer-styling-expected.txt: Added.
+
</ins><span class="cx"> 2015-01-23  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r179051.
</span></span></pre></div>
<a id="trunkLayoutTestsfastmediamqanyhovercssomexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-any-hover-cssom-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-any-hover-cssom-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-any-hover-cssom-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+Test the CSSOM serialization of the any-hover media feature.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover: on-demand)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover: on-demand)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover: none)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover: none)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-hover: hover)&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqanyhovercssomhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-any-hover-cssom.html (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-any-hover-cssom.html                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-any-hover-cssom.html        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;style id=&quot;target-style&quot;&gt;&lt;/style&gt;
+
+&lt;script&gt;
+    description(&quot;Test the CSSOM serialization of the any-hover media feature.&quot;)
+
+    var testCases = [
+        // Case.
+        [&quot;(any-hover)&quot;, &quot;(any-hover)&quot;],
+        [&quot;(    any-hover)&quot;, &quot;(any-hover)&quot;],
+        [&quot;(any-hover    )&quot;, &quot;(any-hover)&quot;],
+        [&quot;(    any-hover    )&quot;, &quot;(any-hover)&quot;],
+        [&quot;(any-hover: hover)&quot;, &quot;(any-hover: hover)&quot;],
+        [&quot;(any-hover: Hover)&quot;, &quot;(any-hover: hover)&quot;],
+        [&quot;(any-hover: HOVER)&quot;, &quot;(any-hover: hover)&quot;],
+        [&quot;(Any-Hover: hover)&quot;, &quot;(any-hover: hover)&quot;],
+        [&quot;(ANY-HOVER: hover)&quot;, &quot;(any-hover: hover)&quot;],
+        [&quot;(Any-Hover: Hover)&quot;, &quot;(any-hover: hover)&quot;],
+        [&quot;(any-hover: ON-DEMAND)&quot;, &quot;(any-hover: on-demand)&quot;],
+        [&quot;(Any-Hover: On-demand)&quot;, &quot;(any-hover: on-demand)&quot;],
+        [&quot;(any-hover: NONE)&quot;, &quot;(any-hover: none)&quot;],
+        [&quot;(Any-Hover: None)&quot;, &quot;(any-hover: none)&quot;],
+
+        // Spacing.
+        [&quot;(any-hover:hover)&quot;, &quot;(any-hover: hover)&quot;],
+        [&quot;(any-hover: hover)&quot;, &quot;(any-hover: hover)&quot;],
+        [&quot;(any-hover :hover)&quot;, &quot;(any-hover: hover)&quot;],
+        [&quot;(any-hover : hover)&quot;, &quot;(any-hover: hover)&quot;],
+        [&quot;(     any-hover    : hover     )&quot;, &quot;(any-hover: hover)&quot;],
+        [&quot;(any-hover\t:\thover)&quot;, &quot;(any-hover: hover)&quot;],
+    ];
+
+    var targetStyle = document.getElementById('target-style');
+    for (var testCase of testCases) {
+        targetStyle.innerText = &quot;@media &quot; + testCase[0] + &quot; { }&quot;;
+        shouldBeEqualToString(&quot;document.styleSheets[1].cssRules[0].media.mediaText&quot;, testCase[1]);
+    }
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqanyhoverinvalidexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-any-hover-invalid-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-any-hover-invalid-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-any-hover-invalid-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+Test invalid input with the any-hover media feature.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS window.matchMedia(&quot;(any-hover:)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(any-hover: )&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(any-hover: WebKit)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(any-hover: fine)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(any-hover: portrait)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(any-hover: \&quot;None\&quot;)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(any-hover: 'None')&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqanyhoverinvalidhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-any-hover-invalid.html (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-any-hover-invalid.html                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-any-hover-invalid.html        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;style id=&quot;target-style&quot;&gt;&lt;/style&gt;
+
+&lt;script&gt;
+    description(&quot;Test invalid input with the any-hover media feature.&quot;)
+
+    var testCases = [
+        &quot;any-hover:&quot;,
+        &quot;any-hover: &quot;,
+        &quot;any-hover: WebKit&quot;,
+        &quot;any-hover: fine&quot;,
+        &quot;any-hover: portrait&quot;,
+        &quot;any-hover: \\\&quot;None\\\&quot;&quot;,
+        &quot;any-hover: 'None'&quot;,
+    ];
+
+    var targetStyle = document.getElementById('target-style');
+    for (var testCase of testCases) {
+        var testString = 'window.matchMedia(&quot;(' + testCase + ')&quot;).matches';
+        shouldBeFalse('window.matchMedia(&quot;(' + testCase + ')&quot;).matches');
+
+        targetStyle.innerText = &quot;@media &quot; + testCase + &quot; { }&quot;;
+        shouldBe(&quot;document.styleSheets[1].cssRules[0].media.length&quot;, &quot;0&quot;);
+    }
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqanyhovermatchMediaexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-any-hover-matchMedia-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-any-hover-matchMedia-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-any-hover-matchMedia-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+Test the any-hover media feature with machMedia.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+window.matchMedia(&quot;(any-hover)&quot;).matches = true
+window.matchMedia(&quot;(any-hover: hover)&quot;).matches = true
+window.matchMedia(&quot;(any-hover: on-demand)&quot;).matches = false
+window.matchMedia(&quot;(any-hover: none)&quot;).matches = false
+window.matchMedia(&quot;(any-hover: Hover)&quot;).matches = true
+window.matchMedia(&quot;(any-hover: On-demand)&quot;).matches = false
+window.matchMedia(&quot;(any-hover: None)&quot;).matches = false
+window.matchMedia(&quot;(Any-Hover: hover)&quot;).matches = true
+window.matchMedia(&quot;(Any-Hover: on-demand)&quot;).matches = false
+window.matchMedia(&quot;(Any-Hover: none)&quot;).matches = false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqanyhovermatchMediahtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-any-hover-matchMedia.html (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-any-hover-matchMedia.html                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-any-hover-matchMedia.html        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+    description(&quot;Test the any-hover media feature with machMedia.&quot;)
+
+    function testHoverCondition(condition) {
+        var testString = 'window.matchMedia(&quot;(' + condition + ')&quot;).matches';
+        debug(testString + &quot; = &quot; + eval(testString));
+    }
+
+    testHoverCondition(&quot;any-hover&quot;);
+
+    testHoverCondition(&quot;any-hover: hover&quot;);
+    testHoverCondition(&quot;any-hover: on-demand&quot;);
+    testHoverCondition(&quot;any-hover: none&quot;);
+
+    testHoverCondition(&quot;any-hover: Hover&quot;);
+    testHoverCondition(&quot;any-hover: On-demand&quot;);
+    testHoverCondition(&quot;any-hover: None&quot;);
+
+    testHoverCondition(&quot;Any-Hover: hover&quot;);
+    testHoverCondition(&quot;Any-Hover: on-demand&quot;);
+    testHoverCondition(&quot;Any-Hover: none&quot;);
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqanyhoverstylingexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-any-hover-styling-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-any-hover-styling-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-any-hover-styling-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+Test the any-hover media feature to guard style rules.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+getComputedStyle(target)[&quot;color&quot;] = rgb(0, 128, 0)
+getComputedStyle(target)[&quot;background-color&quot;] = rgb(0, 0, 255)
+getComputedStyle(target)[&quot;width&quot;] = 100px
+getComputedStyle(target)[&quot;height&quot;] = 100px
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqanyhoverstylinghtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-any-hover-styling.html (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-any-hover-styling.html                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-any-hover-styling.html        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;div id=&quot;target&quot;&gt;&lt;/div&gt;
+&lt;style&gt;
+    #target {
+        color: red;
+        background-color: black;
+        width: 100px;
+        height: 100px;
+        display: none;
+    }
+    @media (any-hover) {
+        #target {
+            color: green;
+        }
+    }
+    @media (any-hover: hover) {
+        #target {
+            background-color: blue;
+        }
+    }
+    @media (any-hover: on-demand) {
+        #target {
+            width: 10px;
+        }
+    }
+    @media (any-hover: none) {
+        #target {
+            height: 10px;
+        }
+    }
+&lt;/style&gt;
+
+&lt;script&gt;
+    description(&quot;Test the any-hover media feature to guard style rules.&quot;)
+
+    var target = document.getElementById('target');
+
+    function displayProperty(property) {
+        var testString = 'getComputedStyle(target)[&quot;' + property + '&quot;]';
+        debug(testString + &quot; = &quot; + eval(testString));
+    }
+
+    displayProperty(&quot;color&quot;);
+    displayProperty(&quot;background-color&quot;);
+    displayProperty(&quot;width&quot;);
+    displayProperty(&quot;height&quot;);
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqanypointercssomexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-any-pointer-cssom-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-any-pointer-cssom-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-any-pointer-cssom-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+Test the CSSOM serialization of the any-pointer media feature.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer: coarse)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer: coarse)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer: none)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer: none)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(any-pointer: fine)&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqanypointercssomhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-any-pointer-cssom.html (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-any-pointer-cssom.html                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-any-pointer-cssom.html        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;style id=&quot;target-style&quot;&gt;&lt;/style&gt;
+
+&lt;script&gt;
+    description(&quot;Test the CSSOM serialization of the any-pointer media feature.&quot;)
+
+    var testCases = [
+        // Case.
+        [&quot;(any-pointer)&quot;, &quot;(any-pointer)&quot;],
+        [&quot;(    any-pointer)&quot;, &quot;(any-pointer)&quot;],
+        [&quot;(any-pointer    )&quot;, &quot;(any-pointer)&quot;],
+        [&quot;(    any-pointer    )&quot;, &quot;(any-pointer)&quot;],
+        [&quot;(any-pointer: fine)&quot;, &quot;(any-pointer: fine)&quot;],
+        [&quot;(any-pointer: Fine)&quot;, &quot;(any-pointer: fine)&quot;],
+        [&quot;(any-pointer: FINE)&quot;, &quot;(any-pointer: fine)&quot;],
+        [&quot;(Any-Pointer: fine)&quot;, &quot;(any-pointer: fine)&quot;],
+        [&quot;(ANY-POINTER: fine)&quot;, &quot;(any-pointer: fine)&quot;],
+        [&quot;(Any-Pointer: Fine)&quot;, &quot;(any-pointer: fine)&quot;],
+        [&quot;(any-pointer: COARSE)&quot;, &quot;(any-pointer: coarse)&quot;],
+        [&quot;(Any-Pointer: Coarse)&quot;, &quot;(any-pointer: coarse)&quot;],
+        [&quot;(any-pointer: NONE)&quot;, &quot;(any-pointer: none)&quot;],
+        [&quot;(Any-Pointer: None)&quot;, &quot;(any-pointer: none)&quot;],
+
+        // Spacing.
+        [&quot;(any-pointer:fine)&quot;, &quot;(any-pointer: fine)&quot;],
+        [&quot;(any-pointer: fine)&quot;, &quot;(any-pointer: fine)&quot;],
+        [&quot;(any-pointer :fine)&quot;, &quot;(any-pointer: fine)&quot;],
+        [&quot;(any-pointer : fine)&quot;, &quot;(any-pointer: fine)&quot;],
+        [&quot;(     any-pointer    : fine     )&quot;, &quot;(any-pointer: fine)&quot;],
+        [&quot;(any-pointer\t:\tfine)&quot;, &quot;(any-pointer: fine)&quot;],
+    ];
+
+    var targetStyle = document.getElementById('target-style');
+    for (var testCase of testCases) {
+        targetStyle.innerText = &quot;@media &quot; + testCase[0] + &quot; { }&quot;;
+        shouldBeEqualToString(&quot;document.styleSheets[1].cssRules[0].media.mediaText&quot;, testCase[1]);
+    }
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqanypointerinvalidexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-any-pointer-invalid-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-any-pointer-invalid-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-any-pointer-invalid-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+Test invalid input with the any-pointer media feature.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS window.matchMedia(&quot;(any-pointer:)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(any-pointer: )&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(any-pointer: WebKit)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(any-pointer: pointer)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(any-pointer: hover)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(any-pointer: portrait)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(any-pointer: \&quot;None\&quot;)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(any-pointer: 'None')&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqanypointerinvalidhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-any-pointer-invalid.html (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-any-pointer-invalid.html                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-any-pointer-invalid.html        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;style id=&quot;target-style&quot;&gt;&lt;/style&gt;
+
+&lt;script&gt;
+    description(&quot;Test invalid input with the any-pointer media feature.&quot;)
+
+    var testCases = [
+        &quot;any-pointer:&quot;,
+        &quot;any-pointer: &quot;,
+        &quot;any-pointer: WebKit&quot;,
+        &quot;any-pointer: pointer&quot;,
+        &quot;any-pointer: hover&quot;,
+        &quot;any-pointer: portrait&quot;,
+        &quot;any-pointer: \\\&quot;None\\\&quot;&quot;,
+        &quot;any-pointer: 'None'&quot;,
+    ];
+
+    var targetStyle = document.getElementById('target-style');
+    for (var testCase of testCases) {
+        var testString = 'window.matchMedia(&quot;(' + testCase + ')&quot;).matches';
+        shouldBeFalse('window.matchMedia(&quot;(' + testCase + ')&quot;).matches');
+
+        targetStyle.innerText = &quot;@media &quot; + testCase + &quot; { }&quot;;
+        shouldBe(&quot;document.styleSheets[1].cssRules[0].media.length&quot;, &quot;0&quot;);
+    }
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqanypointermatchMediaexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-any-pointer-matchMedia-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-any-pointer-matchMedia-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-any-pointer-matchMedia-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+Test the any-pointer media feature with machMedia.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+window.matchMedia(&quot;(any-pointer)&quot;).matches = true
+window.matchMedia(&quot;(any-pointer: fine)&quot;).matches = true
+window.matchMedia(&quot;(any-pointer: coarse)&quot;).matches = false
+window.matchMedia(&quot;(any-pointer: none)&quot;).matches = false
+window.matchMedia(&quot;(any-pointer: Fine)&quot;).matches = true
+window.matchMedia(&quot;(any-pointer: Coarse)&quot;).matches = false
+window.matchMedia(&quot;(any-pointer: None)&quot;).matches = false
+window.matchMedia(&quot;(Any-Pointer: fine)&quot;).matches = true
+window.matchMedia(&quot;(Any-Pointer: coarse)&quot;).matches = false
+window.matchMedia(&quot;(Any-Pointer: none)&quot;).matches = false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqanypointermatchMediahtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-any-pointer-matchMedia.html (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-any-pointer-matchMedia.html                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-any-pointer-matchMedia.html        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+    description(&quot;Test the any-pointer media feature with machMedia.&quot;)
+
+    function testPointerCondition(condition) {
+        var testString = 'window.matchMedia(&quot;(' + condition + ')&quot;).matches';
+        debug(testString + &quot; = &quot; + eval(testString));
+    }
+
+    testPointerCondition(&quot;any-pointer&quot;);
+
+    testPointerCondition(&quot;any-pointer: fine&quot;);
+    testPointerCondition(&quot;any-pointer: coarse&quot;);
+    testPointerCondition(&quot;any-pointer: none&quot;);
+
+    testPointerCondition(&quot;any-pointer: Fine&quot;);
+    testPointerCondition(&quot;any-pointer: Coarse&quot;);
+    testPointerCondition(&quot;any-pointer: None&quot;);
+
+    testPointerCondition(&quot;Any-Pointer: fine&quot;);
+    testPointerCondition(&quot;Any-Pointer: coarse&quot;);
+    testPointerCondition(&quot;Any-Pointer: none&quot;);
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqanypointerstylingexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-any-pointer-styling-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-any-pointer-styling-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-any-pointer-styling-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+Test the any-pointer media feature to guard style rules.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+getComputedStyle(target)[&quot;color&quot;] = rgb(0, 128, 0)
+getComputedStyle(target)[&quot;background-color&quot;] = rgb(0, 0, 255)
+getComputedStyle(target)[&quot;width&quot;] = 100px
+getComputedStyle(target)[&quot;height&quot;] = 100px
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqanypointerstylinghtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-any-pointer-styling.html (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-any-pointer-styling.html                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-any-pointer-styling.html        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;div id=&quot;target&quot;&gt;&lt;/div&gt;
+&lt;style&gt;
+    #target {
+        color: red;
+        background-color: black;
+        width: 100px;
+        height: 100px;
+        display: none;
+    }
+    @media (any-pointer) {
+        #target {
+            color: green;
+        }
+    }
+    @media (any-pointer: fine) {
+        #target {
+            background-color: blue;
+        }
+    }
+    @media (any-pointer: coarse) {
+        #target {
+            width: 10px;
+        }
+    }
+    @media (any-pointer: none) {
+        #target {
+            height: 10px;
+        }
+    }
+&lt;/style&gt;
+
+&lt;script&gt;
+    description(&quot;Test the any-pointer media feature to guard style rules.&quot;)
+
+    var target = document.getElementById('target');
+
+    function displayProperty(property) {
+        var testString = 'getComputedStyle(target)[&quot;' + property + '&quot;]';
+        debug(testString + &quot; = &quot; + eval(testString));
+    }
+
+    displayProperty(&quot;color&quot;);
+    displayProperty(&quot;background-color&quot;);
+    displayProperty(&quot;width&quot;);
+    displayProperty(&quot;height&quot;);
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqhovercssomexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-hover-cssom-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-hover-cssom-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-hover-cssom-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+Test the CSSOM serialization of the hover media feature.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover: on-demand)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover: on-demand)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover: none)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover: none)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover: hover)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(hover: hover)&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqhovercssomhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-hover-cssom.html (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-hover-cssom.html                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-hover-cssom.html        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;style id=&quot;target-style&quot;&gt;&lt;/style&gt;
+
+&lt;script&gt;
+    description(&quot;Test the CSSOM serialization of the hover media feature.&quot;)
+
+    var testCases = [
+        // Case.
+        [&quot;(hover)&quot;, &quot;(hover)&quot;],
+        [&quot;(    hover)&quot;, &quot;(hover)&quot;],
+        [&quot;(hover    )&quot;, &quot;(hover)&quot;],
+        [&quot;(    hover    )&quot;, &quot;(hover)&quot;],
+        [&quot;(hover: hover)&quot;, &quot;(hover: hover)&quot;],
+        [&quot;(hover: Hover)&quot;, &quot;(hover: hover)&quot;],
+        [&quot;(hover: HOVER)&quot;, &quot;(hover: hover)&quot;],
+        [&quot;(Hover: hover)&quot;, &quot;(hover: hover)&quot;],
+        [&quot;(HOVER: hover)&quot;, &quot;(hover: hover)&quot;],
+        [&quot;(Hover: Hover)&quot;, &quot;(hover: hover)&quot;],
+        [&quot;(hover: ON-DEMAND)&quot;, &quot;(hover: on-demand)&quot;],
+        [&quot;(Hover: On-demand)&quot;, &quot;(hover: on-demand)&quot;],
+        [&quot;(hover: NONE)&quot;, &quot;(hover: none)&quot;],
+        [&quot;(Hover: None)&quot;, &quot;(hover: none)&quot;],
+
+        // Spacing.
+        [&quot;(hover:hover)&quot;, &quot;(hover: hover)&quot;],
+        [&quot;(hover: hover)&quot;, &quot;(hover: hover)&quot;],
+        [&quot;(hover :hover)&quot;, &quot;(hover: hover)&quot;],
+        [&quot;(hover : hover)&quot;, &quot;(hover: hover)&quot;],
+        [&quot;(     hover    : hover     )&quot;, &quot;(hover: hover)&quot;],
+        [&quot;(hover\t:\thover)&quot;, &quot;(hover: hover)&quot;],
+    ];
+
+    var targetStyle = document.getElementById('target-style');
+    for (var testCase of testCases) {
+        targetStyle.innerText = &quot;@media &quot; + testCase[0] + &quot; { }&quot;;
+        shouldBeEqualToString(&quot;document.styleSheets[1].cssRules[0].media.mediaText&quot;, testCase[1]);
+    }
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqhoverinvalidexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-hover-invalid-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-hover-invalid-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-hover-invalid-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+Test invalid input with the hover media feature.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS window.matchMedia(&quot;(hover:)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(hover: )&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(hover: WebKit)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(hover: fine)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(hover: portrait)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(hover: \&quot;None\&quot;)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(hover: 'None')&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqhoverinvalidhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-hover-invalid.html (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-hover-invalid.html                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-hover-invalid.html        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;style id=&quot;target-style&quot;&gt;&lt;/style&gt;
+
+&lt;script&gt;
+    description(&quot;Test invalid input with the hover media feature.&quot;)
+
+    var testCases = [
+        &quot;hover:&quot;,
+        &quot;hover: &quot;,
+        &quot;hover: WebKit&quot;,
+        &quot;hover: fine&quot;,
+        &quot;hover: portrait&quot;,
+        &quot;hover: \\\&quot;None\\\&quot;&quot;,
+        &quot;hover: 'None'&quot;,
+    ];
+
+    var targetStyle = document.getElementById('target-style');
+    for (var testCase of testCases) {
+        var testString = 'window.matchMedia(&quot;(' + testCase + ')&quot;).matches';
+        shouldBeFalse('window.matchMedia(&quot;(' + testCase + ')&quot;).matches');
+
+        targetStyle.innerText = &quot;@media &quot; + testCase + &quot; { }&quot;;
+        shouldBe(&quot;document.styleSheets[1].cssRules[0].media.length&quot;, &quot;0&quot;);
+    }
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqhovermatchMediaexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-hover-matchMedia-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-hover-matchMedia-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-hover-matchMedia-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+Test the hover media feature with machMedia.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+window.matchMedia(&quot;(hover)&quot;).matches = true
+window.matchMedia(&quot;(hover: hover)&quot;).matches = true
+window.matchMedia(&quot;(hover: on-demand)&quot;).matches = false
+window.matchMedia(&quot;(hover: none)&quot;).matches = false
+window.matchMedia(&quot;(hover: Hover)&quot;).matches = true
+window.matchMedia(&quot;(hover: On-demand)&quot;).matches = false
+window.matchMedia(&quot;(hover: None)&quot;).matches = false
+window.matchMedia(&quot;(Hover: hover)&quot;).matches = true
+window.matchMedia(&quot;(Hover: on-demand)&quot;).matches = false
+window.matchMedia(&quot;(Hover: none)&quot;).matches = false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqhovermatchMediahtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-hover-matchMedia.html (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-hover-matchMedia.html                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-hover-matchMedia.html        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+    description(&quot;Test the hover media feature with machMedia.&quot;)
+
+    function testHoverCondition(condition) {
+        var testString = 'window.matchMedia(&quot;(' + condition + ')&quot;).matches';
+        debug(testString + &quot; = &quot; + eval(testString));
+    }
+
+    testHoverCondition(&quot;hover&quot;);
+
+    testHoverCondition(&quot;hover: hover&quot;);
+    testHoverCondition(&quot;hover: on-demand&quot;);
+    testHoverCondition(&quot;hover: none&quot;);
+
+    testHoverCondition(&quot;hover: Hover&quot;);
+    testHoverCondition(&quot;hover: On-demand&quot;);
+    testHoverCondition(&quot;hover: None&quot;);
+
+    testHoverCondition(&quot;Hover: hover&quot;);
+    testHoverCondition(&quot;Hover: on-demand&quot;);
+    testHoverCondition(&quot;Hover: none&quot;);
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqhoverstylingexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-hover-styling-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-hover-styling-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-hover-styling-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+Test the hover media feature to guard style rules.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+getComputedStyle(target)[&quot;color&quot;] = rgb(0, 128, 0)
+getComputedStyle(target)[&quot;background-color&quot;] = rgb(0, 0, 255)
+getComputedStyle(target)[&quot;width&quot;] = 100px
+getComputedStyle(target)[&quot;height&quot;] = 100px
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqhoverstylinghtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-hover-styling.html (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-hover-styling.html                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-hover-styling.html        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;div id=&quot;target&quot;&gt;&lt;/div&gt;
+&lt;style&gt;
+    #target {
+        color: red;
+        background-color: black;
+        width: 100px;
+        height: 100px;
+        display: none;
+    }
+    @media (hover) {
+        #target {
+            color: green;
+        }
+    }
+    @media (hover: hover) {
+        #target {
+            background-color: blue;
+        }
+    }
+    @media (hover: on-demand) {
+        #target {
+            width: 10px;
+        }
+    }
+    @media (hover: none) {
+        #target {
+            height: 10px;
+        }
+    }
+&lt;/style&gt;
+
+&lt;script&gt;
+    description(&quot;Test the hover media feature to guard style rules.&quot;)
+
+    var target = document.getElementById('target');
+
+    function displayProperty(property) {
+        var testString = 'getComputedStyle(target)[&quot;' + property + '&quot;]';
+        debug(testString + &quot; = &quot; + eval(testString));
+    }
+
+    displayProperty(&quot;color&quot;);
+    displayProperty(&quot;background-color&quot;);
+    displayProperty(&quot;width&quot;);
+    displayProperty(&quot;height&quot;);
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqpointercssomexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-pointer-cssom-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-pointer-cssom-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-pointer-cssom-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+Test the CSSOM serialization of the pointer media feature.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer: coarse)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer: coarse)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer: none)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer: none)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer: fine)&quot;
+PASS document.styleSheets[1].cssRules[0].media.mediaText is &quot;(pointer: fine)&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqpointercssomhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-pointer-cssom.html (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-pointer-cssom.html                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-pointer-cssom.html        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;style id=&quot;target-style&quot;&gt;&lt;/style&gt;
+
+&lt;script&gt;
+    description(&quot;Test the CSSOM serialization of the pointer media feature.&quot;)
+
+    var testCases = [
+        // Case.
+        [&quot;(pointer)&quot;, &quot;(pointer)&quot;],
+        [&quot;(    pointer)&quot;, &quot;(pointer)&quot;],
+        [&quot;(pointer    )&quot;, &quot;(pointer)&quot;],
+        [&quot;(    pointer    )&quot;, &quot;(pointer)&quot;],
+        [&quot;(pointer: fine)&quot;, &quot;(pointer: fine)&quot;],
+        [&quot;(pointer: Fine)&quot;, &quot;(pointer: fine)&quot;],
+        [&quot;(pointer: FINE)&quot;, &quot;(pointer: fine)&quot;],
+        [&quot;(Pointer: fine)&quot;, &quot;(pointer: fine)&quot;],
+        [&quot;(POINTER: fine)&quot;, &quot;(pointer: fine)&quot;],
+        [&quot;(Pointer: Fine)&quot;, &quot;(pointer: fine)&quot;],
+        [&quot;(pointer: COARSE)&quot;, &quot;(pointer: coarse)&quot;],
+        [&quot;(Pointer: Coarse)&quot;, &quot;(pointer: coarse)&quot;],
+        [&quot;(pointer: NONE)&quot;, &quot;(pointer: none)&quot;],
+        [&quot;(Pointer: None)&quot;, &quot;(pointer: none)&quot;],
+
+        // Spacing.
+        [&quot;(pointer:fine)&quot;, &quot;(pointer: fine)&quot;],
+        [&quot;(pointer: fine)&quot;, &quot;(pointer: fine)&quot;],
+        [&quot;(pointer :fine)&quot;, &quot;(pointer: fine)&quot;],
+        [&quot;(pointer : fine)&quot;, &quot;(pointer: fine)&quot;],
+        [&quot;(     pointer    : fine     )&quot;, &quot;(pointer: fine)&quot;],
+        [&quot;(pointer\t:\tfine)&quot;, &quot;(pointer: fine)&quot;],
+    ];
+
+    var targetStyle = document.getElementById('target-style');
+    for (var testCase of testCases) {
+        targetStyle.innerText = &quot;@media &quot; + testCase[0] + &quot; { }&quot;;
+        shouldBeEqualToString(&quot;document.styleSheets[1].cssRules[0].media.mediaText&quot;, testCase[1]);
+    }
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqpointerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/media/mq-pointer-expected.txt (179054 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-pointer-expected.txt        2015-01-24 03:05:36 UTC (rev 179054)
+++ trunk/LayoutTests/fast/media/mq-pointer-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -1,27 +1,14 @@
</span><span class="cx"> Test the (pointer) and (hover) media features. See Bug 87403 for details.
</span><span class="cx"> 
</span><del>-------------- default configuration -------------
-Query &quot;(pointer)&quot;: false
-Query &quot;(Pointer)&quot;: false
</del><ins>+Query &quot;(pointer)&quot;: true
+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 class="cx"> Query &quot;(pointer:bogusvalue)&quot;: false
</span><del>-Query &quot;(pointer:fine)&quot;: false
-Query &quot;(hover)&quot;: false
</del><ins>+Query &quot;(pointer:fine)&quot;: true
+Query &quot;(hover)&quot;: true
</ins><span class="cx"> Query &quot;(hover:0)&quot;: false
</span><span class="cx"> Query &quot;(hover:1)&quot;: false
</span><span class="cx"> Query &quot;(hover:bogusvalue)&quot;: false
</span><del>-------------- with touch screen -------------
-Query &quot;(pointer)&quot;: true
-Query &quot;(Pointer)&quot;: true
-Query &quot;(pointer:none)&quot;: false
-Query &quot;(pointer:coarse)&quot;: true
-Query &quot;(pointer:coARse)&quot;: true
-Query &quot;(pointer:bogusvalue)&quot;: false
-Query &quot;(pointer:fine)&quot;: false
-Query &quot;(hover)&quot;: false
-Query &quot;(hover:0)&quot;: true
-Query &quot;(hover:1)&quot;: false
-Query &quot;(hover:bogusvalue)&quot;: false
</del><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastmediamqpointerinvalidexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-pointer-invalid-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-pointer-invalid-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-pointer-invalid-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+Test invalid input with the pointer media feature.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS window.matchMedia(&quot;(pointer:)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(pointer: )&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(pointer: WebKit)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(pointer: pointer)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(pointer: hover)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(pointer: portrait)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(pointer: \&quot;None\&quot;)&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS window.matchMedia(&quot;(pointer: 'None')&quot;).matches is false
+PASS document.styleSheets[1].cssRules[0].media.length is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqpointerinvalidhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-pointer-invalid.html (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-pointer-invalid.html                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-pointer-invalid.html        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;style id=&quot;target-style&quot;&gt;&lt;/style&gt;
+
+&lt;script&gt;
+    description(&quot;Test invalid input with the pointer media feature.&quot;)
+
+    var testCases = [
+        &quot;pointer:&quot;,
+        &quot;pointer: &quot;,
+        &quot;pointer: WebKit&quot;,
+        &quot;pointer: pointer&quot;,
+        &quot;pointer: hover&quot;,
+        &quot;pointer: portrait&quot;,
+        &quot;pointer: \\\&quot;None\\\&quot;&quot;,
+        &quot;pointer: 'None'&quot;,
+    ];
+
+    var targetStyle = document.getElementById('target-style');
+    for (var testCase of testCases) {
+        var testString = 'window.matchMedia(&quot;(' + testCase + ')&quot;).matches';
+        shouldBeFalse('window.matchMedia(&quot;(' + testCase + ')&quot;).matches');
+
+        targetStyle.innerText = &quot;@media &quot; + testCase + &quot; { }&quot;;
+        shouldBe(&quot;document.styleSheets[1].cssRules[0].media.length&quot;, &quot;0&quot;);
+    }
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqpointermatchMediaexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-pointer-matchMedia-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-pointer-matchMedia-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-pointer-matchMedia-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+Test the pointer media feature with machMedia.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+window.matchMedia(&quot;(pointer)&quot;).matches = true
+window.matchMedia(&quot;(pointer: fine)&quot;).matches = true
+window.matchMedia(&quot;(pointer: coarse)&quot;).matches = false
+window.matchMedia(&quot;(pointer: none)&quot;).matches = false
+window.matchMedia(&quot;(pointer: Fine)&quot;).matches = true
+window.matchMedia(&quot;(pointer: Coarse)&quot;).matches = false
+window.matchMedia(&quot;(pointer: None)&quot;).matches = false
+window.matchMedia(&quot;(Pointer: fine)&quot;).matches = true
+window.matchMedia(&quot;(Pointer: coarse)&quot;).matches = false
+window.matchMedia(&quot;(Pointer: none)&quot;).matches = false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqpointermatchMediahtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-pointer-matchMedia.html (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-pointer-matchMedia.html                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-pointer-matchMedia.html        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+    description(&quot;Test the pointer media feature with machMedia.&quot;)
+
+    function testPointerCondition(condition) {
+        var testString = 'window.matchMedia(&quot;(' + condition + ')&quot;).matches';
+        debug(testString + &quot; = &quot; + eval(testString));
+    }
+
+    testPointerCondition(&quot;pointer&quot;);
+
+    testPointerCondition(&quot;pointer: fine&quot;);
+    testPointerCondition(&quot;pointer: coarse&quot;);
+    testPointerCondition(&quot;pointer: none&quot;);
+
+    testPointerCondition(&quot;pointer: Fine&quot;);
+    testPointerCondition(&quot;pointer: Coarse&quot;);
+    testPointerCondition(&quot;pointer: None&quot;);
+
+    testPointerCondition(&quot;Pointer: fine&quot;);
+    testPointerCondition(&quot;Pointer: coarse&quot;);
+    testPointerCondition(&quot;Pointer: none&quot;);
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqpointerstylingexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-pointer-styling-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-pointer-styling-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-pointer-styling-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+Test the pointer media feature to guard style rules.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+getComputedStyle(target)[&quot;color&quot;] = rgb(0, 128, 0)
+getComputedStyle(target)[&quot;background-color&quot;] = rgb(0, 0, 255)
+getComputedStyle(target)[&quot;width&quot;] = 100px
+getComputedStyle(target)[&quot;height&quot;] = 100px
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqpointerstylinghtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/media/mq-pointer-styling.html (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-pointer-styling.html                                (rev 0)
+++ trunk/LayoutTests/fast/media/mq-pointer-styling.html        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;div id=&quot;target&quot;&gt;&lt;/div&gt;
+&lt;style&gt;
+    #target {
+        color: red;
+        background-color: black;
+        width: 100px;
+        height: 100px;
+        display: none;
+    }
+    @media (pointer) {
+        #target {
+            color: green;
+        }
+    }
+    @media (pointer: fine) {
+        #target {
+            background-color: blue;
+        }
+    }
+    @media (pointer: coarse) {
+        #target {
+            width: 10px;
+        }
+    }
+    @media (pointer: none) {
+        #target {
+            height: 10px;
+        }
+    }
+&lt;/style&gt;
+
+&lt;script&gt;
+    description(&quot;Test the pointer media feature to guard style rules.&quot;)
+
+    var target = document.getElementById('target');
+
+    function displayProperty(property) {
+        var testString = 'getComputedStyle(target)[&quot;' + property + '&quot;]';
+        debug(testString + &quot; = &quot; + eval(testString));
+    }
+
+    displayProperty(&quot;color&quot;);
+    displayProperty(&quot;background-color&quot;);
+    displayProperty(&quot;width&quot;);
+    displayProperty(&quot;height&quot;);
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediamqpointerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/media/mq-pointer.html (179054 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/media/mq-pointer.html        2015-01-24 03:05:36 UTC (rev 179054)
+++ trunk/LayoutTests/fast/media/mq-pointer.html        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -34,15 +34,7 @@
</span><span class="cx"> 
</span><span class="cx">     function runTests()
</span><span class="cx">     {
</span><del>-        log(&quot;------------- default configuration -------------&quot;);
</del><span class="cx">         testQueries();
</span><del>-
-        if (window.internals) {
-            internals.settings.setDeviceSupportsTouch(true);
-
-            log(&quot;------------- with touch screen -------------&quot;);
-            testQueries();
-        }
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorfastmediamqanyhovermatchMediaexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios-simulator/fast/media/mq-any-hover-matchMedia-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/fast/media/mq-any-hover-matchMedia-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/fast/media/mq-any-hover-matchMedia-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+Test the any-hover media feature with machMedia.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+window.matchMedia(&quot;(any-hover)&quot;).matches = false
+window.matchMedia(&quot;(any-hover: hover)&quot;).matches = false
+window.matchMedia(&quot;(any-hover: on-demand)&quot;).matches = false
+window.matchMedia(&quot;(any-hover: none)&quot;).matches = true
+window.matchMedia(&quot;(any-hover: Hover)&quot;).matches = false
+window.matchMedia(&quot;(any-hover: On-demand)&quot;).matches = false
+window.matchMedia(&quot;(any-hover: None)&quot;).matches = true
+window.matchMedia(&quot;(Any-Hover: hover)&quot;).matches = false
+window.matchMedia(&quot;(Any-Hover: on-demand)&quot;).matches = false
+window.matchMedia(&quot;(Any-Hover: none)&quot;).matches = true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorfastmediamqanyhoverstylingexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios-simulator/fast/media/mq-any-hover-styling-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/fast/media/mq-any-hover-styling-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/fast/media/mq-any-hover-styling-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+Test the any-hover media feature to guard style rules.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+getComputedStyle(target)[&quot;color&quot;] = rgb(255, 0, 0)
+getComputedStyle(target)[&quot;background-color&quot;] = rgb(0, 0, 0)
+getComputedStyle(target)[&quot;width&quot;] = 100px
+getComputedStyle(target)[&quot;height&quot;] = 10px
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorfastmediamqanypointermatchMediaexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios-simulator/fast/media/mq-any-pointer-matchMedia-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/fast/media/mq-any-pointer-matchMedia-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/fast/media/mq-any-pointer-matchMedia-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+Test the any-pointer media feature with machMedia.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+window.matchMedia(&quot;(any-pointer)&quot;).matches = true
+window.matchMedia(&quot;(any-pointer: fine)&quot;).matches = false
+window.matchMedia(&quot;(any-pointer: coarse)&quot;).matches = true
+window.matchMedia(&quot;(any-pointer: none)&quot;).matches = false
+window.matchMedia(&quot;(any-pointer: Fine)&quot;).matches = false
+window.matchMedia(&quot;(any-pointer: Coarse)&quot;).matches = true
+window.matchMedia(&quot;(any-pointer: None)&quot;).matches = false
+window.matchMedia(&quot;(Any-Pointer: fine)&quot;).matches = false
+window.matchMedia(&quot;(Any-Pointer: coarse)&quot;).matches = true
+window.matchMedia(&quot;(Any-Pointer: none)&quot;).matches = false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorfastmediamqanypointerstylingexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios-simulator/fast/media/mq-any-pointer-styling-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/fast/media/mq-any-pointer-styling-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/fast/media/mq-any-pointer-styling-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+Test the any-pointer media feature to guard style rules.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+getComputedStyle(target)[&quot;color&quot;] = rgb(0, 128, 0)
+getComputedStyle(target)[&quot;background-color&quot;] = rgb(0, 0, 0)
+getComputedStyle(target)[&quot;width&quot;] = 10px
+getComputedStyle(target)[&quot;height&quot;] = 100px
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorfastmediamqhovermatchMediaexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios-simulator/fast/media/mq-hover-matchMedia-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/fast/media/mq-hover-matchMedia-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/fast/media/mq-hover-matchMedia-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+Test the hover media feature with machMedia.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+window.matchMedia(&quot;(hover)&quot;).matches = false
+window.matchMedia(&quot;(hover: hover)&quot;).matches = false
+window.matchMedia(&quot;(hover: on-demand)&quot;).matches = false
+window.matchMedia(&quot;(hover: none)&quot;).matches = true
+window.matchMedia(&quot;(hover: Hover)&quot;).matches = false
+window.matchMedia(&quot;(hover: On-demand)&quot;).matches = false
+window.matchMedia(&quot;(hover: None)&quot;).matches = true
+window.matchMedia(&quot;(Hover: hover)&quot;).matches = false
+window.matchMedia(&quot;(Hover: on-demand)&quot;).matches = false
+window.matchMedia(&quot;(Hover: none)&quot;).matches = true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorfastmediamqhoverstylingexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios-simulator/fast/media/mq-hover-styling-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/fast/media/mq-hover-styling-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/fast/media/mq-hover-styling-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+Test the hover media feature to guard style rules.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+getComputedStyle(target)[&quot;color&quot;] = rgb(255, 0, 0)
+getComputedStyle(target)[&quot;background-color&quot;] = rgb(0, 0, 0)
+getComputedStyle(target)[&quot;width&quot;] = 100px
+getComputedStyle(target)[&quot;height&quot;] = 10px
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorfastmediamqpointerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios-simulator/fast/media/mq-pointer-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/fast/media/mq-pointer-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/fast/media/mq-pointer-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+Test the (pointer) and (hover) media features. See Bug 87403 for details.
+
+Query &quot;(pointer)&quot;: true
+Query &quot;(Pointer)&quot;: true
+Query &quot;(pointer:none)&quot;: false
+Query &quot;(pointer:coarse)&quot;: true
+Query &quot;(pointer:coARse)&quot;: true
+Query &quot;(pointer:bogusvalue)&quot;: false
+Query &quot;(pointer:fine)&quot;: false
+Query &quot;(hover)&quot;: false
+Query &quot;(hover:0)&quot;: false
+Query &quot;(hover:1)&quot;: false
+Query &quot;(hover:bogusvalue)&quot;: false
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorfastmediamqpointermatchMediaexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios-simulator/fast/media/mq-pointer-matchMedia-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/fast/media/mq-pointer-matchMedia-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/fast/media/mq-pointer-matchMedia-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+Test the pointer media feature with machMedia.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+window.matchMedia(&quot;(pointer)&quot;).matches = true
+window.matchMedia(&quot;(pointer: fine)&quot;).matches = false
+window.matchMedia(&quot;(pointer: coarse)&quot;).matches = true
+window.matchMedia(&quot;(pointer: none)&quot;).matches = false
+window.matchMedia(&quot;(pointer: Fine)&quot;).matches = false
+window.matchMedia(&quot;(pointer: Coarse)&quot;).matches = true
+window.matchMedia(&quot;(pointer: None)&quot;).matches = false
+window.matchMedia(&quot;(Pointer: fine)&quot;).matches = false
+window.matchMedia(&quot;(Pointer: coarse)&quot;).matches = true
+window.matchMedia(&quot;(Pointer: none)&quot;).matches = false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorfastmediamqpointerstylingexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios-simulator/fast/media/mq-pointer-styling-expected.txt (0 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/fast/media/mq-pointer-styling-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/fast/media/mq-pointer-styling-expected.txt        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+Test the pointer media feature to guard style rules.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+getComputedStyle(target)[&quot;color&quot;] = rgb(0, 128, 0)
+getComputedStyle(target)[&quot;background-color&quot;] = rgb(0, 0, 0)
+getComputedStyle(target)[&quot;width&quot;] = 10px
+getComputedStyle(target)[&quot;height&quot;] = 100px
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (179054 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-01-24 03:05:36 UTC (rev 179054)
+++ trunk/Source/WebCore/ChangeLog        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -1,3 +1,54 @@
</span><ins>+2015-01-23  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
+
+        Add pointer/hover media queries
+        https://bugs.webkit.org/show_bug.cgi?id=134822
+
+        Reviewed by Antti Koivisto.
+
+        Media Queries Level 4 introduces two types of Interaction Media Features:
+        &quot;pointer&quot; and &quot;hover&quot;. Those media features are useful for adapting the design
+        to the type of input:
+            http://dev.w3.org/csswg/mediaqueries-4/#mf-interaction
+
+        This implementation is trivial: just #ifdef the return value depending on
+        the support for touch events.
+        In the future we should move that to a client interface but let's start easy
+        for now.
+
+        Tests: fast/media/mq-any-hover-cssom.html
+               fast/media/mq-any-hover-invalid.html
+               fast/media/mq-any-hover-matchMedia.html
+               fast/media/mq-any-hover-styling.html
+               fast/media/mq-any-pointer-cssom.html
+               fast/media/mq-any-pointer-invalid.html
+               fast/media/mq-any-pointer-matchMedia.html
+               fast/media/mq-any-pointer-styling.html
+               fast/media/mq-hover-cssom.html
+               fast/media/mq-hover-invalid.html
+               fast/media/mq-hover-matchMedia.html
+               fast/media/mq-hover-styling.html
+               fast/media/mq-pointer-cssom.html
+               fast/media/mq-pointer-invalid.html
+               fast/media/mq-pointer-matchMedia.html
+               fast/media/mq-pointer-styling.html
+
+        * css/CSSValueKeywords.in:
+        * css/MediaFeatureNames.h:
+        * css/MediaQueryEvaluator.cpp:
+        (WebCore::hoverMediaFeatureEval):
+        (WebCore::any_hoverMediaFeatureEval):
+        (WebCore::pointerMediaFeatureEval):
+        (WebCore::any_pointerMediaFeatureEval):
+        (WebCore::leastCapablePrimaryPointerDeviceType): Deleted.
+        * css/MediaQueryExp.cpp:
+        (WebCore::featureWithCSSValueID):
+        (WebCore::featureWithZeroOrOne):
+        (WebCore::featureWithoutValue):
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
+        (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
+        * page/Settings.in:
+
</ins><span class="cx"> 2015-01-23  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r179051.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueKeywordsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (179054 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueKeywords.in        2015-01-24 03:05:36 UTC (rev 179054)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -1030,6 +1030,11 @@
</span><span class="cx"> coarse
</span><span class="cx"> fine
</span><span class="cx"> 
</span><ins>+// (hover:) media feature.
+// none
+hover
+on-demand
+
</ins><span class="cx"> // blend modes
</span><span class="cx"> // normal
</span><span class="cx"> multiply
</span></span></pre></div>
<a id="trunkSourceWebCorecssMediaFeatureNamesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/MediaFeatureNames.h (179054 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/MediaFeatureNames.h        2015-01-24 03:05:36 UTC (rev 179054)
+++ trunk/Source/WebCore/css/MediaFeatureNames.h        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -32,6 +32,8 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #define CSS_MEDIAQUERY_NAMES_FOR_EACH_MEDIAFEATURE(macro) \
</span><ins>+    macro(any_hover, &quot;any-hover&quot;) \
+    macro(any_pointer, &quot;any-pointer&quot;) \
</ins><span class="cx">     macro(color, &quot;color&quot;) \
</span><span class="cx">     macro(color_index, &quot;color-index&quot;) \
</span><span class="cx">     macro(grid, &quot;grid&quot;) \
</span></span></pre></div>
<a id="trunkSourceWebCorecssMediaQueryEvaluatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/MediaQueryEvaluator.cpp (179054 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/MediaQueryEvaluator.cpp        2015-01-24 03:05:36 UTC (rev 179054)
+++ trunk/Source/WebCore/css/MediaQueryEvaluator.cpp        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -647,64 +647,45 @@
</span><span class="cx">     return !isRunningOnIPhoneOrIPod() || frame-&gt;settings().mediaPlaybackAllowsInline();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-enum PointerDeviceType { TouchPointer, MousePointer, NoPointer, UnknownPointer };
-
-static PointerDeviceType leastCapablePrimaryPointerDeviceType(Frame* frame)
</del><ins>+static bool hoverMediaFeatureEval(CSSValue* value, const CSSToLengthConversionData&amp;, Frame*, MediaFeaturePrefix)
</ins><span class="cx"> {
</span><del>-    if (frame-&gt;settings().deviceSupportsTouch())
-        return TouchPointer;
</del><ins>+    if (!is&lt;CSSPrimitiveValue&gt;(value)) {
+#if ENABLE(TOUCH_EVENTS)
+        return false;
+#else
+        return true;
+#endif
+    }
</ins><span class="cx"> 
</span><del>-    // FIXME: We should also try to determine if we know we have a mouse.
-    // When we do this, we'll also need to differentiate between known not to
-    // have mouse or touch screen (NoPointer) and unknown (UnknownPointer).
-    // We could also take into account other preferences like accessibility
-    // settings to decide which of the available pointers should be considered
-    // &quot;primary&quot;.
-
-    return UnknownPointer;
</del><ins>+    int hoverCSSKeywordID = downcast&lt;CSSPrimitiveValue&gt;(*value).getValueID();
+#if ENABLE(TOUCH_EVENTS)
+    return hoverCSSKeywordID == CSSValueNone;
+#else
+    return hoverCSSKeywordID == CSSValueHover;
+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool hoverMediaFeatureEval(CSSValue* value, const CSSToLengthConversionData&amp;, Frame* frame, MediaFeaturePrefix)
</del><ins>+static bool any_hoverMediaFeatureEval(CSSValue* value, const CSSToLengthConversionData&amp; cssToLengthConversionData, Frame* frame, MediaFeaturePrefix prefix)
</ins><span class="cx"> {
</span><del>-    PointerDeviceType pointer = leastCapablePrimaryPointerDeviceType(frame);
-
-    // If we're on a port that hasn't explicitly opted into providing pointer device information
-    // (or otherwise can't be confident in the pointer hardware available), then behave exactly
-    // as if this feature feature isn't supported.
-    if (pointer == UnknownPointer)
-        return false;
-
-    float number = 1;
-    if (value) {
-        if (!numberValue(value, number))
-            return false;
-    }
-
-    return (pointer == NoPointer &amp;&amp; !number)
-        || (pointer == TouchPointer &amp;&amp; !number)
-        || (pointer == MousePointer &amp;&amp; number == 1);
</del><ins>+    return hoverMediaFeatureEval(value, cssToLengthConversionData, frame, prefix);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool pointerMediaFeatureEval(CSSValue* value, const CSSToLengthConversionData&amp;, Frame* frame, MediaFeaturePrefix)
</del><ins>+static bool pointerMediaFeatureEval(CSSValue* value, const CSSToLengthConversionData&amp;, Frame*, MediaFeaturePrefix)
</ins><span class="cx"> {
</span><del>-    PointerDeviceType pointer = leastCapablePrimaryPointerDeviceType(frame);
</del><ins>+    if (!is&lt;CSSPrimitiveValue&gt;(value))
+        return true;
</ins><span class="cx"> 
</span><del>-    // If we're on a port that hasn't explicitly opted into providing pointer device information
-    // (or otherwise can't be confident in the pointer hardware available), then behave exactly
-    // as if this feature feature isn't supported.
-    if (pointer == UnknownPointer)
-        return false;
</del><ins>+    int pointerCSSKeywordID = downcast&lt;CSSPrimitiveValue&gt;(*value).getValueID();
+#if ENABLE(TOUCH_EVENTS)
+    return pointerCSSKeywordID == CSSValueCoarse;
+#else
+    return pointerCSSKeywordID == CSSValueFine;
+#endif
+}
</ins><span class="cx"> 
</span><del>-    if (!value)
-        return pointer != NoPointer;
-
-    if (!is&lt;CSSPrimitiveValue&gt;(*value))
-        return false;
-
-    const CSSValueID id = downcast&lt;CSSPrimitiveValue&gt;(*value).getValueID();
-    return (pointer == NoPointer &amp;&amp; id == CSSValueNone)
-        || (pointer == TouchPointer &amp;&amp; id == CSSValueCoarse)
-        || (pointer == MousePointer &amp;&amp; id == CSSValueFine);
</del><ins>+static bool any_pointerMediaFeatureEval(CSSValue* value, const CSSToLengthConversionData&amp; cssToLengthConversionData, Frame* frame, MediaFeaturePrefix prefix)
+{
+    return pointerMediaFeatureEval(value, cssToLengthConversionData, frame, prefix);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // FIXME: Remove unnecessary '&amp;' from the following 'ADD_TO_FUNCTIONMAP' definition
</span></span></pre></div>
<a id="trunkSourceWebCorecssMediaQueryExpcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/MediaQueryExp.cpp (179054 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/MediaQueryExp.cpp        2015-01-24 03:05:36 UTC (rev 179054)
+++ trunk/Source/WebCore/css/MediaQueryExp.cpp        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -47,6 +47,9 @@
</span><span class="cx"> #if ENABLE(VIEW_MODE_CSS_MEDIA)
</span><span class="cx">         || mediaFeature == MediaFeatureNames::view_modeMediaFeature
</span><span class="cx"> #endif // ENABLE(VIEW_MODE_CSS_MEDIA)
</span><ins>+        || mediaFeature == MediaFeatureNames::any_hoverMediaFeature
+        || mediaFeature == MediaFeatureNames::any_pointerMediaFeature
+        || mediaFeature == MediaFeatureNames::hoverMediaFeature
</ins><span class="cx">         || mediaFeature == MediaFeatureNames::inverted_colorsMediaFeature
</span><span class="cx">         || mediaFeature == MediaFeatureNames::pointerMediaFeature;
</span><span class="cx"> }
</span><span class="lines">@@ -114,8 +117,7 @@
</span><span class="cx">     if (!value-&gt;isInt || !(value-&gt;fValue == 1 || !value-&gt;fValue))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    return mediaFeature == MediaFeatureNames::gridMediaFeature
-        || mediaFeature == MediaFeatureNames::hoverMediaFeature;
</del><ins>+    return mediaFeature == MediaFeatureNames::gridMediaFeature;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static inline bool featureWithAspectRatio(const AtomicString&amp; mediaFeature)
</span><span class="lines">@@ -131,7 +133,9 @@
</span><span class="cx"> static inline bool featureWithoutValue(const AtomicString&amp; mediaFeature)
</span><span class="cx"> {
</span><span class="cx">     // Media features that are prefixed by min/max cannot be used without a value.
</span><del>-    return mediaFeature == MediaFeatureNames::monochromeMediaFeature
</del><ins>+    return mediaFeature == MediaFeatureNames::any_hoverMediaFeature
+        || mediaFeature == MediaFeatureNames::any_pointerMediaFeature
+        || mediaFeature == MediaFeatureNames::monochromeMediaFeature
</ins><span class="cx">         || mediaFeature == MediaFeatureNames::colorMediaFeature
</span><span class="cx">         || mediaFeature == MediaFeatureNames::color_indexMediaFeature
</span><span class="cx">         || mediaFeature == MediaFeatureNames::gridMediaFeature
</span></span></pre></div>
<a id="trunkSourceWebCorepageEventHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EventHandler.cpp (179054 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EventHandler.cpp        2015-01-24 03:05:36 UTC (rev 179054)
+++ trunk/Source/WebCore/page/EventHandler.cpp        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -2898,9 +2898,6 @@
</span><span class="cx">     if (m_mousePositionIsUnknown)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (!m_frame.settings().deviceSupportsMouse())
-        return;
-
</del><span class="cx">     if (Page* page = m_frame.page()) {
</span><span class="cx">         if (!page-&gt;chrome().client().shouldDispatchFakeMouseMoveEvents())
</span><span class="cx">             return;
</span><span class="lines">@@ -2947,9 +2944,6 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_mousePressed);
</span><span class="cx"> 
</span><del>-    if (!m_frame.settings().deviceSupportsMouse())
-        return;
-
</del><span class="cx">     FrameView* view = m_frame.view();
</span><span class="cx">     if (!view)
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebCorepageSettingsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Settings.in (179054 => 179055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Settings.in        2015-01-24 03:05:36 UTC (rev 179054)
+++ trunk/Source/WebCore/page/Settings.in        2015-01-24 04:15:56 UTC (rev 179055)
</span><span class="lines">@@ -147,8 +147,6 @@
</span><span class="cx"> imageSubsamplingEnabled initial=defaultImageSubsamplingEnabled
</span><span class="cx"> wantsBalancedSetDefersLoadingBehavior initial=false
</span><span class="cx"> requestAnimationFrameEnabled initial=true
</span><del>-deviceSupportsTouch initial=false
-deviceSupportsMouse initial=true
</del><span class="cx"> 
</span><span class="cx"> fixedPositionCreatesStackingContext initial=defaultFixedPositionCreatesStackingContext
</span><span class="cx"> syncXHRInDocumentsEnabled initial=true
</span></span></pre>
</div>
</div>

</body>
</html>