<!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>[212193] 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/212193">212193</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2017-02-11 07:14:47 -0800 (Sat, 11 Feb 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Implement URL's toJSON()
https://bugs.webkit.org/show_bug.cgi?id=167979

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Re-sync URL tests from upstream to gain test coverage for
URL's toJSON().

* web-platform-tests/url/interfaces-expected.txt:
* web-platform-tests/url/interfaces.html:
* web-platform-tests/url/url-tojson-expected.txt: Added.
* web-platform-tests/url/url-tojson.html: Added.
* web-platform-tests/url/w3c-import.log:

Source/WebCore:

Implement URL's toJSON() as per:
- https://url.spec.whatwg.org/#dom-url-tojson

This is already supported by Firefox.

Also, drop URLUtils.idl as it is no longer in the specification.
Merge its content to DOMURL.idl as per the URL specification.

Finally, mark href attribute as stringifier and drop the toString()
operation to match the specification. This fixes a bug where our
toString property was not enumerable but should have been.

Tests: fast/url/url-tojson.html
       imported/w3c/web-platform-tests/url/url-tojson.html

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* html/DOMURL.idl:
* html/URLUtils.h:
(WebCore::URLUtils&lt;T&gt;::toJSON):
* html/URLUtils.idl: Removed.

LayoutTests:

Extend test coverage.

* fast/url/url-tojson-expected.txt: Added.
* fast/url/url-tojson.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlinterfacesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/interfaces-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlinterfaceshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/url/interfaces.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/url/w3c-import.log</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="#trunkSourceWebCoreDerivedSourcescpp">trunk/Source/WebCore/DerivedSources.cpp</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>
<li><a href="#trunkSourceWebCorehtmlDOMURLidl">trunk/Source/WebCore/html/DOMURL.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlURLUtilsh">trunk/Source/WebCore/html/URLUtils.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasturlurltojsonexpectedtxt">trunk/LayoutTests/fast/url/url-tojson-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasturlurltojsonhtml">trunk/LayoutTests/fast/url/url-tojson.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurltojsonexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-tojson-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurltojsonhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-tojson.html</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorehtmlURLUtilsidl">trunk/Source/WebCore/html/URLUtils.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (212192 => 212193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-02-11 14:29:52 UTC (rev 212192)
+++ trunk/LayoutTests/ChangeLog        2017-02-11 15:14:47 UTC (rev 212193)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2017-02-11  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Implement URL's toJSON()
+        https://bugs.webkit.org/show_bug.cgi?id=167979
+
+        Reviewed by Sam Weinig.
+
+        Extend test coverage.
+
+        * fast/url/url-tojson-expected.txt: Added.
+        * fast/url/url-tojson.html: Added.
+
</ins><span class="cx"> 2017-02-11  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed GTK+ gardening. Update several tests expected to timeout that are failing now.
</span></span></pre></div>
<a id="trunkLayoutTestsfasturlurltojsonexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/url/url-tojson-expected.txt (0 => 212193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/url/url-tojson-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/url/url-tojson-expected.txt        2017-02-11 15:14:47 UTC (rev 212193)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+Basic test for URL.toJSON()
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS new URL('https://example.com/').toJSON() is &quot;https://example.com/&quot;
+PASS new URL('https://example.com/').toString() is &quot;https://example.com/&quot;
+PASS new URL('https://example.com/').href is &quot;https://example.com/&quot;
+PASS JSON.stringify(new URL('https://example.com/#&quot;')) is &quot;\&quot;https://example.com/#\\\&quot;\&quot;&quot;
+PASS JSON.parse(JSON.stringify(new URL('https://example.com/#&quot;'))) is &quot;https://example.com/#\&quot;&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfasturlurltojsonhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/url/url-tojson.html (0 => 212193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/url/url-tojson.html                                (rev 0)
+++ trunk/LayoutTests/fast/url/url-tojson.html        2017-02-11 15:14:47 UTC (rev 212193)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+description(&quot;Basic test for URL.toJSON()&quot;);
+
+shouldBeEqualToString(&quot;new URL('https://example.com/').toJSON()&quot;, &quot;https://example.com/&quot;);
+shouldBeEqualToString(&quot;new URL('https://example.com/').toString()&quot;, &quot;https://example.com/&quot;);
+shouldBeEqualToString(&quot;new URL('https://example.com/').href&quot;, &quot;https://example.com/&quot;);
+shouldBeEqualToString(&quot;JSON.stringify(new URL('https://example.com/#\&quot;'))&quot;, &quot;\&quot;https://example.com/#\\\&quot;\&quot;&quot;);
+shouldBeEqualToString(&quot;JSON.parse(JSON.stringify(new URL('https://example.com/#\&quot;')))&quot;, &quot;https://example.com/#\&quot;&quot;);
+
+&lt;/script&gt;
+&lt;/body&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (212192 => 212193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2017-02-11 14:29:52 UTC (rev 212192)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2017-02-11 15:14:47 UTC (rev 212193)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2017-02-11  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Implement URL's toJSON()
+        https://bugs.webkit.org/show_bug.cgi?id=167979
+
+        Reviewed by Sam Weinig.
+
+        Re-sync URL tests from upstream to gain test coverage for
+        URL's toJSON().
+
+        * web-platform-tests/url/interfaces-expected.txt:
+        * web-platform-tests/url/interfaces.html:
+        * web-platform-tests/url/url-tojson-expected.txt: Added.
+        * web-platform-tests/url/url-tojson.html: Added.
+        * web-platform-tests/url/w3c-import.log:
+
</ins><span class="cx"> 2017-02-10  Sam Weinig  &lt;sam@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [WebIDL] Cleanup XMLHttpRequest's bindings
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlinterfacesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/url/interfaces-expected.txt (212192 => 212193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/interfaces-expected.txt        2017-02-11 14:29:52 UTC (rev 212192)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/interfaces-expected.txt        2017-02-11 15:14:47 UTC (rev 212193)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx"> PASS URL interface: existence and properties of interface prototype object 
</span><span class="cx"> PASS URL interface: existence and properties of interface prototype object's &quot;constructor&quot; property 
</span><span class="cx"> PASS URL interface: attribute href 
</span><del>-FAIL URL interface: stringifier assert_true: property is not enumerable expected true got false
</del><ins>+PASS URL interface: stringifier 
</ins><span class="cx"> PASS URL interface: attribute origin 
</span><span class="cx"> PASS URL interface: attribute protocol 
</span><span class="cx"> PASS URL interface: attribute username 
</span><span class="lines">@@ -19,6 +19,7 @@
</span><span class="cx"> PASS URL interface: attribute search 
</span><span class="cx"> PASS URL interface: attribute searchParams 
</span><span class="cx"> PASS URL interface: attribute hash 
</span><ins>+PASS URL interface: operation toJSON() 
</ins><span class="cx"> PASS URL must be primary interface of new URL(&quot;http://foo&quot;) 
</span><span class="cx"> PASS Stringification of new URL(&quot;http://foo&quot;) 
</span><span class="cx"> PASS URL interface: new URL(&quot;http://foo&quot;) must inherit property &quot;href&quot; with the proper type (0) 
</span><span class="lines">@@ -33,6 +34,7 @@
</span><span class="cx"> PASS URL interface: new URL(&quot;http://foo&quot;) must inherit property &quot;search&quot; with the proper type (9) 
</span><span class="cx"> PASS URL interface: new URL(&quot;http://foo&quot;) must inherit property &quot;searchParams&quot; with the proper type (10) 
</span><span class="cx"> PASS URL interface: new URL(&quot;http://foo&quot;) must inherit property &quot;hash&quot; with the proper type (11) 
</span><ins>+PASS URL interface: new URL(&quot;http://foo&quot;) must inherit property &quot;toJSON&quot; with the proper type (12) 
</ins><span class="cx"> PASS URLSearchParams interface: existence and properties of interface object 
</span><span class="cx"> PASS URLSearchParams interface object length 
</span><span class="cx"> PASS URLSearchParams interface object name 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlinterfaceshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/url/interfaces.html (212192 => 212193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/interfaces.html        2017-02-11 14:29:52 UTC (rev 212192)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/interfaces.html        2017-02-11 15:14:47 UTC (rev 212193)
</span><span class="lines">@@ -24,6 +24,8 @@
</span><span class="cx">            attribute USVString search;
</span><span class="cx">   readonly attribute URLSearchParams searchParams;
</span><span class="cx">            attribute USVString hash;
</span><ins>+
+  USVString toJSON();
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> [Constructor(optional (USVString or URLSearchParams) init = &quot;&quot;),
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurltojsonexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-tojson-expected.txt (0 => 212193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-tojson-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-tojson-expected.txt        2017-02-11 15:14:47 UTC (rev 212193)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS URL's toJSON() 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurltojsonhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-tojson.html (0 => 212193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-tojson.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-tojson.html        2017-02-11 15:14:47 UTC (rev 212193)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;meta charset=utf-8&gt;
+&lt;title&gt;URL's toJSON()&lt;/title&gt;
+&lt;script src=/resources/testharness.js&gt;&lt;/script&gt;
+&lt;script src=/resources/testharnessreport.js&gt;&lt;/script&gt;
+&lt;div id=log&gt;&lt;/div&gt;
+&lt;script&gt;
+test(() =&gt; {
+  const a = new URL(&quot;https://example.com/&quot;)
+  assert_equals(JSON.stringify(a), &quot;\&quot;https://example.com/\&quot;&quot;)
+})
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/url/w3c-import.log (212192 => 212193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/w3c-import.log        2017-02-11 14:29:52 UTC (rev 212192)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/w3c-import.log        2017-02-11 15:14:47 UTC (rev 212193)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/url/url-constructor.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/url/url-origin.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/url/url-setters.html
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/url/url-tojson.html 
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-append.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-constructor.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-delete.html
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (212192 => 212193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2017-02-11 14:29:52 UTC (rev 212192)
+++ trunk/Source/WebCore/CMakeLists.txt        2017-02-11 15:14:47 UTC (rev 212193)
</span><span class="lines">@@ -564,7 +564,6 @@
</span><span class="cx">     html/TextMetrics.idl
</span><span class="cx">     html/TimeRanges.idl
</span><span class="cx">     html/URLSearchParams.idl
</span><del>-    html/URLUtils.idl
</del><span class="cx">     html/ValidityState.idl
</span><span class="cx">     html/VoidCallback.idl
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (212192 => 212193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-02-11 14:29:52 UTC (rev 212192)
+++ trunk/Source/WebCore/ChangeLog        2017-02-11 15:14:47 UTC (rev 212193)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2017-02-11  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Implement URL's toJSON()
+        https://bugs.webkit.org/show_bug.cgi?id=167979
+
+        Reviewed by Sam Weinig.
+
+        Implement URL's toJSON() as per:
+        - https://url.spec.whatwg.org/#dom-url-tojson
+
+        This is already supported by Firefox.
+
+        Also, drop URLUtils.idl as it is no longer in the specification.
+        Merge its content to DOMURL.idl as per the URL specification.
+
+        Finally, mark href attribute as stringifier and drop the toString()
+        operation to match the specification. This fixes a bug where our
+        toString property was not enumerable but should have been.
+
+        Tests: fast/url/url-tojson.html
+               imported/w3c/web-platform-tests/url/url-tojson.html
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        * html/DOMURL.idl:
+        * html/URLUtils.h:
+        (WebCore::URLUtils&lt;T&gt;::toJSON):
+        * html/URLUtils.idl: Removed.
+
</ins><span class="cx"> 2017-02-11  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK][EFL] Implement MIMETypeRegistry::getPreferredExtensionForMIMEType
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.cpp (212192 => 212193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.cpp        2017-02-11 14:29:52 UTC (rev 212192)
+++ trunk/Source/WebCore/DerivedSources.cpp        2017-02-11 15:14:47 UTC (rev 212193)
</span><span class="lines">@@ -615,7 +615,6 @@
</span><span class="cx"> #include &quot;JSTreeWalker.cpp&quot;
</span><span class="cx"> #include &quot;JSUIEvent.cpp&quot;
</span><span class="cx"> #include &quot;JSUIEventInit.cpp&quot;
</span><del>-#include &quot;JSURLUtils.cpp&quot;
</del><span class="cx"> #if ENABLE(USER_MESSAGE_HANDLERS)
</span><span class="cx"> #include &quot;JSUserMessageHandler.cpp&quot;
</span><span class="cx"> #include &quot;JSUserMessageHandlersNamespace.cpp&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (212192 => 212193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2017-02-11 14:29:52 UTC (rev 212192)
+++ trunk/Source/WebCore/DerivedSources.make        2017-02-11 15:14:47 UTC (rev 212193)
</span><span class="lines">@@ -495,7 +495,6 @@
</span><span class="cx">     $(WebCore)/html/TextMetrics.idl \
</span><span class="cx">     $(WebCore)/html/TimeRanges.idl \
</span><span class="cx">     $(WebCore)/html/URLSearchParams.idl \
</span><del>-    $(WebCore)/html/URLUtils.idl \
</del><span class="cx">     $(WebCore)/html/ValidityState.idl \
</span><span class="cx">     $(WebCore)/html/VoidCallback.idl \
</span><span class="cx">     $(WebCore)/html/WebKitMediaKeyError.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (212192 => 212193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-02-11 14:29:52 UTC (rev 212192)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-02-11 15:14:47 UTC (rev 212193)
</span><span class="lines">@@ -9812,7 +9812,6 @@
</span><span class="cx">                 5C4304AF191AC908000E2BC0 /* EXTShaderTextureLOD.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EXTShaderTextureLOD.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5C4304B3191AEF46000E2BC0 /* JSEXTShaderTextureLOD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEXTShaderTextureLOD.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5C4304B4191AEF46000E2BC0 /* JSEXTShaderTextureLOD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEXTShaderTextureLOD.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                5C5381AE1D8791CA00E2EBE6 /* URLUtils.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = URLUtils.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 5C5381AF1D8793E000E2EBE6 /* URLSearchParams.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = URLSearchParams.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5C5381B01D87D45700E2EBE6 /* URLSearchParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = URLSearchParams.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5C5381B11D87D45700E2EBE6 /* URLSearchParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLSearchParams.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -19519,7 +19518,6 @@
</span><span class="cx">                                 5C5381B11D87D45700E2EBE6 /* URLSearchParams.h */,
</span><span class="cx">                                 5C5381AF1D8793E000E2EBE6 /* URLSearchParams.idl */,
</span><span class="cx">                                 656B9DCA189DE10000BB842C /* URLUtils.h */,
</span><del>-                                5C5381AE1D8791CA00E2EBE6 /* URLUtils.idl */,
</del><span class="cx">                                 F5A154251279534D00D0B0C0 /* ValidationMessage.cpp */,
</span><span class="cx">                                 F5A154261279534D00D0B0C0 /* ValidationMessage.h */,
</span><span class="cx">                                 15C7708A100D3C6A005BA267 /* ValidityState.h */,
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlDOMURLidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/DOMURL.idl (212192 => 212193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/DOMURL.idl        2017-02-11 14:29:52 UTC (rev 212192)
+++ trunk/Source/WebCore/html/DOMURL.idl        2017-02-11 15:14:47 UTC (rev 212193)
</span><span class="lines">@@ -36,8 +36,22 @@
</span><span class="cx">     ImplementationLacksVTable,
</span><span class="cx">     ExportMacro=WEBCORE_EXPORT,
</span><span class="cx"> ] interface DOMURL {
</span><ins>+    [SetterMayThrowException, URL] stringifier attribute USVString href;
+    readonly attribute USVString origin;
+    attribute USVString protocol;
+    attribute USVString username;
+    attribute USVString password;
+    attribute USVString host;
+    attribute USVString hostname;
+    attribute USVString port;
+    attribute USVString pathname;
+    attribute USVString hash;
+    attribute USVString search;
+    [CachedAttribute] readonly attribute URLSearchParams searchParams;
+
+    USVString toJSON();
+
+    // https://w3c.github.io/FileAPI/#creating-revoking.
</ins><span class="cx">     [CallWith=ScriptExecutionContext] static DOMString createObjectURL(Blob blob);
</span><span class="cx">     [CallWith=ScriptExecutionContext] static void revokeObjectURL(DOMString url);
</span><span class="cx"> };
</span><del>-
-DOMURL implements URLUtils;
</del></span></pre></div>
<a id="trunkSourceWebCorehtmlURLUtilsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/URLUtils.h (212192 => 212193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/URLUtils.h        2017-02-11 14:29:52 UTC (rev 212192)
+++ trunk/Source/WebCore/html/URLUtils.h        2017-02-11 15:14:47 UTC (rev 212193)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx">     void setHref(const String&amp; url) { static_cast&lt;T*&gt;(this)-&gt;setHref(url); }
</span><span class="cx"> 
</span><span class="cx">     String toString() const;
</span><ins>+    String toJSON() const;
</ins><span class="cx"> 
</span><span class="cx">     String origin() const;
</span><span class="cx"> 
</span><span class="lines">@@ -74,6 +75,12 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template &lt;typename T&gt;
</span><ins>+String URLUtils&lt;T&gt;::toJSON() const
+{
+    return href().string();
+}
+
+template &lt;typename T&gt;
</ins><span class="cx"> String URLUtils&lt;T&gt;::origin() const
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;SecurityOrigin&gt; origin = SecurityOrigin::create(href());
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlURLUtilsidl"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/html/URLUtils.idl (212192 => 212193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/URLUtils.idl        2017-02-11 14:29:52 UTC (rev 212192)
+++ trunk/Source/WebCore/html/URLUtils.idl        2017-02-11 15:14:47 UTC (rev 212193)
</span><span class="lines">@@ -1,43 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 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 AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 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.
- */
-
-[NoInterfaceObject] interface URLUtils {
-    [SetterMayThrowException, URL] attribute USVString href;
-
-    [NotEnumerable] DOMString toString();
-
-    readonly attribute USVString origin;
-
-    attribute USVString protocol;
-    attribute USVString username;
-    attribute USVString password;
-    attribute USVString host;
-    attribute USVString hostname;
-    attribute USVString port;
-    attribute USVString pathname;
-    attribute USVString hash;
-    attribute USVString search;
-    [CachedAttribute] readonly attribute URLSearchParams searchParams;
-};
</del></span></pre>
</div>
</div>

</body>
</html>