<!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>[207245] 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/207245">207245</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-10-12 14:50:03 -0700 (Wed, 12 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Modern Media Controls] Sliders: scrubber and volume
https://bugs.webkit.org/show_bug.cgi?id=163328
&lt;rdar://problem/28733838&gt;

Patch by Antoine Quint &lt;graouts@apple.com&gt; on 2016-10-12
Reviewed by Dean Jackson.

Source/WebCore:

We add a new Slider class that provides a custom slider backed by an
invisible &lt;input type=&quot;range&quot;&gt; element and a fill underlay to provide
a custom color between the left edge of the slider and the slider thumb.
As the slider's value changes, a UI delegate receives messages to track
such changes.

Tests: media/modern-media-controls/scrubber/scrubber.html
       media/modern-media-controls/slider/slider-constructor.html
       media/modern-media-controls/slider/slider-fill.html
       media/modern-media-controls/slider/slider-styles.html
       media/modern-media-controls/volume-slider/volume-slider-value.html
       media/modern-media-controls/volume-slider/volume-slider.html

* Modules/modern-media-controls/controls/scrubber.css: Added.
(.scrubber.slider &gt; input::-webkit-slider-thumb):
* Modules/modern-media-controls/controls/scrubber.js: Added.
(Scrubber):
* Modules/modern-media-controls/controls/slider.css: Added.
(.slider):
(.slider &gt; input,):
(.slider &gt; .fill):
(.slider &gt; input):
(.slider &gt; input::-webkit-slider-thumb):
* Modules/modern-media-controls/controls/slider.js: Added.
(Slider.prototype.get value):
(Slider.prototype.set value):
(Slider.prototype.get width):
(Slider.prototype.set width):
(Slider.prototype.handleEvent):
(Slider.prototype.commitProperty):
(Slider.prototype._handleInputEvent):
(Slider.prototype._handleChangeEvent):
(Slider.prototype._updateFill):
* Modules/modern-media-controls/controls/volume-slider.css: Added.
(.volume.slider &gt; input::-webkit-slider-thumb):
* Modules/modern-media-controls/controls/volume-slider.js: Added.
(VolumeSlider):

LayoutTests:

Testing the properties of the new Slider class and its subclasses.

* media/modern-media-controls/resources/media-controls-utils.js: Added.
(rgba):
(shouldBeEqualToRGBAColor):
* media/modern-media-controls/scrubber/scrubber-expected.txt: Added.
* media/modern-media-controls/scrubber/scrubber.html: Added.
* media/modern-media-controls/slider/slider-constructor-expected.txt: Added.
* media/modern-media-controls/slider/slider-constructor.html: Added.
* media/modern-media-controls/slider/slider-fill-expected.txt: Added.
* media/modern-media-controls/slider/slider-fill.html: Added.
* media/modern-media-controls/slider/slider-styles-expected.txt: Added.
* media/modern-media-controls/slider/slider-styles.html: Added.
* media/modern-media-controls/volume-slider/volume-slider-expected.txt: Added.
* media/modern-media-controls/volume-slider/volume-slider-value-expected.txt: Added.
* media/modern-media-controls/volume-slider/volume-slider-value.html: Added.
* media/modern-media-controls/volume-slider/volume-slider.html: Added.
* platform/ios-simulator/TestExpectations:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorTestExpectations">trunk/LayoutTests/platform/ios-simulator/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/media/modern-media-controls/resources/</li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsresourcesmediacontrolsutilsjs">trunk/LayoutTests/media/modern-media-controls/resources/media-controls-utils.js</a></li>
<li>trunk/LayoutTests/media/modern-media-controls/scrubber/</li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsscrubberscrubberexpectedtxt">trunk/LayoutTests/media/modern-media-controls/scrubber/scrubber-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsscrubberscrubberhtml">trunk/LayoutTests/media/modern-media-controls/scrubber/scrubber.html</a></li>
<li>trunk/LayoutTests/media/modern-media-controls/slider/</li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsslidersliderconstructorexpectedtxt">trunk/LayoutTests/media/modern-media-controls/slider/slider-constructor-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsslidersliderconstructorhtml">trunk/LayoutTests/media/modern-media-controls/slider/slider-constructor.html</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsslidersliderfillexpectedtxt">trunk/LayoutTests/media/modern-media-controls/slider/slider-fill-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsslidersliderfillhtml">trunk/LayoutTests/media/modern-media-controls/slider/slider-fill.html</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsslidersliderstylesexpectedtxt">trunk/LayoutTests/media/modern-media-controls/slider/slider-styles-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsslidersliderstyleshtml">trunk/LayoutTests/media/modern-media-controls/slider/slider-styles.html</a></li>
<li>trunk/LayoutTests/media/modern-media-controls/volume-slider/</li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsvolumeslidervolumesliderexpectedtxt">trunk/LayoutTests/media/modern-media-controls/volume-slider/volume-slider-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsvolumeslidervolumeslidervalueexpectedtxt">trunk/LayoutTests/media/modern-media-controls/volume-slider/volume-slider-value-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsvolumeslidervolumeslidervaluehtml">trunk/LayoutTests/media/modern-media-controls/volume-slider/volume-slider-value.html</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolsvolumeslidervolumesliderhtml">trunk/LayoutTests/media/modern-media-controls/volume-slider/volume-slider.html</a></li>
<li><a href="#trunkSourceWebCoreModulesmodernmediacontrolscontrolsscrubbercss">trunk/Source/WebCore/Modules/modern-media-controls/controls/scrubber.css</a></li>
<li><a href="#trunkSourceWebCoreModulesmodernmediacontrolscontrolsscrubberjs">trunk/Source/WebCore/Modules/modern-media-controls/controls/scrubber.js</a></li>
<li><a href="#trunkSourceWebCoreModulesmodernmediacontrolscontrolsslidercss">trunk/Source/WebCore/Modules/modern-media-controls/controls/slider.css</a></li>
<li><a href="#trunkSourceWebCoreModulesmodernmediacontrolscontrolssliderjs">trunk/Source/WebCore/Modules/modern-media-controls/controls/slider.js</a></li>
<li><a href="#trunkSourceWebCoreModulesmodernmediacontrolscontrolsvolumeslidercss">trunk/Source/WebCore/Modules/modern-media-controls/controls/volume-slider.css</a></li>
<li><a href="#trunkSourceWebCoreModulesmodernmediacontrolscontrolsvolumesliderjs">trunk/Source/WebCore/Modules/modern-media-controls/controls/volume-slider.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (207244 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-12 21:49:10 UTC (rev 207244)
+++ trunk/LayoutTests/ChangeLog        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2016-10-12  Antoine Quint  &lt;graouts@apple.com&gt;
+
+        [Modern Media Controls] Sliders: scrubber and volume
+        https://bugs.webkit.org/show_bug.cgi?id=163328
+        &lt;rdar://problem/28733838&gt;
+
+        Reviewed by Dean Jackson.
+
+        Testing the properties of the new Slider class and its subclasses.
+
+        * media/modern-media-controls/resources/media-controls-utils.js: Added.
+        (rgba):
+        (shouldBeEqualToRGBAColor):
+        * media/modern-media-controls/scrubber/scrubber-expected.txt: Added.
+        * media/modern-media-controls/scrubber/scrubber.html: Added.
+        * media/modern-media-controls/slider/slider-constructor-expected.txt: Added.
+        * media/modern-media-controls/slider/slider-constructor.html: Added.
+        * media/modern-media-controls/slider/slider-fill-expected.txt: Added.
+        * media/modern-media-controls/slider/slider-fill.html: Added.
+        * media/modern-media-controls/slider/slider-styles-expected.txt: Added.
+        * media/modern-media-controls/slider/slider-styles.html: Added.
+        * media/modern-media-controls/volume-slider/volume-slider-expected.txt: Added.
+        * media/modern-media-controls/volume-slider/volume-slider-value-expected.txt: Added.
+        * media/modern-media-controls/volume-slider/volume-slider-value.html: Added.
+        * media/modern-media-controls/volume-slider/volume-slider.html: Added.
+        * platform/ios-simulator/TestExpectations:
+
</ins><span class="cx"> 2016-10-12  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add experimental support for the &quot;formatForeColor&quot; inputType
</span></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsresourcesmediacontrolsutilsjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/media/modern-media-controls/resources/media-controls-utils.js (0 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/resources/media-controls-utils.js                                (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/resources/media-controls-utils.js        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+function rgba(colorString)
+{
+    let [r, g, b, a] = [0, 0, 0, 0];
+    const match = colorString.match(/^(?:rgba\(([^)]+)\))$/i);
+    if (match &amp;&amp; match[1]) {
+        const rgba = match[1].split(/\s*,\s*/).map(parseFloat);
+        if (rgba.length == 4) {
+            [r, g, b] = rgba;
+            a = Math.max(0, Math.min(rgba[3], 1));
+        }
+    }
+    return { r, g, b, a };
+}
+
+function shouldBeEqualToRGBAColor(expr, expectedColor)
+{
+    const expectedRGBA = rgba(expectedColor);
+    shouldBe(`rgba(${expr}).r`, `${expectedRGBA.r}`);
+    shouldBe(`rgba(${expr}).g`, `${expectedRGBA.g}`);
+    shouldBe(`rgba(${expr}).b`, `${expectedRGBA.b}`);
+    shouldBeCloseTo(`rgba(${expr}).a`, expectedRGBA.a, 0.001);
+}
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsscrubberscrubberexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/media/modern-media-controls/scrubber/scrubber-expected.txt (0 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/scrubber/scrubber-expected.txt                                (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/scrubber/scrubber-expected.txt        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+Testing the Scrubber class.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS scrubber.element.classList.contains(&quot;scrubber&quot;) is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsscrubberscrubberhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/media/modern-media-controls/scrubber/scrubber.html (0 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/scrubber/scrubber.html                                (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/scrubber/scrubber.html        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+&lt;link rel=&quot;stylesheet&quot; href=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/slider.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot;&gt;
+&lt;link rel=&quot;stylesheet&quot; href=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/scrubber.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot;&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/slider.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/scrubber.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;body&gt;
+&lt;script type=&quot;text/javascript&quot;&gt;
+
+description(&quot;Testing the &lt;code&gt;Scrubber&lt;/code&gt; class.&quot;);
+
+const scrubber = new Scrubber;
+
+shouldBeTrue('scrubber.element.classList.contains(&quot;scrubber&quot;)');
+
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsslidersliderconstructorexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/media/modern-media-controls/slider/slider-constructor-expected.txt (0 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/slider/slider-constructor-expected.txt                                (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/slider/slider-constructor-expected.txt        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+Testing the Slider constructor.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS slider.element.localName is &quot;div&quot;
+PASS slider.element.className.trim() is &quot;slider&quot;
+PASS slider.children.length is 2
+PASS slider.children[0].element.localName is &quot;div&quot;
+PASS slider.children[0].element.className is &quot;fill&quot;
+PASS slider.children[1].element.localName is &quot;input&quot;
+PASS slider.children[1].element.type is &quot;range&quot;
+PASS slider.children[1].element.min is &quot;0&quot;
+PASS slider.children[1].element.max is &quot;1&quot;
+PASS slider.children[1].element.step is &quot;0.001&quot;
+PASS sliderWithCSSClassName.element.className is &quot;slider foo&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsslidersliderconstructorhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/media/modern-media-controls/slider/slider-constructor.html (0 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/slider/slider-constructor.html                                (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/slider/slider-constructor.html        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+&lt;link rel=&quot;stylesheet&quot; href=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/slider.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot;&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/slider.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;body&gt;
+&lt;script type=&quot;text/javascript&quot;&gt;
+
+description(&quot;Testing the &lt;code&gt;Slider&lt;/code&gt; constructor.&quot;);
+
+const slider = new Slider;
+
+shouldBeEqualToString(&quot;slider.element.localName&quot;, &quot;div&quot;);
+shouldBeEqualToString(&quot;slider.element.className.trim()&quot;, &quot;slider&quot;);
+shouldBe(&quot;slider.children.length&quot;, &quot;2&quot;);
+shouldBeEqualToString(&quot;slider.children[0].element.localName&quot;, &quot;div&quot;);
+shouldBeEqualToString(&quot;slider.children[0].element.className&quot;, &quot;fill&quot;);
+shouldBeEqualToString(&quot;slider.children[1].element.localName&quot;, &quot;input&quot;);
+shouldBeEqualToString(&quot;slider.children[1].element.type&quot;, &quot;range&quot;);
+shouldBeEqualToString(&quot;slider.children[1].element.min&quot;, &quot;0&quot;);
+shouldBeEqualToString(&quot;slider.children[1].element.max&quot;, &quot;1&quot;);
+shouldBeEqualToString(&quot;slider.children[1].element.step&quot;, &quot;0.001&quot;);
+
+const sliderWithCSSClassName = new Slider(&quot;foo&quot;);
+shouldBeEqualToString(&quot;sliderWithCSSClassName.element.className&quot;, &quot;slider foo&quot;);
+
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsslidersliderfillexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/media/modern-media-controls/slider/slider-fill-expected.txt (0 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/slider/slider-fill-expected.txt                                (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/slider/slider-fill-expected.txt        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+Testing the Slider fill property.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS slider.children[0].element.style.width is &quot;100px&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsslidersliderfillhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/media/modern-media-controls/slider/slider-fill.html (0 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/slider/slider-fill.html                                (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/slider/slider-fill.html        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+&lt;link rel=&quot;stylesheet&quot; href=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/slider.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot;&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/media-controls-utils.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/slider.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;body&gt;
+&lt;script type=&quot;text/javascript&quot;&gt;
+
+description(&quot;Testing the &lt;code&gt;Slider&lt;/code&gt; fill property.&quot;);
+
+window.jsTestIsAsync = true;
+
+const slider = new Slider;
+slider.width = 200;
+slider.value = 0.5;
+
+scheduler.frameDidFire = function()
+{
+    shouldBeEqualToString(&quot;slider.children[0].element.style.width&quot;, &quot;100px&quot;);
+    finishJSTest();
+}
+
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsslidersliderstylesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/media/modern-media-controls/slider/slider-styles-expected.txt (0 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/slider/slider-styles-expected.txt                                (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/slider/slider-styles-expected.txt        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+Testing the Slider computed style.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS containerStyle.position is &quot;absolute&quot;
+PASS containerStyle.height is &quot;3px&quot;
+PASS rgba(containerStyle.backgroundColor).r is 255
+PASS rgba(containerStyle.backgroundColor).g is 255
+PASS rgba(containerStyle.backgroundColor).b is 255
+PASS rgba(containerStyle.backgroundColor).a is within 0.001 of 0.185
+PASS containerStyle.borderRadius is &quot;1.5px&quot;
+PASS fillStyle.position is &quot;absolute&quot;
+PASS fillStyle.top is &quot;0px&quot;
+PASS fillStyle.left is &quot;0px&quot;
+PASS fillStyle.height is &quot;3px&quot;
+PASS fillStyle.borderRadius is &quot;1.5px 0px 0px 1.5px&quot;
+PASS rgba(fillStyle.backgroundColor).r is 255
+PASS rgba(fillStyle.backgroundColor).g is 255
+PASS rgba(fillStyle.backgroundColor).b is 255
+PASS rgba(fillStyle.backgroundColor).a is within 0.001 of 0.255
+PASS fillStyle.pointerEvents is &quot;none&quot;
+PASS inputStyle.position is &quot;absolute&quot;
+PASS inputStyle.top is &quot;0px&quot;
+PASS inputStyle.left is &quot;0px&quot;
+PASS inputStyle.height is &quot;3px&quot;
+PASS inputStyle.webkitAppearance is &quot;none&quot;
+PASS inputStyle.backgroundColor is &quot;rgba(0, 0, 0, 0)&quot;
+PASS inputStyle.width is &quot;200px&quot;
+PASS inputStyle.borderRadius is &quot;1.5px&quot;
+PASS inputStyle.margin is &quot;0px&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsslidersliderstyleshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/media/modern-media-controls/slider/slider-styles.html (0 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/slider/slider-styles.html                                (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/slider/slider-styles.html        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+&lt;link rel=&quot;stylesheet&quot; href=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/slider.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot;&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/media-controls-utils.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/slider.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;body&gt;
+&lt;script type=&quot;text/javascript&quot;&gt;
+
+description(&quot;Testing the &lt;code&gt;Slider&lt;/code&gt; computed style.&quot;);
+
+window.jsTestIsAsync = true;
+
+const slider = new Slider;
+slider.width = 200;
+
+let containerStyle, fillStyle, inputStyle;
+scheduler.frameDidFire = function()
+{
+    document.body.appendChild(slider.element);
+
+    containerStyle = window.getComputedStyle(slider.element);
+    shouldBeEqualToString(&quot;containerStyle.position&quot;, &quot;absolute&quot;);
+    shouldBeEqualToString(&quot;containerStyle.height&quot;, &quot;3px&quot;);
+    shouldBeEqualToRGBAColor(&quot;containerStyle.backgroundColor&quot;, &quot;rgba(255, 255, 255, 0.185)&quot;);
+    shouldBeEqualToString(&quot;containerStyle.borderRadius&quot;, &quot;1.5px&quot;);
+
+    fillStyle = window.getComputedStyle(slider.children[0].element);
+    shouldBeEqualToString(&quot;fillStyle.position&quot;, &quot;absolute&quot;);
+    shouldBeEqualToString(&quot;fillStyle.top&quot;, &quot;0px&quot;);
+    shouldBeEqualToString(&quot;fillStyle.left&quot;, &quot;0px&quot;);
+    shouldBeEqualToString(&quot;fillStyle.height&quot;, &quot;3px&quot;);
+    shouldBeEqualToString(&quot;fillStyle.borderRadius&quot;, &quot;1.5px 0px 0px 1.5px&quot;);
+    shouldBeEqualToRGBAColor(&quot;fillStyle.backgroundColor&quot;, &quot;rgba(255, 255, 255, 0.255)&quot;);
+    shouldBeEqualToString(&quot;fillStyle.pointerEvents&quot;, &quot;none&quot;);
+
+    inputStyle = window.getComputedStyle(slider.children[1].element);
+    shouldBeEqualToString(&quot;inputStyle.position&quot;, &quot;absolute&quot;);
+    shouldBeEqualToString(&quot;inputStyle.top&quot;, &quot;0px&quot;);
+    shouldBeEqualToString(&quot;inputStyle.left&quot;, &quot;0px&quot;);
+    shouldBeEqualToString(&quot;inputStyle.height&quot;, &quot;3px&quot;);
+    shouldBeEqualToString(&quot;inputStyle.webkitAppearance&quot;, &quot;none&quot;);
+    shouldBeEqualToString(&quot;inputStyle.backgroundColor&quot;, &quot;rgba(0, 0, 0, 0)&quot;);
+    shouldBeEqualToString(&quot;inputStyle.width&quot;, &quot;200px&quot;);
+    shouldBeEqualToString(&quot;inputStyle.borderRadius&quot;, &quot;1.5px&quot;);
+    shouldBeEqualToString(&quot;inputStyle.margin&quot;, &quot;0px&quot;);
+
+    finishJSTest();
+}
+
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsvolumeslidervolumesliderexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/media/modern-media-controls/volume-slider/volume-slider-expected.txt (0 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/volume-slider/volume-slider-expected.txt                                (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/volume-slider/volume-slider-expected.txt        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+Testing the VolumeSlider class.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS volumeSlider.element.classList.contains(&quot;volume&quot;) is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsvolumeslidervolumeslidervalueexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/media/modern-media-controls/volume-slider/volume-slider-value-expected.txt (0 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/volume-slider/volume-slider-value-expected.txt                                (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/volume-slider/volume-slider-value-expected.txt        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+Testing the VolumeSlider value property.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS slider.value is 0
+
+Now we'll drag to the slider thumb from 10px to 30px within the slider's bounds
+controlValueWillStartChanging
+controlValueDidChange, value = 0.029
+controlValueDidChange, value = 0.034
+controlValueDidChange, value = 0.04
+controlValueDidChange, value = 0.045
+controlValueDidChange, value = 0.05
+controlValueDidChange, value = 0.056
+controlValueDidChange, value = 0.061
+controlValueDidChange, value = 0.066
+controlValueDidChange, value = 0.071
+controlValueDidChange, value = 0.077
+controlValueDidChange, value = 0.082
+controlValueDidChange, value = 0.087
+controlValueDidChange, value = 0.093
+controlValueDidChange, value = 0.098
+controlValueDidChange, value = 0.103
+controlValueDidChange, value = 0.108
+controlValueDidChange, value = 0.114
+controlValueDidChange, value = 0.119
+controlValueDidChange, value = 0.124
+controlValueDidChange, value = 0.13
+controlValueDidStopChanging
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsvolumeslidervolumeslidervaluehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/media/modern-media-controls/volume-slider/volume-slider-value.html (0 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/volume-slider/volume-slider-value.html                                (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/volume-slider/volume-slider-value.html        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -0,0 +1,70 @@
</span><ins>+&lt;link rel=&quot;stylesheet&quot; href=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/slider.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot;&gt;
+&lt;link rel=&quot;stylesheet&quot; href=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/volume-slider.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot;&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/slider.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/volume-slider.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;body&gt;
+&lt;script type=&quot;text/javascript&quot;&gt;
+
+description(&quot;Testing the &lt;code&gt;VolumeSlider&lt;/code&gt; value property.&quot;);
+
+window.jsTestIsAsync = true;
+
+const slider = new VolumeSlider;
+slider.x = 10;
+slider.y = 32;
+slider.width = 200;
+
+slider.uiDelegate = {
+
+    controlValueWillStartChanging: function()
+    {
+        debug(`controlValueWillStartChanging`);
+    },
+
+    controlValueDidChange: function()
+    {
+        debug(`controlValueDidChange, value = ${slider.value}`);
+    },
+
+    controlValueDidStopChanging: function()
+    {
+        debug(`controlValueDidStopChanging`);
+        finishJSTest();
+    }
+
+};
+
+const input = slider.children[1].element;
+
+function dragSlider(fromPx, toPx) {
+    const bounds = input.getBoundingClientRect();
+    const minX = bounds.left;
+    const centerY = bounds.top + bounds.height / 2;
+
+    eventSender.mouseMoveTo(minX + fromPx, centerY);
+    eventSender.mouseDown();
+
+    const delta = toPx - fromPx;
+    const iterations = Math.abs(delta);
+    for (let i = 1; i &lt;= iterations; ++i)
+        eventSender.mouseMoveTo(minX + fromPx + i * Math.sign(delta), centerY);
+
+    eventSender.mouseUp();
+}
+
+scheduler.frameDidFire = function()
+{
+    document.body.appendChild(slider.element);
+
+    shouldBe(&quot;slider.value&quot;, &quot;0&quot;);
+    debug(&quot;&quot;);
+    debug(&quot;Now we'll drag to the slider thumb from 10px to 30px within the slider's bounds&quot;);
+    dragSlider(10, 30);
+}
+
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolsvolumeslidervolumesliderhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/media/modern-media-controls/volume-slider/volume-slider.html (0 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/volume-slider/volume-slider.html                                (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/volume-slider/volume-slider.html        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+&lt;link rel=&quot;stylesheet&quot; href=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/slider.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot;&gt;
+&lt;link rel=&quot;stylesheet&quot; href=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/volume-slider.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot;&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/slider.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../../Source/WebCore/Modules/modern-media-controls/controls/volume-slider.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;body&gt;
+&lt;script type=&quot;text/javascript&quot;&gt;
+
+description(&quot;Testing the &lt;code&gt;VolumeSlider&lt;/code&gt; class.&quot;);
+
+const volumeSlider = new VolumeSlider;
+
+shouldBeTrue('volumeSlider.element.classList.contains(&quot;volume&quot;)');
+
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (207244 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-10-12 21:49:10 UTC (rev 207244)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -2687,6 +2687,7 @@
</span><span class="cx"> webkit.org/b/162739 fast/images/gif-loop-count.html [ Pass ImageOnlyFailure ]
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/163009 media/modern-media-controls/icon-button/icon-button-active-state.html [ Failure ]
</span><ins>+webkit.org/b/163357 media/modern-media-controls/volume-slider/volume-slider-value.html [ Skip ]
</ins><span class="cx"> 
</span><span class="cx"> # This variation font test requires Skia which isn't available on iOS.
</span><span class="cx"> webkit.org/b/163093 fast/text/variations/advances.html [ Failure ]
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207244 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-12 21:49:10 UTC (rev 207244)
+++ trunk/Source/WebCore/ChangeLog        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -1,3 +1,49 @@
</span><ins>+2016-10-12  Antoine Quint  &lt;graouts@apple.com&gt;
+
+        [Modern Media Controls] Sliders: scrubber and volume
+        https://bugs.webkit.org/show_bug.cgi?id=163328
+        &lt;rdar://problem/28733838&gt;
+
+        Reviewed by Dean Jackson.
+
+        We add a new Slider class that provides a custom slider backed by an
+        invisible &lt;input type=&quot;range&quot;&gt; element and a fill underlay to provide
+        a custom color between the left edge of the slider and the slider thumb.
+        As the slider's value changes, a UI delegate receives messages to track
+        such changes.
+
+        Tests: media/modern-media-controls/scrubber/scrubber.html
+               media/modern-media-controls/slider/slider-constructor.html
+               media/modern-media-controls/slider/slider-fill.html
+               media/modern-media-controls/slider/slider-styles.html
+               media/modern-media-controls/volume-slider/volume-slider-value.html
+               media/modern-media-controls/volume-slider/volume-slider.html
+
+        * Modules/modern-media-controls/controls/scrubber.css: Added.
+        (.scrubber.slider &gt; input::-webkit-slider-thumb):
+        * Modules/modern-media-controls/controls/scrubber.js: Added.
+        (Scrubber):
+        * Modules/modern-media-controls/controls/slider.css: Added.
+        (.slider):
+        (.slider &gt; input,):
+        (.slider &gt; .fill):
+        (.slider &gt; input):
+        (.slider &gt; input::-webkit-slider-thumb):
+        * Modules/modern-media-controls/controls/slider.js: Added.
+        (Slider.prototype.get value):
+        (Slider.prototype.set value):
+        (Slider.prototype.get width):
+        (Slider.prototype.set width):
+        (Slider.prototype.handleEvent):
+        (Slider.prototype.commitProperty):
+        (Slider.prototype._handleInputEvent):
+        (Slider.prototype._handleChangeEvent):
+        (Slider.prototype._updateFill):
+        * Modules/modern-media-controls/controls/volume-slider.css: Added.
+        (.volume.slider &gt; input::-webkit-slider-thumb):
+        * Modules/modern-media-controls/controls/volume-slider.js: Added.
+        (VolumeSlider):
+
</ins><span class="cx"> 2016-10-12  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add experimental support for the &quot;formatForeColor&quot; inputType
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmodernmediacontrolscontrolsscrubbercss"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/modern-media-controls/controls/scrubber.css (0 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/modern-media-controls/controls/scrubber.css                                (rev 0)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/scrubber.css        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+.scrubber.slider &gt; input::-webkit-slider-thumb {
+    width: 4px;
+    height: 23px;
+    border-radius: 2px;
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmodernmediacontrolscontrolsscrubberjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/modern-media-controls/controls/scrubber.js (0 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/modern-media-controls/controls/scrubber.js                                (rev 0)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/scrubber.js        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+class Scrubber extends Slider
+{
+
+    constructor()
+    {
+        super(&quot;scrubber&quot;);
+    }
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmodernmediacontrolscontrolsslidercss"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/modern-media-controls/controls/slider.css (0 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/modern-media-controls/controls/slider.css                                (rev 0)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/slider.css        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+.slider {
+    position: absolute;
+    height: 3px;
+    background-color: rgba(255, 255, 255, 0.185);
+    border-radius: 1.5px;
+}
+
+.slider &gt; input,
+.slider &gt; .fill {
+    position: absolute;
+    top: 0;
+    left: 0;
+    height: 100%;
+}
+
+.slider &gt; .fill {
+    border-radius: 1.5px 0 0 1.5px;
+    background-color: rgba(255, 255, 255, 0.255);
+    pointer-events: none;
+}
+
+.slider &gt; input {
+    -webkit-appearance: none !important;
+    background-color: transparent;
+    width: 100%;
+    border-radius: 1.5px;
+    margin: 0;
+}
+
+.slider &gt; input::-webkit-slider-thumb {
+    -webkit-appearance: none !important;
+    background-color: rgb(179, 179, 179);
+    box-shadow: 0px 0px 0px 1px rgb(40, 40, 40);
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmodernmediacontrolscontrolssliderjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/modern-media-controls/controls/slider.js (0 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/modern-media-controls/controls/slider.js                                (rev 0)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/slider.js        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -0,0 +1,124 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+class Slider extends LayoutNode
+{
+
+    constructor(cssClassName = &quot;&quot;)
+    {
+        super(`&lt;div class=&quot;slider ${cssClassName}&quot;&gt;`);
+
+        this._fill = new LayoutNode(`&lt;div class=&quot;fill&quot;&gt;`);
+
+        this._input = new LayoutNode(`&lt;input type=&quot;range&quot; min=&quot;0&quot; max=&quot;1&quot; step=&quot;0.001&quot;&gt;`);
+        this._input.element.addEventListener(&quot;change&quot;, this);
+        this._input.element.addEventListener(&quot;input&quot;, this);
+
+        this.value = 0;
+
+        this.children = [this._fill, this._input];
+    }
+
+    // Public
+
+    get value()
+    {
+        if (this._value !== undefined)
+            return this._value;
+        return parseFloat(this._input.element.value);
+    }
+
+    set value(value)
+    {
+        if (this._valueIsChanging)
+            return;
+
+        this._value = value;
+        this.markDirtyProperty(&quot;value&quot;);
+        this._updateFill();
+    }
+
+    get width()
+    {
+        return super.width;
+    }
+
+    set width(width)
+    {
+        super.width = width;
+        this._updateFill();
+    }
+
+    // Protected
+
+    handleEvent(event)
+    {
+        switch (event.type) {
+        case &quot;input&quot;:
+            this._handleInputEvent();
+            break;
+        case &quot;change&quot;:
+            this._handleChangeEvent();
+            break;
+        }
+    }
+
+    commitProperty(propertyName)
+    {
+        if (propertyName === &quot;value&quot;) {
+            this._input.element.value = this._value;
+            delete this._value;
+        } else
+            super.commitProperty(propertyName);
+    }
+
+    // Private
+
+    _handleInputEvent()
+    {
+        if (!this._valueIsChanging &amp;&amp; this.uiDelegate &amp;&amp; typeof this.uiDelegate.controlValueWillStartChanging === &quot;function&quot;)
+            this.uiDelegate.controlValueWillStartChanging(this);
+        this._valueIsChanging = true;
+        if (this.uiDelegate &amp;&amp; typeof this.uiDelegate.controlValueDidChange === &quot;function&quot;)
+            this.uiDelegate.controlValueDidChange(this);
+
+        this._updateFill();
+    }
+
+    _handleChangeEvent()
+    {
+        delete this._valueIsChanging;
+        if (this.uiDelegate &amp;&amp; typeof this.uiDelegate.controlValueDidStopChanging === &quot;function&quot;)
+            this.uiDelegate.controlValueDidStopChanging(this);
+
+        this._updateFill();
+    }
+
+    _updateFill()
+    {
+        this._fill.width = Math.ceil(this.value * this.width);
+    }
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmodernmediacontrolscontrolsvolumeslidercss"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/modern-media-controls/controls/volume-slider.css (0 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/modern-media-controls/controls/volume-slider.css                                (rev 0)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/volume-slider.css        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+.volume.slider &gt; input::-webkit-slider-thumb {
+    width: 11px;
+    height: 11px;
+    border-radius: 5.5px;
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmodernmediacontrolscontrolsvolumesliderjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/modern-media-controls/controls/volume-slider.js (0 => 207245)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/modern-media-controls/controls/volume-slider.js                                (rev 0)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/volume-slider.js        2016-10-12 21:50:03 UTC (rev 207245)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+class VolumeSlider extends Slider
+{
+    
+    constructor()
+    {
+        super(&quot;volume&quot;);
+    }
+
+}
</ins></span></pre>
</div>
</div>

</body>
</html>