<!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 <timothy@apple.com>
</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 <timothy@apple.com>
+
</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' => \$htmlDirectory,
</span><span class="cx"> 'input-html=s' => \$htmlFile);
</span><span class="cx">
</span><del>-unless (defined $htmlFile and defined $derivedSourcesDirectory and defined $outputDirectory and defined $outputScriptName and defined $outputStylesheetName) {
- print "Usage: $0 --input-html <path> --derived-sources-dir <path> --output-dir <path> --output-script-name <name> --output-style-name <name>\n";
</del><ins>+unless (defined $htmlFile and defined $derivedSourcesDirectory and defined $outputDirectory and (defined $outputScriptName or defined $outputStylesheetName)) {
+ print "Usage: $0 --input-html <path> --derived-sources-dir <path> --output-dir <path> [--output-script-name <name>] [--output-style-name <name>]\n";
</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 = "(?!External\/)[^\"]*";
</span><span class="cx"> $inputDirectoryPattern = $inputDirectory . "\/[^\"]*" if $inputDirectory;
</span><span class="cx">
</span><del>-concatinateFiles($outputStylesheetName, "<link rel=\"stylesheet\" href=\"($inputDirectoryPattern)\">", "<link rel=\"stylesheet\" href=\"$outputStylesheetName\">");
-concatinateFiles($outputScriptName, "<script src=\"($inputDirectoryPattern)\"><\/script>", "<script src=\"$outputScriptName\"></script>");
</del><ins>+concatinateFiles($outputStylesheetName, "<link rel=\"stylesheet\" href=\"($inputDirectoryPattern)\">", "<link rel=\"stylesheet\" href=\"$outputStylesheetName\">") if defined $outputStylesheetName;
+concatinateFiles($outputScriptName, "<script src=\"($inputDirectoryPattern)\"><\/script>", "<script src=\"$outputScriptName\"></script>") if defined $outputScriptName;
</ins><span class="cx">
</span><span class="cx"> $htmlContents =~ s/<head>.*<\/head>/<head>$headContents<\/head>/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 = <<'EOF';
</del><ins>+sub readLicenseFile($)
+{
+ my ($licenseFilePath) = @_;
+
+ open(LICENSE_FILE, '<', $licenseFilePath) or die "Unable to open $licenseFilePath: $!";
+
+ my $license = "/*\n";
+ $license .= ' * ' . $_ while <LICENSE_FILE>;
+ $license .= " */\n";
+
+ close(LICENSE_FILE);
+
+ return $license;
+}
+
+my $inspectorLicense = <<'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 <rik@webkit.org>
</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->catdir($ENV{'TARGET_BUILD_DIR'}, $ENV{'UNLOCALIZED_RESOURCES_FOLDER_PATH'});
</span><span class="cx"> my $protocolDir = File::Spec->catdir($targetResourcePath, 'Protocol');
</span><span class="cx"> my $codeMirrorPath = File::Spec->catdir($uiRoot, 'External', 'CodeMirror');
</span><ins>+my $esprimaPath = File::Spec->catdir($uiRoot, 'External', 'Esprima');
</ins><span class="cx">
</span><del>-my $codeMirrorLicenseFile = File::Spec->catfile($codeMirrorPath, 'LICENSE');
-open(CMLFILE, '<', $codeMirrorLicenseFile) or die "Unable to open $codeMirrorLicenseFile: $!";
-my $CODE_MIRROR_LICENSE = "/*\n";
-while (<CMLFILE>) {
- $CODE_MIRROR_LICENSE .= ' * ' . $_;
-}
-close(CMLFILE);
-$CODE_MIRROR_LICENSE .= " */\n";
</del><ins>+my $codeMirrorLicense = readLicenseFile(File::Spec->catfile($codeMirrorPath, 'LICENSE'));
+my $esprimaMirrorLicense = readLicenseFile(File::Spec->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->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->catfile($derivedSourcesDir, 'Main.js');
</span><span class="cx"> system(File::Spec->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->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->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->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->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->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->catfile($scriptsRoot, 'jsmin.py');
</span><span class="cx"> my $cssMinScript = File::Spec->catfile($scriptsRoot, 'cssmin.py');
</span><span class="lines">@@ -152,6 +169,10 @@
</span><span class="cx"> system(qq("$python" "$jsMinScript" < "$derivedSouressCodeMirrorJS" >> "$targetCodeMirrorJS")) and die "Failed to minify $derivedSouressCodeMirrorJS: $!";
</span><span class="cx"> system(qq("$python" "$cssMinScript" < "$derivedSourcesCodeMirrorCSS" >> "$targetCodeMirrorCSS")) and die "Failed to minify $derivedSourcesCodeMirrorCSS: $!";
</span><span class="cx">
</span><ins>+ # Minify the Esprima.js file, appending to the license that was exported above.
+ my $derivedSouressEsprimaJS = File::Spec->catfile($derivedSourcesDir, 'Esprima.js');
+ system(qq("$python" "$jsMinScript" < "$derivedSouressEsprimaJS" >> "$targetEsprimaJS")) and die "Failed to minify $derivedSouressEsprimaJS: $!";
+
</ins><span class="cx"> # Copy over Main.html and the Images directory.
</span><span class="cx"> copy($derivedSourcesMainHTML, File::Spec->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 <ariya.hidayat@gmail.com>
+Copyright (C) 2013 Thaddee Tyl <thaddee.tyl@gmail.com>
+Copyright (C) 2013 Mathias Bynens <mathias@qiwi.be>
+Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
+Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be>
+Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
+Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com>
+Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
+Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>
+Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>
+
+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 "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 <COPYRIGHT HOLDER> 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>