<!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>[172331] trunk/Source/WebInspectorUI</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/172331">172331</a></dd>
<dt>Author</dt> <dd>timothy@apple.com</dd>
<dt>Date</dt> <dd>2014-08-07 23:48:52 -0700 (Thu, 07 Aug 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Combine and minify Esprima
https://bugs.webkit.org/show_bug.cgi?id=135728

Reviewed by Joseph Pecoraro.

* Scripts/combine-resources.pl:
* Scripts/copy-user-interface-resources.pl:
* UserInterface/External/Esprima/LICENSE: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIScriptscombineresourcespl">trunk/Source/WebInspectorUI/Scripts/combine-resources.pl</a></li>
<li><a href="#trunkSourceWebInspectorUIScriptscopyuserinterfaceresourcespl">trunk/Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceExternalEsprimaLICENSE">trunk/Source/WebInspectorUI/UserInterface/External/Esprima/LICENSE</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (172330 => 172331)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2014-08-08 04:49:02 UTC (rev 172330)
+++ trunk/Source/WebInspectorUI/ChangeLog        2014-08-08 06:48:52 UTC (rev 172331)
</span><span class="lines">@@ -1,5 +1,16 @@
</span><span class="cx"> 2014-08-07  Timothy Hatcher  &lt;timothy@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Web Inspector: Combine and minify Esprima
+        https://bugs.webkit.org/show_bug.cgi?id=135728
+
+        Reviewed by Joseph Pecoraro.
+
+        * Scripts/combine-resources.pl:
+        * Scripts/copy-user-interface-resources.pl:
+        * UserInterface/External/Esprima/LICENSE: Added.
+
+2014-08-07  Timothy Hatcher  &lt;timothy@apple.com&gt;
+
</ins><span class="cx">         Fix regression where tree outline keyboard navigation is broken.
</span><span class="cx"> 
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=135718
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIScriptscombineresourcespl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Scripts/combine-resources.pl (172330 => 172331)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Scripts/combine-resources.pl        2014-08-08 04:49:02 UTC (rev 172330)
+++ trunk/Source/WebInspectorUI/Scripts/combine-resources.pl        2014-08-08 06:48:52 UTC (rev 172331)
</span><span class="lines">@@ -21,8 +21,8 @@
</span><span class="cx">            'input-html-dir=s' =&gt; \$htmlDirectory,
</span><span class="cx">            'input-html=s' =&gt; \$htmlFile);
</span><span class="cx"> 
</span><del>-unless (defined $htmlFile and defined $derivedSourcesDirectory and defined $outputDirectory and defined $outputScriptName and defined $outputStylesheetName) {
-    print &quot;Usage: $0 --input-html &lt;path&gt; --derived-sources-dir &lt;path&gt; --output-dir &lt;path&gt; --output-script-name &lt;name&gt; --output-style-name &lt;name&gt;\n&quot;;
</del><ins>+unless (defined $htmlFile and defined $derivedSourcesDirectory and defined $outputDirectory and (defined $outputScriptName or defined $outputStylesheetName)) {
+    print &quot;Usage: $0 --input-html &lt;path&gt; --derived-sources-dir &lt;path&gt; --output-dir &lt;path&gt; [--output-script-name &lt;name&gt;] [--output-style-name &lt;name&gt;]\n&quot;;
</ins><span class="cx">     exit;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -76,8 +76,8 @@
</span><span class="cx"> my $inputDirectoryPattern = &quot;(?!External\/)[^\&quot;]*&quot;;
</span><span class="cx"> $inputDirectoryPattern = $inputDirectory . &quot;\/[^\&quot;]*&quot; if $inputDirectory;
</span><span class="cx"> 
</span><del>-concatinateFiles($outputStylesheetName, &quot;&lt;link rel=\&quot;stylesheet\&quot; href=\&quot;($inputDirectoryPattern)\&quot;&gt;&quot;, &quot;&lt;link rel=\&quot;stylesheet\&quot; href=\&quot;$outputStylesheetName\&quot;&gt;&quot;);
-concatinateFiles($outputScriptName, &quot;&lt;script src=\&quot;($inputDirectoryPattern)\&quot;&gt;&lt;\/script&gt;&quot;, &quot;&lt;script src=\&quot;$outputScriptName\&quot;&gt;&lt;/script&gt;&quot;);
</del><ins>+concatinateFiles($outputStylesheetName, &quot;&lt;link rel=\&quot;stylesheet\&quot; href=\&quot;($inputDirectoryPattern)\&quot;&gt;&quot;, &quot;&lt;link rel=\&quot;stylesheet\&quot; href=\&quot;$outputStylesheetName\&quot;&gt;&quot;) if defined $outputStylesheetName;
+concatinateFiles($outputScriptName, &quot;&lt;script src=\&quot;($inputDirectoryPattern)\&quot;&gt;&lt;\/script&gt;&quot;, &quot;&lt;script src=\&quot;$outputScriptName\&quot;&gt;&lt;/script&gt;&quot;) if defined $outputScriptName;
</ins><span class="cx"> 
</span><span class="cx"> $htmlContents =~ s/&lt;head&gt;.*&lt;\/head&gt;/&lt;head&gt;$headContents&lt;\/head&gt;/si;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIScriptscopyuserinterfaceresourcespl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl (172330 => 172331)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl        2014-08-08 04:49:02 UTC (rev 172330)
+++ trunk/Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl        2014-08-08 06:48:52 UTC (rev 172331)
</span><span class="lines">@@ -38,13 +38,28 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-my $LICENSE = &lt;&lt;'EOF';
</del><ins>+sub readLicenseFile($)
+{
+    my ($licenseFilePath) = @_;
+
+    open(LICENSE_FILE, '&lt;', $licenseFilePath) or die &quot;Unable to open $licenseFilePath: $!&quot;;
+
+    my $license = &quot;/*\n&quot;;
+    $license .= ' * ' . $_ while &lt;LICENSE_FILE&gt;;
+    $license .= &quot; */\n&quot;;
+
+    close(LICENSE_FILE);
+
+    return $license;
+}
+
+my $inspectorLicense = &lt;&lt;'EOF';
</ins><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2007-2014 Apple Inc. All rights reserved.
</span><del>- * Copyright (C) 2009-2011 Google Inc. All rights reserved.
- * Copyright (C) 2009-2010 Joseph Pecoraro. All rights reserved.
</del><span class="cx">  * Copyright (C) 2008 Matt Lilek. All rights reserved.
</span><span class="cx">  * Copyright (C) 2008-2009 Anthony Ricaud &lt;rik@webkit.org&gt;
</span><ins>+ * Copyright (C) 2009-2010 Joseph Pecoraro. All rights reserved.
+ * Copyright (C) 2009-2011 Google Inc. All rights reserved.
</ins><span class="cx">  * Copyright (C) 2009 280 North Inc. All Rights Reserved.
</span><span class="cx">  * Copyright (C) 2010 Nikita Vasilyev. All rights reserved.
</span><span class="cx">  * Copyright (C) 2011 Brian Grinstead All rights reserved.
</span><span class="lines">@@ -52,7 +67,7 @@
</span><span class="cx">  * Copyright (C) 2013 Samsung Electronics. All rights reserved.
</span><span class="cx">  * Copyright (C) 2013 Seokju Kwon (seokju.kwon@gmail.com)
</span><span class="cx">  * Copyright (C) 2013 Adobe Systems Inc. All rights reserved.
</span><del>- * Copyright (C) 2013 University of Washington. All rights reserved.
</del><ins>+ * Copyright (C) 2013-2014 University of Washington. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -84,15 +99,10 @@
</span><span class="cx"> my $targetResourcePath = File::Spec-&gt;catdir($ENV{'TARGET_BUILD_DIR'}, $ENV{'UNLOCALIZED_RESOURCES_FOLDER_PATH'});
</span><span class="cx"> my $protocolDir = File::Spec-&gt;catdir($targetResourcePath, 'Protocol');
</span><span class="cx"> my $codeMirrorPath = File::Spec-&gt;catdir($uiRoot, 'External', 'CodeMirror');
</span><ins>+my $esprimaPath = File::Spec-&gt;catdir($uiRoot, 'External', 'Esprima');
</ins><span class="cx"> 
</span><del>-my $codeMirrorLicenseFile = File::Spec-&gt;catfile($codeMirrorPath, 'LICENSE');
-open(CMLFILE, '&lt;', $codeMirrorLicenseFile) or die &quot;Unable to open $codeMirrorLicenseFile: $!&quot;;
-my $CODE_MIRROR_LICENSE = &quot;/*\n&quot;;
-while (&lt;CMLFILE&gt;) {
-    $CODE_MIRROR_LICENSE .= ' * ' . $_;
-}
-close(CMLFILE);
-$CODE_MIRROR_LICENSE .= &quot; */\n&quot;;
</del><ins>+my $codeMirrorLicense = readLicenseFile(File::Spec-&gt;catfile($codeMirrorPath, 'LICENSE'));
+my $esprimaMirrorLicense = readLicenseFile(File::Spec-&gt;catfile($esprimaPath, 'LICENSE'));
</ins><span class="cx"> 
</span><span class="cx"> make_path($protocolDir, $targetResourcePath);
</span><span class="cx"> 
</span><span class="lines">@@ -110,6 +120,9 @@
</span><span class="cx">     my $derivedSourcesMainHTML = File::Spec-&gt;catfile($derivedSourcesDir, 'Main.html');
</span><span class="cx">     system($combineResourcesCmd, '--input-dir', 'External/CodeMirror', '--input-html', $derivedSourcesMainHTML, '--input-html-dir', $uiRoot, '--derived-sources-dir', $derivedSourcesDir, '--output-dir', $derivedSourcesDir, '--output-script-name', 'CodeMirror.js', '--output-style-name', 'CodeMirror.css');
</span><span class="cx"> 
</span><ins>+    # Combine the Esprima JavaScript files in Production builds into a single file (Esprima.js).
+    system($combineResourcesCmd, '--input-dir', 'External/Esprima', '--input-html', $derivedSourcesMainHTML, '--input-html-dir', $uiRoot, '--derived-sources-dir', $derivedSourcesDir, '--output-dir', $derivedSourcesDir, '--output-script-name', 'Esprima.js');
+
</ins><span class="cx">     # Remove console.assert calls from the Main.js file.
</span><span class="cx">     my $derivedSourcesMainJS = File::Spec-&gt;catfile($derivedSourcesDir, 'Main.js');
</span><span class="cx">     system(File::Spec-&gt;catfile($scriptsRoot, 'remove-console-asserts.pl'), '--input-script', $derivedSourcesMainJS, '--output-script', $derivedSourcesMainJS);
</span><span class="lines">@@ -128,18 +141,22 @@
</span><span class="cx"> 
</span><span class="cx">     # Export the license into Main.js.
</span><span class="cx">     my $targetMainJS = File::Spec-&gt;catfile($targetResourcePath, 'Main.js');
</span><del>-    seedFile($targetMainJS, $LICENSE);
</del><ins>+    seedFile($targetMainJS, $inspectorLicense);
</ins><span class="cx"> 
</span><span class="cx">     my $targetMainCSS = File::Spec-&gt;catfile($targetResourcePath, 'Main.css');
</span><del>-    seedFile($targetMainCSS, $LICENSE);
</del><ins>+    seedFile($targetMainCSS, $inspectorLicense);
</ins><span class="cx"> 
</span><span class="cx">     # Export the license into CodeMirror.js and CodeMirror.css.
</span><span class="cx">     my $targetCodeMirrorJS = File::Spec-&gt;catfile($targetResourcePath, 'CodeMirror.js');
</span><del>-    seedFile($targetCodeMirrorJS, $CODE_MIRROR_LICENSE);
</del><ins>+    seedFile($targetCodeMirrorJS, $codeMirrorLicense);
</ins><span class="cx"> 
</span><span class="cx">     my $targetCodeMirrorCSS = File::Spec-&gt;catfile($targetResourcePath, 'CodeMirror.css');
</span><del>-    seedFile($targetCodeMirrorCSS, $CODE_MIRROR_LICENSE);
</del><ins>+    seedFile($targetCodeMirrorCSS, $codeMirrorLicense);
</ins><span class="cx"> 
</span><ins>+    # Export the license into Esprima.js.
+    my $targetEsprimaJS = File::Spec-&gt;catfile($targetResourcePath, 'Esprima.js');
+    seedFile($targetEsprimaJS, $esprimaMirrorLicense);
+
</ins><span class="cx">     # Minify the Main.js and Main.css files, with Main.js appending to the license that was exported above.
</span><span class="cx">     my $jsMinScript = File::Spec-&gt;catfile($scriptsRoot, 'jsmin.py');
</span><span class="cx">     my $cssMinScript = File::Spec-&gt;catfile($scriptsRoot, 'cssmin.py');
</span><span class="lines">@@ -152,6 +169,10 @@
</span><span class="cx">     system(qq(&quot;$python&quot; &quot;$jsMinScript&quot; &lt; &quot;$derivedSouressCodeMirrorJS&quot; &gt;&gt; &quot;$targetCodeMirrorJS&quot;)) and die &quot;Failed to minify $derivedSouressCodeMirrorJS: $!&quot;;
</span><span class="cx">     system(qq(&quot;$python&quot; &quot;$cssMinScript&quot; &lt; &quot;$derivedSourcesCodeMirrorCSS&quot; &gt;&gt; &quot;$targetCodeMirrorCSS&quot;)) and die &quot;Failed to minify $derivedSourcesCodeMirrorCSS: $!&quot;;
</span><span class="cx"> 
</span><ins>+    # Minify the Esprima.js file, appending to the license that was exported above.
+    my $derivedSouressEsprimaJS = File::Spec-&gt;catfile($derivedSourcesDir, 'Esprima.js');
+    system(qq(&quot;$python&quot; &quot;$jsMinScript&quot; &lt; &quot;$derivedSouressEsprimaJS&quot; &gt;&gt; &quot;$targetEsprimaJS&quot;)) and die &quot;Failed to minify $derivedSouressEsprimaJS: $!&quot;;
+
</ins><span class="cx">     # Copy over Main.html and the Images directory.
</span><span class="cx">     copy($derivedSourcesMainHTML, File::Spec-&gt;catfile($targetResourcePath, 'Main.html'));
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceExternalEsprimaLICENSE"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/External/Esprima/LICENSE (0 => 172331)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/External/Esprima/LICENSE                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/External/Esprima/LICENSE        2014-08-08 06:48:52 UTC (rev 172331)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+Copyright (C) 2013 Ariya Hidayat &lt;ariya.hidayat@gmail.com&gt;
+Copyright (C) 2013 Thaddee Tyl &lt;thaddee.tyl@gmail.com&gt;
+Copyright (C) 2013 Mathias Bynens &lt;mathias@qiwi.be&gt;
+Copyright (C) 2012 Ariya Hidayat &lt;ariya.hidayat@gmail.com&gt;
+Copyright (C) 2012 Mathias Bynens &lt;mathias@qiwi.be&gt;
+Copyright (C) 2012 Joost-Wim Boekesteijn &lt;joost-wim@boekesteijn.nl&gt;
+Copyright (C) 2012 Kris Kowal &lt;kris.kowal@cixar.com&gt;
+Copyright (C) 2012 Yusuke Suzuki &lt;utatane.tea@gmail.com&gt;
+Copyright (C) 2012 Arpad Borsos &lt;arpad.borsos@googlemail.com&gt;
+Copyright (C) 2011 Ariya Hidayat &lt;ariya.hidayat@gmail.com&gt;
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+* 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 THE COPYRIGHT HOLDERS AND 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 &lt;COPYRIGHT HOLDER&gt; 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.
</ins></span></pre>
</div>
</div>

</body>
</html>