<!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>[207438] 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/207438">207438</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2016-10-17 15:30:34 -0700 (Mon, 17 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Implement DOMRect/DOMRectReadOnly
https://bugs.webkit.org/show_bug.cgi?id=163464

Reviewed by Darin Adler.

Source/WebCore:

Implement the DOMRectInit/DOMRectReadOnly/DOMRect interfaces specified in
https://dev.w3.org/fxtf/geometry/

DOMRects allow negative height/width and require double storage, so we can't just
use FloatRect for storage. They also require handling of NaN and Infinity.

To have the left/right/top/bottom accessors follow IEEE NaN rules, we need to use
custom min/max functions that return NaN if either argument is NaN, so add
nanPropagatingMin/nanPropagatingMax helpers to MathExtras.h.

Test: fast/dom/domrect.html

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMRect.h: Added.
(WebCore::DOMRect::create):
(WebCore::DOMRect::fromRect):
(WebCore::DOMRect::setX):
(WebCore::DOMRect::setY):
(WebCore::DOMRect::setWidth):
(WebCore::DOMRect::setHeight):
(WebCore::DOMRect::DOMRect):
* dom/DOMRect.idl: Added.
* dom/DOMRectInit.h: Added.
* dom/DOMRectInit.idl: Added.
* dom/DOMRectReadOnly.h: Added.
(WebCore::DOMRectReadOnly::create):
(WebCore::DOMRectReadOnly::fromRect):
(WebCore::DOMRectReadOnly::x):
(WebCore::DOMRectReadOnly::y):
(WebCore::DOMRectReadOnly::width):
(WebCore::DOMRectReadOnly::height):
(WebCore::DOMRectReadOnly::top):
(WebCore::DOMRectReadOnly::right):
(WebCore::DOMRectReadOnly::bottom):
(WebCore::DOMRectReadOnly::left):
(WebCore::DOMRectReadOnly::DOMRectReadOnly):
* dom/DOMRectReadOnly.idl: Added.

Source/WTF:

Implement min()/max() in a way that follows Math.min/Math.max, which return
NaN if either argument is NaN.

* wtf/MathExtras.h:
(WTF::nanPropagatingMin):
(WTF::nanPropagatingMax):

LayoutTests:

New test and new results for global constructor tests.

* geometry/DOMRect-001-expected.txt: Added.
* geometry/DOMRect-001.html: Added.
* js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
* js/dom/global-constructors-attributes-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsjsdomglobalconstructorsattributesdedicatedworkerexpectedtxt">trunk/LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformefljsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkjsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacjsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1jsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacyosemitejsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwinjsdomglobalconstructorsattributesexpectedtxt">trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfMathExtrash">trunk/Source/WTF/wtf/MathExtras.h</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsgeometryDOMRect001expectedtxt">trunk/LayoutTests/geometry/DOMRect-001-expected.txt</a></li>
<li><a href="#trunkLayoutTestsgeometryDOMRect001html">trunk/LayoutTests/geometry/DOMRect-001.html</a></li>
<li><a href="#trunkSourceWebCoredomDOMRecth">trunk/Source/WebCore/dom/DOMRect.h</a></li>
<li><a href="#trunkSourceWebCoredomDOMRectidl">trunk/Source/WebCore/dom/DOMRect.idl</a></li>
<li><a href="#trunkSourceWebCoredomDOMRectInith">trunk/Source/WebCore/dom/DOMRectInit.h</a></li>
<li><a href="#trunkSourceWebCoredomDOMRectInitidl">trunk/Source/WebCore/dom/DOMRectInit.idl</a></li>
<li><a href="#trunkSourceWebCoredomDOMRectReadOnlyh">trunk/Source/WebCore/dom/DOMRectReadOnly.h</a></li>
<li><a href="#trunkSourceWebCoredomDOMRectReadOnlyidl">trunk/Source/WebCore/dom/DOMRectReadOnly.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (207437 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-17 22:09:29 UTC (rev 207437)
+++ trunk/LayoutTests/ChangeLog        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2016-10-17  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Implement DOMRect/DOMRectReadOnly
+        https://bugs.webkit.org/show_bug.cgi?id=163464
+
+        Reviewed by Darin Adler.
+        
+        New test and new results for global constructor tests.
+
+        * geometry/DOMRect-001-expected.txt: Added.
+        * geometry/DOMRect-001.html: Added.
+        * js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
+        * js/dom/global-constructors-attributes-expected.txt:
+        * platform/efl/js/dom/global-constructors-attributes-expected.txt:
+        * platform/gtk/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac/js/dom/global-constructors-attributes-expected.txt:
+        * platform/win/js/dom/global-constructors-attributes-expected.txt:
+
</ins><span class="cx"> 2016-10-17  Antoine Quint  &lt;graouts@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Modern Media Controls] Basic MediaController
</span></span></pre></div>
<a id="trunkLayoutTestsgeometryDOMRect001expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/geometry/DOMRect-001-expected.txt (0 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/geometry/DOMRect-001-expected.txt                                (rev 0)
+++ trunk/LayoutTests/geometry/DOMRect-001-expected.txt        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+Test DOMRect and DOMRectReadOnly interfaces
+
+
+PASS testDOMRectReadOnlyConstructor0 
+PASS testDOMRectReadOnlyConstructor4Args 
+PASS testDOMRectReadOnlyConstructor1Arg 
+PASS testDOMRectReadOnlyConstructor2Args 
+PASS testDOMRectReadOnlyConstructor3Args 
+PASS testDOMRectReadOnlyConstructorDoublePrecision 
+PASS testDOMRectReadOnlyConstructorNegativeWidth 
+PASS testDOMRectReadOnlyConstructorNegativeHeight 
+PASS testDOMRectReadOnlyConstructorNaN1 
+PASS testDOMRectReadOnlyConstructorNaN2 
+PASS testDOMRectReadOnlyConstructorInf1 
+PASS testDOMRectReadOnlyConstructorInf2 
+PASS testDOMRectReadOnlyIsReadOnly 
+PASS testDOMRectReadOnlyFromRect 
+PASS testFromRectReturnsDOMRectReadOnly 
+PASS testDOMRectReadOnlyFromRectPartial 
+PASS testDOMRectReadOnlySerialization 
+PASS testDOMRectConstructor0 
+PASS testDOMRectIsWritable 
+PASS testDOMRectIsWritableWithNaN 
+PASS testFromRectReturnsDOMRect 
+PASS testDOMRectFromRect 
+PASS testDOMRectSerialization 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsgeometryDOMRect001html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/geometry/DOMRect-001.html (0 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/geometry/DOMRect-001.html                                (rev 0)
+++ trunk/LayoutTests/geometry/DOMRect-001.html        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -0,0 +1,186 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+    &lt;title&gt;Geometry Interfaces: DOMRect and DOMRectReadOnly interface tests.&lt;/title&gt;
+    &lt;link rel=&quot;author&quot; title=&quot;Dirk Schulze&quot; href=&quot;mailto:simon.fraser@apple.com&quot; /&gt;
+    &lt;link rel=&quot;help&quot; href=&quot;http://www.w3.org/TR/geometry-1/#DOMRect&quot;&gt;
+    &lt;link rel=&quot;help&quot; href=&quot;https://drafts.fxtf.org/geometry/#DOMRect&quot;&gt;
+    &lt;script src=&quot;../resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;p&gt;Test DOMRect and DOMRectReadOnly interfaces&lt;/p&gt;
+    &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+    &lt;script&gt;
+        test(function() {
+            checkDOMRect(new DOMRectReadOnly(), { x:0, y:0, width:0, height:0 });
+        },'testDOMRectReadOnlyConstructor0');
+        test(function() {
+            var x = 10;
+            var y = 12;
+            var width = 99;
+            var height = 102;
+            checkDOMRect(new DOMRectReadOnly(x, y, width, height), { x, y, width, height });
+        },'testDOMRectReadOnlyConstructor4Args');
+        test(function() {
+            var x = 10;
+            var y = 12;
+            var width = 99;
+            var height = 102;
+            checkDOMRect(new DOMRectReadOnly(x), { x, y:0, width:0, height:0 });
+        },'testDOMRectReadOnlyConstructor1Arg');
+        test(function() {
+            var x = 10;
+            var y = 12;
+            var width = 99;
+            var height = 102;
+            checkDOMRect(new DOMRectReadOnly(x, y), { x, y, width:0, height:0 });
+        },'testDOMRectReadOnlyConstructor2Args');
+        test(function() {
+            var x = 10;
+            var y = 12;
+            var width = 99;
+            var height = 102;
+            checkDOMRect(new DOMRectReadOnly(x, y, width), { x, y, width, height:0 });
+        },'testDOMRectReadOnlyConstructor3Args');
+        test(function() {
+            x = Math.PI;
+            y = Math.SQRT2;
+            width = Math.E;
+            height = Math.LN10;
+            checkDOMRect(new DOMRectReadOnly(x, y, width, height), { x, y, width, height });
+        },'testDOMRectReadOnlyConstructorDoublePrecision');
+        test(function() {
+            var x = 10;
+            var y = 12;
+            var width = -99;
+            var height = 102;
+            checkDOMRect(new DOMRectReadOnly(x, y, width, height), { x, y, width, height });
+        },'testDOMRectReadOnlyConstructorNegativeWidth');
+        test(function() {
+            var x = 10;
+            var y = 12;
+            var width = 99;
+            var height = -102;
+            checkDOMRect(new DOMRectReadOnly(x, y, width, height), { x, y, width, height });
+        },'testDOMRectReadOnlyConstructorNegativeHeight');
+        test(function() {
+            var x = 1;
+            var y = NaN;
+            var width = NaN;
+            var height = -200;
+            checkDOMRect(new DOMRectReadOnly(x, y, width, height), { x, y, width, height });
+        },'testDOMRectReadOnlyConstructorNaN1');
+        test(function() {
+            var x = NaN;
+            var y = 2;
+            var width = 99;
+            var height = NaN;
+            checkDOMRect(new DOMRectReadOnly(x, y, width, height), { x, y, width, height });
+        },'testDOMRectReadOnlyConstructorNaN2');
+        test(function() {
+            var x = Infinity;
+            var y = -102;
+            var width = 304;
+            var height = -Infinity;
+            checkDOMRect(new DOMRectReadOnly(x, y, width, height), { x, y, width, height });
+        },'testDOMRectReadOnlyConstructorInf1');
+        test(function() {
+            var x = 23;
+            var y = -Infinity;
+            var width = Infinity;
+            var height = -99;
+            checkDOMRect(new DOMRectReadOnly(x, y, width, height), { x, y, width, height });
+        },'testDOMRectReadOnlyConstructorInf2');
+        test(function() {
+            var x = 10;
+            var y = 12;
+            var width = 99;
+            var height = 102;
+            var domRect = new DOMRectReadOnly(x, y, width, height);
+            domRect.x = 1200;
+            domRect.height = 300;
+            checkDOMRect(domRect, { x, y, width, height });
+        },'testDOMRectReadOnlyIsReadOnly');
+        test(function() {
+            var x = 10;
+            var y = 12;
+            var width = 99;
+            var height = 102;
+            checkDOMRect(DOMRectReadOnly.fromRect({ x, y, width, height }), { x, y, width, height });
+        },'testDOMRectReadOnlyFromRect');
+        test(function() {
+            assert_true(DOMRectReadOnly.fromRect({ x:11, y:22, width:33, height:44 }) instanceof DOMRectReadOnly)
+        },'testFromRectReturnsDOMRectReadOnly');
+        test(function() {
+            var x = 10;
+            var width = 99;
+            checkDOMRect(DOMRectReadOnly.fromRect({ x, width }), { x, y:0, width, height:0 });
+        },'testDOMRectReadOnlyFromRectPartial');
+        test(function() {
+            var x = 10;
+            var y = 12;
+            var width = 99;
+            var height = -102;
+            checkDOMRect(DOMRectReadOnly.fromRect({ x, y, width, height }).toJSON(), { x, y, width, height });
+        },'testDOMRectReadOnlySerialization');
+
+        test(function() {
+            var x = 10;
+            var y = 12;
+            var width = 99;
+            var height = 102;
+            checkDOMRect(new DOMRect(x, y, width, height), { x, y, width, height });
+        },'testDOMRectConstructor0');
+        test(function() {
+            var x = 10;
+            var y = 12;
+            var width = 99;
+            var height = 102;
+            var domRect = new DOMRect(x, y, width, height);
+            domRect.x = 1200;
+            domRect.height = 300;
+            checkDOMRect(domRect, { x:1200, y, width, height:300 });
+        },'testDOMRectIsWritable');
+        test(function() {
+            var x = 10;
+            var y = 12;
+            var width = 99;
+            var height = 102;
+            var domRect = new DOMRect(x, y, width, height);
+            domRect.x = NaN;
+            domRect.height = NaN;
+            checkDOMRect(domRect, { x:NaN, y:12, width:99, height:NaN });
+        },'testDOMRectIsWritableWithNaN');
+        test(function() {
+            assert_true(DOMRect.fromRect({ x:11, y:22, width:33, height:44 }) instanceof DOMRect)
+        },'testFromRectReturnsDOMRect');
+        test(function() {
+            var x = 10;
+            var y = 12;
+            var width = 99;
+            var height = 102;
+            checkDOMRect(DOMRect.fromRect({ x, y, width, height }), { x, y, width, height });
+        },'testDOMRectFromRect');
+        test(function() {
+            var x = 10;
+            var y = 12;
+            var width = 99;
+            var height = -102;
+            checkDOMRect(DOMRect.fromRect({ x, y, width, height }).toJSON(), { x, y, width, height });
+        },'testDOMRectSerialization');
+
+        function checkDOMRect(r, exp) {
+            assert_equals(r.x, exp.x, &quot;Expected value for x is &quot; + exp.x);
+            assert_equals(r.y, exp.y, &quot;Expected value for y is &quot; + exp.y);
+            assert_equals(r.width, exp.width, &quot;Expected value for width is &quot; + exp.width);
+            assert_equals(r.height, exp.height, &quot;Expected value for height is &quot; + exp.height);
+
+            assert_equals(r.left, Math.min(exp.x, exp.x + exp.width), &quot;Expected value for left is &quot; + Math.min(exp.x, exp.x + exp.width));
+            assert_equals(r.right, Math.max(exp.x, exp.x + exp.width), &quot;Expected value for right is &quot; + Math.max(exp.x, exp.x + exp.width));
+            assert_equals(r.top, Math.min(exp.y, exp.y + exp.height), &quot;Expected value for top is &quot; + Math.min(exp.y, exp.y + exp.height));
+            assert_equals(r.bottom, Math.max(exp.y, exp.y + exp.height), &quot;Expected value for bottom is &quot; + Math.max(exp.y, exp.y + exp.height));
+        }
+    &lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdomglobalconstructorsattributesdedicatedworkerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt (207437 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt        2016-10-17 22:09:29 UTC (rev 207437)
+++ trunk/LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -59,6 +59,16 @@
</span><span class="cx"> PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').hasOwnProperty('set') is false
</span><span class="cx"> PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').enumerable is false
</span><span class="cx"> PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').configurable is true
</span><ins>+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMRect').value is DOMRect
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMRect').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMRect').configurable is true
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').value is DOMRectReadOnly
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').configurable is true
</ins><span class="cx"> PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DataView').value is DataView
</span><span class="cx"> PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DataView').hasOwnProperty('get') is false
</span><span class="cx"> PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DataView').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt (207437 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt        2016-10-17 22:09:29 UTC (rev 207437)
+++ trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -298,6 +298,16 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').value is DOMRect
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').value is DOMRectReadOnly
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').value is DOMStringList
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformefljsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt (207437 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt        2016-10-17 22:09:29 UTC (rev 207437)
+++ trunk/LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -298,6 +298,16 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').value is DOMRect
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').value is DOMRectReadOnly
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').value is DOMStringList
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkjsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt (207437 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt        2016-10-17 22:09:29 UTC (rev 207437)
+++ trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -333,6 +333,16 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').value is DOMRect
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').value is DOMRectReadOnly
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').value is DOMStringList
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacjsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt (207437 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt        2016-10-17 22:09:29 UTC (rev 207437)
+++ trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -343,6 +343,16 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').value is DOMRect
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').value is DOMRectReadOnly
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').value is DOMStringList
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1jsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt (207437 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt        2016-10-17 22:09:29 UTC (rev 207437)
+++ trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -343,6 +343,16 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').value is DOMRect
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').value is DOMRectReadOnly
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').value is DOMStringList
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacyosemitejsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt (207437 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt        2016-10-17 22:09:29 UTC (rev 207437)
+++ trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -343,6 +343,16 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').value is DOMRect
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').value is DOMRectReadOnly
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').value is DOMStringList
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsplatformwinjsdomglobalconstructorsattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt (207437 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt        2016-10-17 22:09:29 UTC (rev 207437)
+++ trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -238,6 +238,16 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMPointReadOnly').configurable is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').value is DOMRect
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRect').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').value is DOMRectReadOnly
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'DOMRectReadOnly').configurable is true
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').value is DOMStringList
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'DOMStringList').hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (207437 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2016-10-17 22:09:29 UTC (rev 207437)
+++ trunk/Source/WTF/ChangeLog        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-10-17  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Implement DOMRect/DOMRectReadOnly
+        https://bugs.webkit.org/show_bug.cgi?id=163464
+
+        Reviewed by Darin Adler.
+        
+        Implement min()/max() in a way that follows Math.min/Math.max, which return
+        NaN if either argument is NaN.
+
+        * wtf/MathExtras.h:
+        (WTF::nanPropagatingMin):
+        (WTF::nanPropagatingMax):
+
</ins><span class="cx"> 2016-10-15  Sam Weinig  &lt;sam@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         MessageEvent's source property should be a (DOMWindow or MessagePort)? rather than a EventTarget?
</span></span></pre></div>
<a id="trunkSourceWTFwtfMathExtrash"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/MathExtras.h (207437 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/MathExtras.h        2016-10-17 22:09:29 UTC (rev 207437)
+++ trunk/Source/WTF/wtf/MathExtras.h        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -400,6 +400,20 @@
</span><span class="cx">     return safeFPDivision(delta, std::abs(u)) &lt;= epsilon &amp;&amp; safeFPDivision(delta, std::abs(v)) &lt;= epsilon;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+// Match behavior of Math.min, where NaN is returned if either argument is NaN.
+template &lt;typename T&gt;
+inline typename std::enable_if&lt;std::is_floating_point&lt;T&gt;::value, T&gt;::type nanPropagatingMin(T a, T b)
+{
+    return std::isnan(a) || std::isnan(b) ? std::numeric_limits&lt;T&gt;::quiet_NaN() : std::min(a, b);
+}
+
+// Match behavior of Math.max, where NaN is returned if either argument is NaN.
+template &lt;typename T&gt;
+inline typename std::enable_if&lt;std::is_floating_point&lt;T&gt;::value, T&gt;::type nanPropagatingMax(T a, T b)
+{
+    return std::isnan(a) || std::isnan(b) ? std::numeric_limits&lt;T&gt;::quiet_NaN() : std::max(a, b);
+}
+
</ins><span class="cx"> inline bool isIntegral(float value)
</span><span class="cx"> {
</span><span class="cx">     return static_cast&lt;int&gt;(value) == value;
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (207437 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-10-17 22:09:29 UTC (rev 207437)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -389,6 +389,9 @@
</span><span class="cx">     dom/DOMPoint.idl
</span><span class="cx">     dom/DOMPointInit.idl
</span><span class="cx">     dom/DOMPointReadOnly.idl
</span><ins>+    dom/DOMRect.idl
+    dom/DOMRectInit.idl
+    dom/DOMRectReadOnly.idl
</ins><span class="cx">     dom/DOMStringList.idl
</span><span class="cx">     dom/DOMStringMap.idl
</span><span class="cx">     dom/DataTransfer.idl
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207437 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-17 22:09:29 UTC (rev 207437)
+++ trunk/Source/WebCore/ChangeLog        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -1,3 +1,50 @@
</span><ins>+2016-10-17  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Implement DOMRect/DOMRectReadOnly
+        https://bugs.webkit.org/show_bug.cgi?id=163464
+
+        Reviewed by Darin Adler.
+        
+        Implement the DOMRectInit/DOMRectReadOnly/DOMRect interfaces specified in
+        https://dev.w3.org/fxtf/geometry/
+        
+        DOMRects allow negative height/width and require double storage, so we can't just
+        use FloatRect for storage. They also require handling of NaN and Infinity.
+        
+        To have the left/right/top/bottom accessors follow IEEE NaN rules, we need to use
+        custom min/max functions that return NaN if either argument is NaN, so add 
+        nanPropagatingMin/nanPropagatingMax helpers to MathExtras.h.
+
+        Test: fast/dom/domrect.html
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        * dom/DOMRect.h: Added.
+        (WebCore::DOMRect::create):
+        (WebCore::DOMRect::fromRect):
+        (WebCore::DOMRect::setX):
+        (WebCore::DOMRect::setY):
+        (WebCore::DOMRect::setWidth):
+        (WebCore::DOMRect::setHeight):
+        (WebCore::DOMRect::DOMRect):
+        * dom/DOMRect.idl: Added.
+        * dom/DOMRectInit.h: Added.
+        * dom/DOMRectInit.idl: Added.
+        * dom/DOMRectReadOnly.h: Added.
+        (WebCore::DOMRectReadOnly::create):
+        (WebCore::DOMRectReadOnly::fromRect):
+        (WebCore::DOMRectReadOnly::x):
+        (WebCore::DOMRectReadOnly::y):
+        (WebCore::DOMRectReadOnly::width):
+        (WebCore::DOMRectReadOnly::height):
+        (WebCore::DOMRectReadOnly::top):
+        (WebCore::DOMRectReadOnly::right):
+        (WebCore::DOMRectReadOnly::bottom):
+        (WebCore::DOMRectReadOnly::left):
+        (WebCore::DOMRectReadOnly::DOMRectReadOnly):
+        * dom/DOMRectReadOnly.idl: Added.
+
</ins><span class="cx"> 2016-10-17  Antoine Quint  &lt;graouts@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Modern Media Controls] Basic MediaController
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (207437 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2016-10-17 22:09:29 UTC (rev 207437)
+++ trunk/Source/WebCore/DerivedSources.make        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -297,6 +297,9 @@
</span><span class="cx">     $(WebCore)/dom/DOMPoint.idl \
</span><span class="cx">     $(WebCore)/dom/DOMPointInit.idl \
</span><span class="cx">     $(WebCore)/dom/DOMPointReadOnly.idl \
</span><ins>+    $(WebCore)/dom/DOMRect.idl \
+    $(WebCore)/dom/DOMRectInit.idl \
+    $(WebCore)/dom/DOMRectReadOnly.idl \
</ins><span class="cx">     $(WebCore)/dom/DOMStringList.idl \
</span><span class="cx">     $(WebCore)/dom/DOMStringMap.idl \
</span><span class="cx">     $(WebCore)/dom/DataTransfer.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (207437 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-10-17 22:09:29 UTC (rev 207437)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -466,6 +466,15 @@
</span><span class="cx">                 0F3F0E5A157030C3006DA57F /* RenderGeometryMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F3F0E58157030C3006DA57F /* RenderGeometryMap.h */; };
</span><span class="cx">                 0F43C85D189E10CF00019AE2 /* PerformanceTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F43C85C189E10CF00019AE2 /* PerformanceTiming.cpp */; };
</span><span class="cx">                 0F43C85F189E15A600019AE2 /* JSPerformanceTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F43C85E189E15A600019AE2 /* JSPerformanceTiming.cpp */; };
</span><ins>+                0F4710AF1DB56AFC002DCEC3 /* DOMRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4710A91DB56AFC002DCEC3 /* DOMRect.h */; };
+                0F4710B11DB56AFC002DCEC3 /* DOMRectInit.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4710AB1DB56AFC002DCEC3 /* DOMRectInit.h */; };
+                0F4710B31DB56AFC002DCEC3 /* DOMRectReadOnly.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4710AD1DB56AFC002DCEC3 /* DOMRectReadOnly.h */; };
+                0F4710BB1DB56BE8002DCEC3 /* JSDOMRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F4710B51DB56BE8002DCEC3 /* JSDOMRect.cpp */; };
+                0F4710BC1DB56BE8002DCEC3 /* JSDOMRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4710B61DB56BE8002DCEC3 /* JSDOMRect.h */; };
+                0F4710BD1DB56BE8002DCEC3 /* JSDOMRectInit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F4710B71DB56BE8002DCEC3 /* JSDOMRectInit.cpp */; };
+                0F4710BE1DB56BE8002DCEC3 /* JSDOMRectInit.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4710B81DB56BE8002DCEC3 /* JSDOMRectInit.h */; };
+                0F4710BF1DB56BE8002DCEC3 /* JSDOMRectReadOnly.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F4710B91DB56BE8002DCEC3 /* JSDOMRectReadOnly.cpp */; };
+                0F4710C01DB56BE8002DCEC3 /* JSDOMRectReadOnly.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4710BA1DB56BE8002DCEC3 /* JSDOMRectReadOnly.h */; };
</ins><span class="cx">                 0F49669D1DB408C100A274BB /* DOMPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4966991DB408C100A274BB /* DOMPoint.h */; };
</span><span class="cx">                 0F49669F1DB408C100A274BB /* DOMPointReadOnly.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F49669B1DB408C100A274BB /* DOMPointReadOnly.h */; };
</span><span class="cx">                 0F4966A31DB4091000A274BB /* DOMPointInit.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4966A21DB4091000A274BB /* DOMPointInit.h */; };
</span><span class="lines">@@ -7309,6 +7318,18 @@
</span><span class="cx">                 0F3F0E58157030C3006DA57F /* RenderGeometryMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderGeometryMap.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F43C85C189E10CF00019AE2 /* PerformanceTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceTiming.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F43C85E189E15A600019AE2 /* JSPerformanceTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPerformanceTiming.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                0F4710A91DB56AFC002DCEC3 /* DOMRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMRect.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F4710AA1DB56AFC002DCEC3 /* DOMRect.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMRect.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F4710AB1DB56AFC002DCEC3 /* DOMRectInit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMRectInit.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F4710AC1DB56AFC002DCEC3 /* DOMRectInit.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMRectInit.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F4710AD1DB56AFC002DCEC3 /* DOMRectReadOnly.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMRectReadOnly.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F4710AE1DB56AFC002DCEC3 /* DOMRectReadOnly.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMRectReadOnly.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F4710B51DB56BE8002DCEC3 /* JSDOMRect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSDOMRect.cpp; path = JSDOMRect.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F4710B61DB56BE8002DCEC3 /* JSDOMRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSDOMRect.h; path = JSDOMRect.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F4710B71DB56BE8002DCEC3 /* JSDOMRectInit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSDOMRectInit.cpp; path = JSDOMRectInit.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F4710B81DB56BE8002DCEC3 /* JSDOMRectInit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSDOMRectInit.h; path = JSDOMRectInit.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F4710B91DB56BE8002DCEC3 /* JSDOMRectReadOnly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSDOMRectReadOnly.cpp; path = JSDOMRectReadOnly.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F4710BA1DB56BE8002DCEC3 /* JSDOMRectReadOnly.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSDOMRectReadOnly.h; path = JSDOMRectReadOnly.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 0F4966991DB408C100A274BB /* DOMPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMPoint.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F49669A1DB408C100A274BB /* DOMPoint.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMPoint.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F49669B1DB408C100A274BB /* DOMPointReadOnly.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMPointReadOnly.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -19959,6 +19980,12 @@
</span><span class="cx">                                 0F4966A71DB40C4300A274BB /* JSDOMPointInit.h */,
</span><span class="cx">                                 0F4966A81DB40C4300A274BB /* JSDOMPointReadOnly.cpp */,
</span><span class="cx">                                 0F4966A91DB40C4300A274BB /* JSDOMPointReadOnly.h */,
</span><ins>+                                0F4710B51DB56BE8002DCEC3 /* JSDOMRect.cpp */,
+                                0F4710B61DB56BE8002DCEC3 /* JSDOMRect.h */,
+                                0F4710B71DB56BE8002DCEC3 /* JSDOMRectInit.cpp */,
+                                0F4710B81DB56BE8002DCEC3 /* JSDOMRectInit.h */,
+                                0F4710B91DB56BE8002DCEC3 /* JSDOMRectReadOnly.cpp */,
+                                0F4710BA1DB56BE8002DCEC3 /* JSDOMRectReadOnly.h */,
</ins><span class="cx">                                 C5137CF011A58378004ADB99 /* JSDOMStringList.cpp */,
</span><span class="cx">                                 C5137CF111A58378004ADB99 /* JSDOMStringList.h */,
</span><span class="cx">                                 BC64649511D82349006455B0 /* JSDOMStringMap.cpp */,
</span><span class="lines">@@ -23425,6 +23452,12 @@
</span><span class="cx">                                 0F4966A11DB4090100A274BB /* DOMPointInit.idl */,
</span><span class="cx">                                 0F49669B1DB408C100A274BB /* DOMPointReadOnly.h */,
</span><span class="cx">                                 0F49669C1DB408C100A274BB /* DOMPointReadOnly.idl */,
</span><ins>+                                0F4710A91DB56AFC002DCEC3 /* DOMRect.h */,
+                                0F4710AA1DB56AFC002DCEC3 /* DOMRect.idl */,
+                                0F4710AB1DB56AFC002DCEC3 /* DOMRectInit.h */,
+                                0F4710AC1DB56AFC002DCEC3 /* DOMRectInit.idl */,
+                                0F4710AD1DB56AFC002DCEC3 /* DOMRectReadOnly.h */,
+                                0F4710AE1DB56AFC002DCEC3 /* DOMRectReadOnly.idl */,
</ins><span class="cx">                                 C55610F011A704EB00B82D27 /* DOMStringList.cpp */,
</span><span class="cx">                                 C544274911A57E7A0063A749 /* DOMStringList.h */,
</span><span class="cx">                                 C544274A11A57E7A0063A749 /* DOMStringList.idl */,
</span><span class="lines">@@ -24780,6 +24813,9 @@
</span><span class="cx">                                 0F49669D1DB408C100A274BB /* DOMPoint.h in Headers */,
</span><span class="cx">                                 0F4966A31DB4091000A274BB /* DOMPointInit.h in Headers */,
</span><span class="cx">                                 0F49669F1DB408C100A274BB /* DOMPointReadOnly.h in Headers */,
</span><ins>+                                0F4710AF1DB56AFC002DCEC3 /* DOMRect.h in Headers */,
+                                0F4710B11DB56AFC002DCEC3 /* DOMRectInit.h in Headers */,
+                                0F4710B31DB56AFC002DCEC3 /* DOMRectReadOnly.h in Headers */,
</ins><span class="cx">                                 5185FCB71BB4C7670012898F /* DOMRequestState.h in Headers */,
</span><span class="cx">                                 BC5A86850C33676000EEA649 /* DOMSelection.h in Headers */,
</span><span class="cx">                                 C544274B11A57E7A0063A749 /* DOMStringList.h in Headers */,
</span><span class="lines">@@ -25449,6 +25485,9 @@
</span><span class="cx">                                 0F4966AD1DB40C4300A274BB /* JSDOMPointInit.h in Headers */,
</span><span class="cx">                                 0F4966AF1DB40C4300A274BB /* JSDOMPointReadOnly.h in Headers */,
</span><span class="cx">                                 E172AF901811BC3700FBADB9 /* JSDOMPromise.h in Headers */,
</span><ins>+                                0F4710BC1DB56BE8002DCEC3 /* JSDOMRect.h in Headers */,
+                                0F4710BE1DB56BE8002DCEC3 /* JSDOMRectInit.h in Headers */,
+                                0F4710C01DB56BE8002DCEC3 /* JSDOMRectReadOnly.h in Headers */,
</ins><span class="cx">                                 BC5A86B60C3367E800EEA649 /* JSDOMSelection.h in Headers */,
</span><span class="cx">                                 C5137CF311A58378004ADB99 /* JSDOMStringList.h in Headers */,
</span><span class="cx">                                 BC64649811D82349006455B0 /* JSDOMStringMap.h in Headers */,
</span><span class="lines">@@ -29128,6 +29167,9 @@
</span><span class="cx">                                 0F4966AC1DB40C4300A274BB /* JSDOMPointInit.cpp in Sources */,
</span><span class="cx">                                 0F4966AE1DB40C4300A274BB /* JSDOMPointReadOnly.cpp in Sources */,
</span><span class="cx">                                 E172AF8F1811BC3700FBADB9 /* JSDOMPromise.cpp in Sources */,
</span><ins>+                                0F4710BB1DB56BE8002DCEC3 /* JSDOMRect.cpp in Sources */,
+                                0F4710BD1DB56BE8002DCEC3 /* JSDOMRectInit.cpp in Sources */,
+                                0F4710BF1DB56BE8002DCEC3 /* JSDOMRectReadOnly.cpp in Sources */,
</ins><span class="cx">                                 BC5A86B50C3367E800EEA649 /* JSDOMSelection.cpp in Sources */,
</span><span class="cx">                                 C5137CF211A58378004ADB99 /* JSDOMStringList.cpp in Sources */,
</span><span class="cx">                                 BC64649711D82349006455B0 /* JSDOMStringMap.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoredomDOMRecth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/dom/DOMRect.h (0 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DOMRect.h                                (rev 0)
+++ trunk/Source/WebCore/dom/DOMRect.h        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -0,0 +1,51 @@
</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. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;DOMRectReadOnly.h&quot;
+
+namespace WebCore {
+
+class DOMRect : public DOMRectReadOnly {
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    static Ref&lt;DOMRect&gt; create(double x, double y, double width, double height) { return adoptRef(*new DOMRect(x, y, width, height)); }
+    static Ref&lt;DOMRect&gt; fromRect(const DOMRectInit&amp; init) { return create(init.x, init.y, init.width, init.height); }
+
+    void setX(double x) { m_x = x; }
+    void setY(double y) { m_y = y; }
+
+    void setWidth(double width) { m_width = width; }
+    void setHeight(double height) { m_height = height; }
+
+private:
+    DOMRect(double x, double y, double width, double height)
+        : DOMRectReadOnly(x, y, width, height)
+    {
+    }
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoredomDOMRectidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/dom/DOMRect.idl (0 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DOMRect.idl                                (rev 0)
+++ trunk/Source/WebCore/dom/DOMRect.idl        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -0,0 +1,41 @@
</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. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// https://drafts.fxtf.org/geometry-1/#DOMRect
+
+[
+    Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
+        optional unrestricted double width = 0, optional unrestricted double height = 0),
+    Exposed=(Window,Worker),
+    ImplementationLacksVTable
+]
+interface DOMRect : DOMRectReadOnly {
+    [NewObject] static DOMRect fromRect(optional DOMRectInit other);
+
+    inherit attribute unrestricted double x;
+    inherit attribute unrestricted double y;
+    inherit attribute unrestricted double width;
+    inherit attribute unrestricted double height;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoredomDOMRectInith"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/dom/DOMRectInit.h (0 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DOMRectInit.h                                (rev 0)
+++ trunk/Source/WebCore/dom/DOMRectInit.h        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -0,0 +1,37 @@
</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. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+struct DOMRectInit {
+    double x { 0 };
+    double y { 0 };
+    double width { 0 };
+    double height { 0 };
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoredomDOMRectInitidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/dom/DOMRectInit.idl (0 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DOMRectInit.idl                                (rev 0)
+++ trunk/Source/WebCore/dom/DOMRectInit.idl        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -0,0 +1,33 @@
</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. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// https://drafts.fxtf.org/geometry-1/#DOMRect
+
+dictionary DOMRectInit {
+    unrestricted double x = 0;
+    unrestricted double y = 0;
+    unrestricted double width = 0;
+    unrestricted double height = 0;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoredomDOMRectReadOnlyh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/dom/DOMRectReadOnly.h (0 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DOMRectReadOnly.h                                (rev 0)
+++ trunk/Source/WebCore/dom/DOMRectReadOnly.h        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -0,0 +1,69 @@
</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. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;DOMRectInit.h&quot;
+#include &quot;ScriptWrappable.h&quot;
+#include &lt;wtf/MathExtras.h&gt;
+#include &lt;wtf/Ref.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+
+namespace WebCore {
+
+class DOMRectReadOnly : public ScriptWrappable, public RefCounted&lt;DOMRectReadOnly&gt; {
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    static Ref&lt;DOMRectReadOnly&gt; create(double x, double y, double width, double height) { return adoptRef(*new DOMRectReadOnly(x, y, width, height)); }
+    static Ref&lt;DOMRectReadOnly&gt; fromRect(const DOMRectInit&amp; init) { return create(init.x, init.y, init.width, init.height); }
+
+    double x() const { return m_x; }
+    double y() const { return m_y; }
+    double width() const { return m_width; }
+    double height() const { return m_height; }
+
+    // Model NaN handling after Math.min, Math.max.
+    double top() const { return WTF::nanPropagatingMin(m_y, m_y + m_height); }
+    double right() const { return WTF::nanPropagatingMax(m_x, m_x + m_width); }
+    double bottom() const { return WTF::nanPropagatingMax(m_y, m_y + m_height); }
+    double left() const { return WTF::nanPropagatingMin(m_x, m_x + m_width); }
+
+protected:
+    DOMRectReadOnly(double x, double y, double width, double height)
+        : m_x(x)
+        , m_y(y)
+        , m_width(width)
+        , m_height(height)
+    {
+    }
+
+    // Any of these can be NaN or Inf.
+    double m_x;
+    double m_y;
+    double m_width; // Can be negative.
+    double m_height; // Can be negative.
+}; 
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoredomDOMRectReadOnlyidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/dom/DOMRectReadOnly.idl (0 => 207438)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DOMRectReadOnly.idl                                (rev 0)
+++ trunk/Source/WebCore/dom/DOMRectReadOnly.idl        2016-10-17 22:30:34 UTC (rev 207438)
</span><span class="lines">@@ -0,0 +1,47 @@
</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. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// https://drafts.fxtf.org/geometry-1/#DOMRect
+
+[
+    Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
+        optional unrestricted double width = 0, optional unrestricted double height = 0),
+    Exposed=(Window,Worker),
+    ImplementationLacksVTable
+]
+interface DOMRectReadOnly {
+    [NewObject] static DOMRectReadOnly fromRect(optional DOMRectInit other);
+
+    readonly attribute unrestricted double x;
+    readonly attribute unrestricted double y;
+    readonly attribute unrestricted double width;
+    readonly attribute unrestricted double height;
+    readonly attribute unrestricted double top;
+    readonly attribute unrestricted double right;
+    readonly attribute unrestricted double bottom;
+    readonly attribute unrestricted double left;
+
+    serializer = { attribute };
+};
</ins></span></pre>
</div>
</div>

</body>
</html>