<!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>[203702] 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/203702">203702</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-07-25 17:21:31 -0700 (Mon, 25 Jul 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>ClientRect properties should be on the prototype
https://bugs.webkit.org/show_bug.cgi?id=160165
Reviewed by Geoffrey Garen.
Source/WebCore:
Move ClientRect properties from the instance to the prototype. This
matches the specification, Firefox and Chrome.
Also add a serializer to ClientRect in order to match the specification:
- https://drafts.fxtf.org/geometry/Overview.html#domrectreadonly
- https://heycam.github.io/webidl/#es-serializer
This avoids breaking content that relies on JSON.stringify() to
serialize ClientRect objects.
Tests: fast/css/ClientRect-attributes-prototype.html
fast/css/ClientRect-serialization.html
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSClientRectCustom.cpp: Added.
(WebCore::JSClientRect::toJSON):
* bindings/scripts/CodeGeneratorJS.pm:
* dom/ClientRect.idl:
LayoutTests:
* fast/css/ClientRect-attributes-prototype-expected.txt: Added.
* fast/css/ClientRect-attributes-prototype.html: Added.
Add layout test to check that ClientRect's properties are on the
prototype.
* fast/css/ClientRect-serialization-expected.txt: Added.
* fast/css/ClientRect-serialization.html: Added.
Add layout test to check that ClientRect has a serializer.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscss3flexboxalignabsolutechildexpectedtxt">trunk/LayoutTests/css3/flexbox/align-absolute-child-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSBindingsAllInOnecpp">trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCoredomClientRectidl">trunk/Source/WebCore/dom/ClientRect.idl</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcssClientRectattributesprototypeexpectedtxt">trunk/LayoutTests/fast/css/ClientRect-attributes-prototype-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssClientRectattributesprototypehtml">trunk/LayoutTests/fast/css/ClientRect-attributes-prototype.html</a></li>
<li><a href="#trunkLayoutTestsfastcssClientRectserializationexpectedtxt">trunk/LayoutTests/fast/css/ClientRect-serialization-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssClientRectserializationhtml">trunk/LayoutTests/fast/css/ClientRect-serialization.html</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSClientRectCustomcpp">trunk/Source/WebCore/bindings/js/JSClientRectCustom.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (203701 => 203702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-07-25 21:53:33 UTC (rev 203701)
+++ trunk/LayoutTests/ChangeLog        2016-07-26 00:21:31 UTC (rev 203702)
</span><span class="lines">@@ -1,5 +1,21 @@
</span><span class="cx"> 2016-07-25 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><ins>+ ClientRect properties should be on the prototype
+ https://bugs.webkit.org/show_bug.cgi?id=160165
+
+ Reviewed by Geoffrey Garen.
+
+ * fast/css/ClientRect-attributes-prototype-expected.txt: Added.
+ * fast/css/ClientRect-attributes-prototype.html: Added.
+ Add layout test to check that ClientRect's properties are on the
+ prototype.
+
+ * fast/css/ClientRect-serialization-expected.txt: Added.
+ * fast/css/ClientRect-serialization.html: Added.
+ Add layout test to check that ClientRect has a serializer.
+
+2016-07-25 Chris Dumez <cdumez@apple.com>
+
</ins><span class="cx"> Parameters to DOMImplementation.createDocumentType() should be mandatory and non-nullable
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=160167
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestscss3flexboxalignabsolutechildexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/flexbox/align-absolute-child-expected.txt (203701 => 203702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/flexbox/align-absolute-child-expected.txt        2016-07-25 21:53:33 UTC (rev 203701)
+++ trunk/LayoutTests/css3/flexbox/align-absolute-child-expected.txt        2016-07-26 00:21:31 UTC (rev 203702)
</span><span class="lines">@@ -4,6 +4,7 @@
</span><span class="cx"> PASS beforePosition[key] is afterPosition[key]
</span><span class="cx"> PASS beforePosition[key] is afterPosition[key]
</span><span class="cx"> PASS beforePosition[key] is afterPosition[key]
</span><ins>+PASS beforePosition[key] is afterPosition[key]
</ins><span class="cx"> PASS
</span><span class="cx"> PASS
</span><span class="cx"> PASS
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssClientRectattributesprototypeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/ClientRect-attributes-prototype-expected.txt (0 => 203702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/ClientRect-attributes-prototype-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/css/ClientRect-attributes-prototype-expected.txt        2016-07-26 00:21:31 UTC (rev 203702)
</span><span class="lines">@@ -0,0 +1,78 @@
</span><ins>+Test that ClientRect's properties are on the prototype.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS clientRect.__proto__ is ClientRect.prototype
+PASS Object.getOwnPropertyNames(clientRect).length is 0
+PASS Object.hasOwnProperty(clientRect, 'top') is false
+PASS Object.hasOwnProperty(clientRect, 'right') is false
+PASS Object.hasOwnProperty(clientRect, 'bottom') is false
+PASS Object.hasOwnProperty(clientRect, 'left') is false
+PASS Object.hasOwnProperty(clientRect, 'width') is false
+PASS Object.hasOwnProperty(clientRect, 'height') is false
+
+* clientRect.__proto__.top
+PASS descriptor.get is an instance of Function
+PASS descriptor.enumerable is true
+PASS descriptor.configurable is true
+
+* ClientRect.prototype.top
+PASS descriptor.get is an instance of Function
+PASS descriptor.enumerable is true
+PASS descriptor.configurable is true
+
+* clientRect.__proto__.right
+PASS descriptor.get is an instance of Function
+PASS descriptor.enumerable is true
+PASS descriptor.configurable is true
+
+* ClientRect.prototype.right
+PASS descriptor.get is an instance of Function
+PASS descriptor.enumerable is true
+PASS descriptor.configurable is true
+
+* clientRect.__proto__.bottom
+PASS descriptor.get is an instance of Function
+PASS descriptor.enumerable is true
+PASS descriptor.configurable is true
+
+* ClientRect.prototype.bottom
+PASS descriptor.get is an instance of Function
+PASS descriptor.enumerable is true
+PASS descriptor.configurable is true
+
+* clientRect.__proto__.left
+PASS descriptor.get is an instance of Function
+PASS descriptor.enumerable is true
+PASS descriptor.configurable is true
+
+* ClientRect.prototype.left
+PASS descriptor.get is an instance of Function
+PASS descriptor.enumerable is true
+PASS descriptor.configurable is true
+
+* clientRect.__proto__.width
+PASS descriptor.get is an instance of Function
+PASS descriptor.enumerable is true
+PASS descriptor.configurable is true
+
+* ClientRect.prototype.width
+PASS descriptor.get is an instance of Function
+PASS descriptor.enumerable is true
+PASS descriptor.configurable is true
+
+* clientRect.__proto__.height
+PASS descriptor.get is an instance of Function
+PASS descriptor.enumerable is true
+PASS descriptor.configurable is true
+
+* ClientRect.prototype.height
+PASS descriptor.get is an instance of Function
+PASS descriptor.enumerable is true
+PASS descriptor.configurable is true
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssClientRectattributesprototypehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/ClientRect-attributes-prototype.html (0 => 203702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/ClientRect-attributes-prototype.html         (rev 0)
+++ trunk/LayoutTests/fast/css/ClientRect-attributes-prototype.html        2016-07-26 00:21:31 UTC (rev 203702)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<body>
+<script src="../../resources/js-test-pre.js"></script>
+<script>
+description("Test that ClientRect's properties are on the prototype.");
+
+var clientRect = document.body.getBoundingClientRect();
+shouldBe("clientRect.__proto__", "ClientRect.prototype");
+shouldBe("Object.getOwnPropertyNames(clientRect).length", "0");
+shouldBeFalse("Object.hasOwnProperty(clientRect, 'top')");
+shouldBeFalse("Object.hasOwnProperty(clientRect, 'right')");
+shouldBeFalse("Object.hasOwnProperty(clientRect, 'bottom')");
+shouldBeFalse("Object.hasOwnProperty(clientRect, 'left')");
+shouldBeFalse("Object.hasOwnProperty(clientRect, 'width')");
+shouldBeFalse("Object.hasOwnProperty(clientRect, 'height')");
+
+function checkAttributeGetter(prototype, propertyName)
+{
+ descriptor = Object.getOwnPropertyDescriptor(prototype, propertyName);
+ shouldBeType("descriptor.get", "Function");
+ shouldBeTrue("descriptor.enumerable");
+ shouldBeTrue("descriptor.configurable");
+}
+
+for (var propertyName of ['top', 'right', 'bottom', 'left', 'width', 'height']) {
+ debug("");
+ debug("* clientRect.__proto__." + propertyName);
+ checkAttributeGetter(clientRect.__proto__, propertyName);
+
+ debug("");
+ debug("* ClientRect.prototype." + propertyName);
+ checkAttributeGetter(ClientRect.prototype, propertyName);
+}
+
+debug("");
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssClientRectserializationexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/ClientRect-serialization-expected.txt (0 => 203702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/ClientRect-serialization-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/css/ClientRect-serialization-expected.txt        2016-07-26 00:21:31 UTC (rev 203702)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+Test that ClientRect has a serializer
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS clientRect.__proto__ is ClientRect.prototype
+PASS toJSONDescriptor.value is an instance of Function
+PASS toJSONDescriptor.enumerable is true
+PASS toJSONDescriptor.configurable is true
+PASS toJSONDescriptor.writable is true
+PASS jsonObject = clientRect.toJSON() did not throw exception.
+PASS jsonObject.top is clientRect.top
+PASS jsonObject.right is clientRect.right
+PASS jsonObject.bottom is clientRect.bottom
+PASS jsonObject.left is clientRect.left
+PASS jsonObject.width is clientRect.width
+PASS jsonObject.height is clientRect.height
+PASS parsedJSONObject = JSON.parse(JSON.stringify(clientRect)) did not throw exception.
+PASS parsedJSONObject.top is clientRect.top
+PASS parsedJSONObject.right is clientRect.right
+PASS parsedJSONObject.bottom is clientRect.bottom
+PASS parsedJSONObject.left is clientRect.left
+PASS parsedJSONObject.width is clientRect.width
+PASS parsedJSONObject.height is clientRect.height
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssClientRectserializationhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/ClientRect-serialization.html (0 => 203702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/ClientRect-serialization.html         (rev 0)
+++ trunk/LayoutTests/fast/css/ClientRect-serialization.html        2016-07-26 00:21:31 UTC (rev 203702)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<body>
+<script src="../../resources/js-test-pre.js"></script>
+<script>
+description("Test that ClientRect has a serializer");
+
+var clientRect = document.body.getBoundingClientRect();
+shouldBe("clientRect.__proto__", "ClientRect.prototype");
+var toJSONDescriptor = Object.getOwnPropertyDescriptor(clientRect.__proto__, "toJSON");
+shouldBeType("toJSONDescriptor.value", "Function");
+shouldBeTrue("toJSONDescriptor.enumerable");
+shouldBeTrue("toJSONDescriptor.configurable");
+shouldBeTrue("toJSONDescriptor.writable");
+
+shouldNotThrow("jsonObject = clientRect.toJSON()");
+shouldBe("jsonObject.top", "clientRect.top");
+shouldBe("jsonObject.right", "clientRect.right");
+shouldBe("jsonObject.bottom", "clientRect.bottom");
+shouldBe("jsonObject.left", "clientRect.left");
+shouldBe("jsonObject.width", "clientRect.width");
+shouldBe("jsonObject.height", "clientRect.height");
+
+shouldNotThrow("parsedJSONObject = JSON.parse(JSON.stringify(clientRect))");
+shouldBe("parsedJSONObject.top", "clientRect.top");
+shouldBe("parsedJSONObject.right", "clientRect.right");
+shouldBe("parsedJSONObject.bottom", "clientRect.bottom");
+shouldBe("parsedJSONObject.left", "clientRect.left");
+shouldBe("parsedJSONObject.width", "clientRect.width");
+shouldBe("parsedJSONObject.height", "clientRect.height");
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (203701 => 203702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-07-25 21:53:33 UTC (rev 203701)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-07-26 00:21:31 UTC (rev 203702)
</span><span class="lines">@@ -1105,6 +1105,7 @@
</span><span class="cx"> bindings/js/JSCanvasRenderingContext2DCustom.cpp
</span><span class="cx"> bindings/js/JSCanvasRenderingContextCustom.cpp
</span><span class="cx"> bindings/js/JSCharacterDataCustom.cpp
</span><ins>+ bindings/js/JSClientRectCustom.cpp
</ins><span class="cx"> bindings/js/JSCommandLineAPIHostCustom.cpp
</span><span class="cx"> bindings/js/JSCryptoAlgorithmBuilder.cpp
</span><span class="cx"> bindings/js/JSCryptoAlgorithmDictionary.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (203701 => 203702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-07-25 21:53:33 UTC (rev 203701)
+++ trunk/Source/WebCore/ChangeLog        2016-07-26 00:21:31 UTC (rev 203702)
</span><span class="lines">@@ -1,5 +1,33 @@
</span><span class="cx"> 2016-07-25 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><ins>+ ClientRect properties should be on the prototype
+ https://bugs.webkit.org/show_bug.cgi?id=160165
+
+ Reviewed by Geoffrey Garen.
+
+ Move ClientRect properties from the instance to the prototype. This
+ matches the specification, Firefox and Chrome.
+
+ Also add a serializer to ClientRect in order to match the specification:
+ - https://drafts.fxtf.org/geometry/Overview.html#domrectreadonly
+ - https://heycam.github.io/webidl/#es-serializer
+
+ This avoids breaking content that relies on JSON.stringify() to
+ serialize ClientRect objects.
+
+ Tests: fast/css/ClientRect-attributes-prototype.html
+ fast/css/ClientRect-serialization.html
+
+ * CMakeLists.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSBindingsAllInOne.cpp:
+ * bindings/js/JSClientRectCustom.cpp: Added.
+ (WebCore::JSClientRect::toJSON):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * dom/ClientRect.idl:
+
+2016-07-25 Chris Dumez <cdumez@apple.com>
+
</ins><span class="cx"> Parameters to DOMImplementation.createDocumentType() should be mandatory and non-nullable
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=160167
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (203701 => 203702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-07-25 21:53:33 UTC (rev 203701)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-07-26 00:21:31 UTC (rev 203702)
</span><span class="lines">@@ -1795,6 +1795,7 @@
</span><span class="cx">                 4669B2871B852A0B000F905F /* JSDOMNamedFlowCollectionCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46F2768E1B85297F005C2556 /* JSDOMNamedFlowCollectionCustom.cpp */; };
</span><span class="cx">                 467302021C4EFE7800BCB357 /* IgnoreOpensDuringUnloadCountIncrementer.h in Headers */ = {isa = PBXBuildFile; fileRef = 467302011C4EFE6600BCB357 /* IgnoreOpensDuringUnloadCountIncrementer.h */; };
</span><span class="cx">                 4689F1AF1267BAE100E8D380 /* FileMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 4689F1AE1267BAE100E8D380 /* FileMetadata.h */; };
</span><ins>+                46A58AC51D46B3FA00432036 /* JSClientRectCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A58AC41D46B3FA00432036 /* JSClientRectCustom.cpp */; };
</ins><span class="cx">                 46B63F6C1C6E8D19002E914B /* JSEventTargetCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 46B63F6B1C6E8CDF002E914B /* JSEventTargetCustom.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 46C83EFD1A9BBE2900A79A41 /* GeoNotifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46C83EFB1A9BBE2900A79A41 /* GeoNotifier.cpp */; };
</span><span class="cx">                 46C83EFE1A9BBE2900A79A41 /* GeoNotifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 46C83EFC1A9BBE2900A79A41 /* GeoNotifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -6905,11 +6906,11 @@
</span><span class="cx">                 F98FFF4411A2676200F548E8 /* CSSOMUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F98FFF4211A2676200F548E8 /* CSSOMUtils.cpp */; };
</span><span class="cx">                 F98FFF4511A2676200F548E8 /* CSSOMUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = F98FFF4311A2676200F548E8 /* CSSOMUtils.h */; };
</span><span class="cx">                 F9F0ED7A0DB50CA200D16DB9 /* XMLHttpRequestProgressEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = F9F0ED770DB50CA200D16DB9 /* XMLHttpRequestProgressEvent.h */; };
</span><ins>+                FA654A6B1108ABED002615E0 /* MathMLTextElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA654A691108ABED002615E0 /* MathMLTextElement.cpp */; };
</ins><span class="cx">                 FA654A6B1108ABED002616F1 /* MathMLOperatorElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA654A691108ABED002616F1 /* MathMLOperatorElement.cpp */; };
</span><ins>+                FA654A6B1108ABED002626F1 /* MathMLUnderOverElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA654A691108ABED002626F1 /* MathMLUnderOverElement.cpp */; };
+                FA654A6C1108ABED002615E0 /* MathMLTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = FA654A6A1108ABED002615E0 /* MathMLTextElement.h */; };
</ins><span class="cx">                 FA654A6C1108ABED002616F1 /* MathMLOperatorElement.h in Headers */ = {isa = PBXBuildFile; fileRef = FA654A6A1108ABED002616F1 /* MathMLOperatorElement.h */; };
</span><del>-                FA654A6B1108ABED002615E0 /* MathMLTextElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA654A691108ABED002615E0 /* MathMLTextElement.cpp */; };
-                FA654A6C1108ABED002615E0 /* MathMLTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = FA654A6A1108ABED002615E0 /* MathMLTextElement.h */; };
-                FA654A6B1108ABED002626F1 /* MathMLUnderOverElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA654A691108ABED002626F1 /* MathMLUnderOverElement.cpp */; };
</del><span class="cx">                 FA654A6C1108ABED002626F1 /* MathMLUnderOverElement.h in Headers */ = {isa = PBXBuildFile; fileRef = FA654A6A1108ABED002626F1 /* MathMLUnderOverElement.h */; };
</span><span class="cx">                 FABE72F41059C1EB00D999DD /* MathMLElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABE72ED1059C1EB00D999DD /* MathMLElement.cpp */; };
</span><span class="cx">                 FABE72F51059C1EB00D999DD /* MathMLElement.h in Headers */ = {isa = PBXBuildFile; fileRef = FABE72EE1059C1EB00D999DD /* MathMLElement.h */; };
</span><span class="lines">@@ -9420,6 +9421,7 @@
</span><span class="cx">                 465A8E781C8A24CE00E7D3E4 /* RuntimeApplicationChecks.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RuntimeApplicationChecks.mm; sourceTree = "<group>"; };
</span><span class="cx">                 467302011C4EFE6600BCB357 /* IgnoreOpensDuringUnloadCountIncrementer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IgnoreOpensDuringUnloadCountIncrementer.h; sourceTree = "<group>"; };
</span><span class="cx">                 4689F1AE1267BAE100E8D380 /* FileMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileMetadata.h; sourceTree = "<group>"; };
</span><ins>+                46A58AC41D46B3FA00432036 /* JSClientRectCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSClientRectCustom.cpp; sourceTree = "<group>"; };
</ins><span class="cx">                 46B63F6B1C6E8CDF002E914B /* JSEventTargetCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEventTargetCustom.h; sourceTree = "<group>"; };
</span><span class="cx">                 46C83EFB1A9BBE2900A79A41 /* GeoNotifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeoNotifier.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 46C83EFC1A9BBE2900A79A41 /* GeoNotifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeoNotifier.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -15087,11 +15089,11 @@
</span><span class="cx">                 F9F0ED780DB50CA200D16DB9 /* XMLHttpRequestProgressEvent.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = XMLHttpRequestProgressEvent.idl; sourceTree = "<group>"; };
</span><span class="cx">                 FA654A631108ABB7002615E0 /* mathml.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = mathml.css; sourceTree = "<group>"; };
</span><span class="cx">                 FA654A671108ABE2002615E0 /* mathattrs.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mathattrs.in; sourceTree = "<group>"; };
</span><ins>+                FA654A691108ABED002615E0 /* MathMLTextElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLTextElement.cpp; sourceTree = "<group>"; };
</ins><span class="cx">                 FA654A691108ABED002616F1 /* MathMLOperatorElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLOperatorElement.cpp; sourceTree = "<group>"; };
</span><ins>+                FA654A691108ABED002626F1 /* MathMLUnderOverElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLUnderOverElement.cpp; sourceTree = "<group>"; };
+                FA654A6A1108ABED002615E0 /* MathMLTextElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLTextElement.h; sourceTree = "<group>"; };
</ins><span class="cx">                 FA654A6A1108ABED002616F1 /* MathMLOperatorElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLOperatorElement.h; sourceTree = "<group>"; };
</span><del>-                FA654A691108ABED002615E0 /* MathMLTextElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLTextElement.cpp; sourceTree = "<group>"; };
-                FA654A6A1108ABED002615E0 /* MathMLTextElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLTextElement.h; sourceTree = "<group>"; };
-                FA654A691108ABED002626F1 /* MathMLUnderOverElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLUnderOverElement.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 FA654A6A1108ABED002626F1 /* MathMLUnderOverElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLUnderOverElement.h; sourceTree = "<group>"; };
</span><span class="cx">                 FA6E466FCD0418A9966A5B60 /* DNSResolveQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DNSResolveQueue.h; sourceTree = "<group>"; };
</span><span class="cx">                 FABE72ED1059C1EB00D999DD /* MathMLElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLElement.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -22527,6 +22529,7 @@
</span><span class="cx">                                 1432E8460C51493800B1500F /* GCController.h */,
</span><span class="cx">                                 C585A66011D4FAC5004C3E4B /* IDBBindingUtilities.cpp */,
</span><span class="cx">                                 C585A66111D4FAC5004C3E4B /* IDBBindingUtilities.h */,
</span><ins>+                                46A58AC41D46B3FA00432036 /* JSClientRectCustom.cpp */,
</ins><span class="cx">                                 E157A8EE18185425009F821D /* JSCryptoAlgorithmBuilder.cpp */,
</span><span class="cx">                                 E157A8EF18185425009F821D /* JSCryptoAlgorithmBuilder.h */,
</span><span class="cx">                                 E1C657101815F9DD00256CDD /* JSCryptoAlgorithmDictionary.cpp */,
</span><span class="lines">@@ -32027,6 +32030,7 @@
</span><span class="cx">                                 24D912B013CA9A1F00D21915 /* SVGAltGlyphDefElement.cpp in Sources */,
</span><span class="cx">                                 65653F2D0D9727D200CA9723 /* SVGAltGlyphElement.cpp in Sources */,
</span><span class="cx">                                 24D912B713CA9A6900D21915 /* SVGAltGlyphItemElement.cpp in Sources */,
</span><ins>+                                46A58AC51D46B3FA00432036 /* JSClientRectCustom.cpp in Sources */,
</ins><span class="cx">                                 B22279760D00BF220071B782 /* SVGAngle.cpp in Sources */,
</span><span class="cx">                                 B22279790D00BF220071B782 /* SVGAnimateColorElement.cpp in Sources */,
</span><span class="cx">                                 4362C7B913AC6F1A00344BEB /* SVGAnimatedAngle.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSBindingsAllInOnecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp (203701 => 203702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp        2016-07-25 21:53:33 UTC (rev 203701)
+++ trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp        2016-07-26 00:21:31 UTC (rev 203702)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> #include "JSCanvasRenderingContext2DCustom.cpp"
</span><span class="cx"> #include "JSCanvasRenderingContextCustom.cpp"
</span><span class="cx"> #include "JSCharacterDataCustom.cpp"
</span><ins>+#include "JSClientRectCustom.cpp"
</ins><span class="cx"> #include "JSCommandLineAPIHostCustom.cpp"
</span><span class="cx"> #include "JSCryptoCustom.cpp"
</span><span class="cx"> #include "JSCustomEventCustom.cpp"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSClientRectCustomcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/js/JSClientRectCustom.cpp (0 => 203702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSClientRectCustom.cpp         (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSClientRectCustom.cpp        2016-07-26 00:21:31 UTC (rev 203702)
</span><span class="lines">@@ -0,0 +1,58 @@
</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.
+ */
+
+#include "config.h"
+#include "JSClientRect.h"
+
+#include "ClientRect.h"
+#include <bytecode/CodeBlock.h>
+#include <runtime/IdentifierInlines.h>
+#include <runtime/JSObject.h>
+#include <runtime/ObjectConstructor.h>
+#include <wtf/text/StringBuilder.h>
+
+namespace WebCore {
+
+using namespace JSC;
+
+JSC::JSValue JSClientRect::toJSON(ExecState& state)
+{
+ ClientRect& rect = wrapped();
+ VM& vm = state.vm();
+
+ JSValue object = constructEmptyObject(&state);
+ CodeBlock* codeBlock = state.codeBlock();
+ PutPropertySlot slot(object, codeBlock ? codeBlock->isStrictMode() : false);
+ object.put(&state, Identifier::fromString(&vm, ASCIILiteral("top")), jsNumber(rect.top()), slot);
+ object.put(&state, Identifier::fromString(&vm, ASCIILiteral("right")), jsNumber(rect.right()), slot);
+ object.put(&state, Identifier::fromString(&vm, ASCIILiteral("bottom")), jsNumber(rect.bottom()), slot);
+ object.put(&state, Identifier::fromString(&vm, ASCIILiteral("left")), jsNumber(rect.left()), slot);
+ object.put(&state, Identifier::fromString(&vm, ASCIILiteral("width")), jsNumber(rect.width()), slot);
+ object.put(&state, Identifier::fromString(&vm, ASCIILiteral("height")), jsNumber(rect.height()), slot);
+
+ return object;
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (203701 => 203702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-07-25 21:53:33 UTC (rev 203701)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-07-26 00:21:31 UTC (rev 203702)
</span><span class="lines">@@ -541,7 +541,6 @@
</span><span class="cx">
</span><span class="cx"> # Needed for compatibility with existing content
</span><span class="cx"> return 1 if $interfaceName =~ "Touch";
</span><del>- return 1 if $interfaceName =~ "ClientRect";
</del><span class="cx">
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomClientRectidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ClientRect.idl (203701 => 203702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ClientRect.idl        2016-07-25 21:53:33 UTC (rev 203701)
+++ trunk/Source/WebCore/dom/ClientRect.idl        2016-07-26 00:21:31 UTC (rev 203702)
</span><span class="lines">@@ -34,5 +34,8 @@
</span><span class="cx"> readonly attribute unrestricted float left;
</span><span class="cx"> readonly attribute unrestricted float width;
</span><span class="cx"> readonly attribute unrestricted float height;
</span><ins>+
+ // FIXME: should be serializer = { attribute };
+ [Custom] Object toJSON();
</ins><span class="cx"> };
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>